#Failed to migrate NAbox from 3 to 4

1 messages · Page 1 of 1 (latest)

tough estuary
#

I met an error message when trying to migrate NAbox from 3 to 4
This is the error message:
Restarting Prometheus with admin API enabled...2024/07/23 07:14:12 ERROR Failed to start Prometheus error="exit status 1"

jagged pewter
#

@ember widget

ember widget
#

What version of NAbox 3 ?

tough estuary
#

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?

tough estuary
ember widget
#

That’s why. You need 3.5.2. And I need to upgrade the docs 😂

tough estuary
#

The minimum requirement for the migration is 3.5.2, is that correct?

ember widget
#

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.

tough estuary
ember widget
tough estuary
ember widget
tough estuary
#

@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?

ember widget
#

@jagged pewter What do you think ? Is there a way to disable templates with customization ?

jagged pewter
#

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.

tough estuary
#

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?

jagged pewter
#

NABox steps may be different. @ember widget ?

ember widget
#

Yes, NAbox does systematically add the harvest distribution conf path I’m afraid.

jagged pewter
#

@tough estuary Are you using Rest or Zapi collector where you want to disable templates?

tough estuary
#

Using Zapi

jagged pewter
#

Okay. I think we need to comment out relevant templates only in default.yaml in NABox. @ember widget Can we do that?

ember widget
#

Currently, --confpath is statically assigned

    confPaths := []string{
        "../harvest/conf",
        "active",
    }
jagged pewter
#

@tough estuary Your question is for NABox3 or 4?

tough estuary
#

NABox3

ember widget
#

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 😄

jagged pewter
#

@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?

ember widget
#

Looks like victoria is harder on CPU

#

Well I take it back, when scaling it's less cpu

jagged pewter
#

@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.

tough estuary
jagged pewter
#

I think something like below may work

ember widget
#

If they have their own prom they are doing two collections already, corrcect ?

tough estuary
tough estuary
ember widget
#

In your case it could be nice to disable prom/victoria alltogether

tough estuary
jagged pewter
ember widget
#

it should yes

jagged pewter
#

@tough estuary You can try this approach and see

ember widget
#

collectors: in the yaml will probably be overwritten when you update the configuration

jagged pewter
#

yeah managing harvest.yaml will be challenge.. probably have to keep it manual change from shell rather than UI.

ember widget
#

yep

tough estuary
jagged pewter
#

Yes. I was able to edit it. I am using NAbox 3.5 (2024-02-26)

ember widget
#

Should be editable yes, never login as admin with ssh

tough estuary
ember widget
#

Something went wrong during the upgrade. Can you apply again ?

tough estuary
#

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

ember widget
#

what's the error before crash in dc logs grafana ? It's probably about conflicting dashboard and folders

tough estuary
#

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"

ember widget
#

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

ember widget
tough estuary
ember widget
#

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
tough estuary
#

It shows up in "dc ps" command, but seeing unavailable in GUI

ember widget
#

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
ember widget
#

whooop

#

you should be able to put everything back

tough estuary
ember widget
#

yes, start with the json file, restart, then the yaml file, restart

#

You don't have a /opt/grafana-dashboards/nabox.json file correct ?

tough estuary
ember widget
#

also docker images|grep vmctl should return something

tough estuary
#

victoriametrics/vmctl heads-master-0-g93a29fce4e f76f053c01c9 4 months ago 42.6MB

ember widget
#

good

#

if grafana starts, you're all set

tough estuary
#

Thanks @ember widget

ember widget
#

Sorry about that !

tough estuary
#

@ember widget Is there any prometheus.service in NAbox3 where I can change the limit from1024 to 65536?
[Service]
LimitNOFILE=65536

ember widget
#

This is what prometheus container sees :

Max open files            1048576              1048576              files
tough estuary
tough estuary
ember widget
#

Let me do it

#
nabox-api:~# cat /proc/22002/limits |grep "Max open files"
Max open files            1048576              1048576              files
#

Looking good

tough estuary
#

@ember widget In the NAbox3 , we can find harvest conf under /opt/harvest2-conf/conf, where can we find these folders in NAbox 4?

ember widget
#

In /etc/nabox/harvest

tough estuary
#

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

ember widget
#

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

hidden terrace
#

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"

ember widget
#

Are you root ?

tough estuary
ember widget
#

Not sure I'm following you !