cloned Linux VM, checks stopped working

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
benningtonr
Posts: 524
Joined: Tue May 22, 2012 2:16 pm

cloned Linux VM, checks stopped working

Post by benningtonr »

We had a Linux VM, that had several checks working fine. We cloned it and now the checks on the cloned VM do not work.
Ideas on were to start looking.i remove the host and all services from nagios, re did it and they still fail. I am attaching a snipit of the checks, ping is failing because the web master has that feature not allowed in yet.
You do not have the required permissions to view the files attached to this post.
User avatar
mbellerue
Posts: 1403
Joined: Fri Jul 12, 2019 11:10 am

Re: cloned Linux VM, checks stopped working

Post by mbellerue »

That is strange. Can you give us your nrpe config file from the remote machine? According to the error messages, the checks just aren't defined.

Also, is the IP address of the cloned Nagios server the same as the IP address of the old Nagios server? Or has the IP address of the cloned Nagios server been added to the allowed_hosts variable in the remote server's nrpe config file?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
benningtonr
Posts: 524
Joined: Tue May 22, 2012 2:16 pm

Re: cloned Linux VM, checks stopped working

Post by benningtonr »

The ip address has been changed, I have changed it in the setting on the nagios server. I compared the nrpe.cfg with another Linux server that is reporting normally and they are almost identical. with the exception of the don't blame Nagios. but the checks on the nagios server have the same arguments. Both the working nrpe and the non working nrpe have 127.0.0.1 as the allowed host. I also deleted all setting for this server on the Nagios server and ran the linux wizard again, with the same results.
You do not have the required permissions to view the files attached to this post.
benningtonr
Posts: 524
Joined: Tue May 22, 2012 2:16 pm

Re: cloned Linux VM, checks stopped working

Post by benningtonr »

Another difference between the working and not working

Not working:
[bob@nagios ~]$ /usr/local/nagios/libexec/check_nrpe -H x.x.130.28
NRPE v3.2.1
Working:
[bob@nagios ~]$ /usr/local/nagios/libexec/check_nrpe -H x.x.130.8
NRPE v2.15
User avatar
mbellerue
Posts: 1403
Joined: Fri Jul 12, 2019 11:10 am

Re: cloned Linux VM, checks stopped working

Post by mbellerue »

So it looks like these are the only commands that are specified in your nrpe.cfg file.

Code: Select all

command[check_users]=/usr/lib/nagios/plugins/check_users -w 5 -c 10
command[check_load]=/usr/lib/nagios/plugins/check_load -r -w .15,.10,.05 -c .30,.25,.20
command[check_hda1]=/usr/lib/nagios/plugins/check_disk -w 20% -c 10% -p /dev/hda1
command[check_zombie_procs]=/usr/lib/nagios/plugins/check_procs -w 5 -c 10 -s Z
command[check_total_procs]=/usr/lib/nagios/plugins/check_procs -w 150 -c 200
Below that a little ways are some of the default commands that you can use as an example. Some people just uncomment these commands and use them as-is.

Code: Select all

### MISC SYSTEM METRICS ###
#command[check_users]=/usr/lib/nagios/plugins/check_users $ARG1$
#command[check_load]=/usr/lib/nagios/plugins/check_load $ARG1$
#command[check_disk]=/usr/lib/nagios/plugins/check_disk $ARG1$
#command[check_swap]=/usr/lib/nagios/plugins/check_swap $ARG1$
#command[check_cpu_stats]=/usr/lib/nagios/plugins/check_cpu_stats.sh $ARG1$
#command[check_mem]=/usr/lib/nagios/plugins/custom_check_mem -n $ARG1$
But the commands that are failing with an error similar to, NRPE: Command 'check_disk' not defined. This is what it's talking about. The commands need to be defined in the nrpe.cfg file on the remote machine.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
benningtonr
Posts: 524
Joined: Tue May 22, 2012 2:16 pm

Re: cloned Linux VM, checks stopped working

Post by benningtonr »

Check disk is defined, it is the third one from the top, i have two Linux boxes, configured the same one works and one does not, i will un comment to see if that helps, but why would one work and one not?

Thank you
benjaminsmith
Posts: 5324
Joined: Wed Aug 22, 2018 4:39 pm
Location: saint paul

Re: cloned Linux VM, checks stopped working

Post by benjaminsmith »

Hello @benningtonr,

Looking over the configurations that Michale posted, you'll notice the command is defined as check_hda1, but the log shown in the initial post is trying to call check_disk

Code: Select all

command[check_hda1]=/usr/lib/nagios/plugins/check_disk -w 20% -c 10% -p /dev/hda1
When you use check_nrpe to call a check on the remote host the command/name will need to be set in the nrpe.cfg file. The main difference between the sample command the one above is the sample command is set to take arguments for the thresholds and path.

Have you compared the nrpe.cfg files from both systems? Those other commands such as check_cpu_stats or check_apt in this configuration file are commented out. Try uncommenting those commands.

Code: Select all

#command[check_cpu_stats]=/usr/lib/nagios/plugins/check_cpu_stats.sh $ARG1$
#command[check_init_service]=sudo /usr/lib/nagios/plugins/check_init_service $ARG1$
Let us know if making those changes, fixes the issue.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked