#Failed to migrate NAbox from 3 to 4
1 messages · Page 1 of 1 (latest)
@ember widget
What version of NAbox 3 ?
Another question about NAbox4,
A client they are using both NAbox and self installed harvest with prometheus and Grafana,
They are concerned that if upgrading to NAbox 4 which is using Victoria Metrics rather than Prometheus, will there have any issue?
NAbox 3.4
That’s why. You need 3.5.2. And I need to upgrade the docs 😂
The minimum requirement for the migration is 3.5.2, is that correct?
Correct
Regarding your client, if they are not doing anything fancy, Victoria and prom are compatible. If they are using some things specific to prom then maybe they have to be careful. As far as Harvest goes, it’s the same.
Noted!
@ember widget
For our client, after disabling all unused metrics in harvest using conf_path, they do see the decline in CPU loading.
And they want to do the same following things in NAbox3:
- Disable all unused metrics -> is this the same procedure to harvest?
- Increase the file limit for prometheus to 65536 -> where can I do the setting?
Harvest should be customized the same, it’s documented here https://nabox.org/faq/#customize-harvest
File limits I don’t know what has been changed or if that’s necessary but it can be done
Is the folder structure same in Nabox 3 and 4?
"/etc/nabox/harvest/user'
With NAbox 3 you had to format the yaml file with a trick https://3.nabox.org/faq/#customize-harvest-2
That’s not the case with NAbox 4
@ember widget If I want to change the conf_path for pollers to disable unused templates and metrics.
Can I just add "customconf" to /opt/harvest2-conf/ and set the conf_path to each pollers in harvest.yml?
And if I upgrade harvest or Nabox, will the change be altered?
@jagged pewter What do you think ? Is there a way to disable templates with customization ?
If you are using the default conf_path, you will need to modify and comment out the necessary sections in default.yaml. However, be aware that this file will be overwritten during an upgrade. To avoid this issue, you can change the conf_path to point to your own default.yaml file, which will remain unchanged during upgrades.
So I should add a new harvest_new.yml and another customconf in "/opt/harvest2-conf/" and then add the conf_path to each pollers which point to the newly created customconf?
NABox steps may be different. @ember widget ?
Yes, NAbox does systematically add the harvest distribution conf path I’m afraid.
@tough estuary Are you using Rest or Zapi collector where you want to disable templates?
Using Zapi
Okay. I think we need to comment out relevant templates only in default.yaml in NABox. @ember widget Can we do that?
Currently, --confpath is statically assigned
confPaths := []string{
"../harvest/conf",
"active",
}
@tough estuary Your question is for NABox3 or 4?
NABox3
oh
unsupported. deprecated. #imouttahere
😄
Sorry about that, you said that in the beginning, it was NAbox 3
mmmm
I'll give you a flag to disable harvest conf in NAbox 4 in exchange for an update 😄
@tough estuary Could you also explain the problem statement again? Like why do you want to disable templates? If your concern is to reduce cpu usage in system, Then NABox4 may be a good choice. @ember widget Do we have any resource consumption comparison between nabox3 and 4?
Unfortunately I dont, but there is this https://zetablogs.medium.com/prometheus-vs-victoria-metrics-load-testing-3fa0cc782912
Looks like victoria is harder on CPU
Well I take it back, when scaling it's less cpu
@tough estuary I recall that there were issues earlier in your setup related to the file limit for the Prometheus process. Additionally, we need to check if there is a high object count in the customer environment that might be driving up CPU usage. Do you know how much CPU is currently being used? If you can share the logs, we can take a closer look.
Sure, client is using Nabox3, and the utilization is normal and stable on Nabox, so they only want to disable unused metrics on Nabox to decrease the collection size. For the upgrade to Nabox4 , since they have their own-built Prometheus, they have concerned about maintaing two different databases
I think something like below may work
If they have their own prom they are doing two collections already, corrcect ?
Yes, one with their own-built harvest, another was NAbox default prometheus
So the limited.yml will not be erased after upgrading NAbox or harvest?
In your case it could be nice to disable prom/victoria alltogether
Yes, We met the file limit issue in prometheus before.
So try to increase that setting in Nabox also.
This approach is working for me in local tests
@ember widget will limited.yaml persist during upgrades?
it should yes
@tough estuary You can try this approach and see
collectors: in the yaml will probably be overwritten when you update the configuration
yeah managing harvest.yaml will be challenge.. probably have to keep it manual change from shell rather than UI.
yep
Is this harvest.yml in /opt/harvest2-conf?
I tried to edit, and it shows read only for harvest.yml
Yes. I was able to edit it. I am using NAbox 3.5 (2024-02-26)
Should be editable yes, never login as admin with ssh
I have upgraded to 3.5.3,
but seeing an error while migrating to nabox4
"Unable to find image 'victoriametrics/vmctl:heads-master-0-g93a29fce4e' locally
docker: Error response from daemon: Get "https://registry-1.docker.io/v2/": dial tcp: lookup registry-1.docker.io on 127.0.0.1:53: server misbehaving."
Something went wrong during the upgrade. Can you apply again ?
Sure
I found Grafana keeps restarting after upgrading to 3.5.3, so Grafana shows unavailable now
grafana grafana/grafana-oss:9.5.14 "/run.sh" grafana 7 minutes ago Restarting (1) 27 seconds ago
what's the error before crash in dc logs grafana ? It's probably about conflicting dashboard and folders
logger=provisioning.plugins t=2024-07-25T07:43:14.618308117Z level=error msg="Failed to read plugin provisioning files from directory" path=/provisioning-conf/plugins error="open /provisioning-conf/plugins: no such file or directory"
grafana | logger=provisioning.notifiers t=2024-07-25T07:43:14.618397686Z level=error msg="Can't read alert notification provisioning files from directory" path=/provisioning-conf/notifiers error="open /provisioning-conf/notifiers: no such file or directory"
If you rename /usr/local/nabox/files/grafana/dashboards/NAbox/nabox.json to /usr/local/nabox/files/grafana/dashboards/NAbox/nabox.j_ it might be able to start, then rename the file back
Those are fine, that's not what's causing the crash
Error: ✗ alert rules: got invalid response. expected folder, found dashboard
that's the one
so what if you :
mv /usr/local/nabox/files/grafana/dashboards/NAbox/nabox.json /usr/local/nabox/files/grafana/dashboards/NAbox/nabox.j_
dc restart grafana
It shows up in "dc ps" command, but seeing unavailable in GUI
I'm trying to remember the sequence for this issue.
it might be a different file :
mv /usr/local/nabox/files/grafana/provisioning/alerting/nabox.yaml /usr/local/nabox/files/grafana/provisioning/alerting/nabox.y_
dc restart grafana
Yes! This works!!!
rename back and restart?
yes, start with the json file, restart, then the yaml file, restart
You don't have a /opt/grafana-dashboards/nabox.json file correct ?
Yes, the folder was empty
also docker images|grep vmctl should return something
victoriametrics/vmctl heads-master-0-g93a29fce4e f76f053c01c9 4 months ago 42.6MB
Thanks @ember widget
Sorry about that !
@ember widget Is there any prometheus.service in NAbox3 where I can change the limit from1024 to 65536?
[Service]
LimitNOFILE=65536
This is what prometheus container sees :
Max open files 1048576 1048576 files
Hi Yann,
Is the procedure correct to get the limits?
"ps aux | grep prometheus" to get prometheus pid, I should use the 5366?
And then use "cat /proc/{pid}/limits | grep "Max open files""
Let me do it
nabox-api:~# cat /proc/22002/limits |grep "Max open files"
Max open files 1048576 1048576 files
Looking good
@ember widget In the NAbox3 , we can find harvest conf under /opt/harvest2-conf/conf, where can we find these folders in NAbox 4?
In /etc/nabox/harvest
But all I see in only
exclude_transient_volumes.yaml in 9.8.0 folder
under /etc/nabox/harvest/active/zapiperf/cdot/9.8.0
Yes, that's a default customization for Harvest in NAbox.
If you're looking for the full harvest distribution, that's in /data/packages/harvest
But harvest config file really is /etc/nabox/harvest/harvest.yml
Hi @ember widget last migration from 3.5.3 to 4.0.4 failed - ERROR Failed to take Prometheus snapshot error="Failed to parse snapshot response: invalid character 'S' looking for beginning of value"
Are you root ?
Hi @ember widget , So we cannot change the default conf_path in NAbox3 correct?
Not sure I'm following you !