NRPE: Command 'check_LV01_RootDirectory' not defined
NRPE: Command 'check_LV01_RootDirectory' not defined
The Picture 1 show the command not defined.
The IP of nagios server is 10.134.40.139
The IP of nagios Client is 10.202.16.77
The Picture 2 show the nagios client disk information.
The Picture 3 show the nrpe.cfg in nagios server.
In picture 3 I add two lines in the nrpe.cfg , it's :
command[check_LV01_RootDirectory]=/usr/local/nagios/libexec/check_disk -w 20% -c 10% -p /dev/mapper/vg-LV01
command[check_LV00_DataDirectory]=/usr/local/nagios/libexec/check_disk -w 20% -c 10% -p /dev/mapper/vg-LV00
The Picture 4 show the nrpe.cfg in nagios client.
In picture 4 I add two lines in the nrpe.cfg , it's :
command[check_LV01_RootDirectory]=/usr/local/nagios/libexec/check_disk -w 20% -c 10% -p /dev/mapper/vg-LV01
command[check_LV00_DataDirectory]=/usr/local/nagios/libexec/check_disk -w 20% -c 10% -p /dev/mapper/vg-LV00
I Cannot add another attachment, 3 is the maximum.
The picture 4 is same as the picture 3.
When I finish complete this configuration , The Picture 1 show the command not defined.
So I want to know where configuration is wrong ?
Theversion of nagios is 3.5.0
sometimes I can define a command in commands.cfg
sometimes I can define a command in nrpe.cfg
I want to know the difference between commands.cfg and nrpe.cfg ?
The IP of nagios server is 10.134.40.139
The IP of nagios Client is 10.202.16.77
The Picture 2 show the nagios client disk information.
The Picture 3 show the nrpe.cfg in nagios server.
In picture 3 I add two lines in the nrpe.cfg , it's :
command[check_LV01_RootDirectory]=/usr/local/nagios/libexec/check_disk -w 20% -c 10% -p /dev/mapper/vg-LV01
command[check_LV00_DataDirectory]=/usr/local/nagios/libexec/check_disk -w 20% -c 10% -p /dev/mapper/vg-LV00
The Picture 4 show the nrpe.cfg in nagios client.
In picture 4 I add two lines in the nrpe.cfg , it's :
command[check_LV01_RootDirectory]=/usr/local/nagios/libexec/check_disk -w 20% -c 10% -p /dev/mapper/vg-LV01
command[check_LV00_DataDirectory]=/usr/local/nagios/libexec/check_disk -w 20% -c 10% -p /dev/mapper/vg-LV00
I Cannot add another attachment, 3 is the maximum.
The picture 4 is same as the picture 3.
When I finish complete this configuration , The Picture 1 show the command not defined.
So I want to know where configuration is wrong ?
Theversion of nagios is 3.5.0
sometimes I can define a command in commands.cfg
sometimes I can define a command in nrpe.cfg
I want to know the difference between commands.cfg and nrpe.cfg ?
- Box293
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
- Contact:
Re: NRPE: Command 'check_LV01_RootDirectory' not defined
NRPE is for executing checks on remote servers.
If this doesn't work, restart xinetd on the client machine:
This is required whenever you change the nrpe.cfg
commands.cfg on the Nagios server is where you define your command to use in services.
Services use commands to create checks. The commands have variables like $ARG1$ and $HOSTADDRESS$ which allow you to be dynamic in your configs.
You don't need to define this on your Nagios server.wangyu wrote:The Picture 3 show the nrpe.cfg in nagios server.
In picture 3 I add two lines in the nrpe.cfg , it's :
command[check_LV01_RootDirectory]=/usr/local/nagios/libexec/check_disk -w 20% -c 10% -p /dev/mapper/vg-LV01
command[check_LV00_DataDirectory]=/usr/local/nagios/libexec/check_disk -w 20% -c 10% -p /dev/mapper/vg-LV00
So nrpe.cfg on the client defines the name of the check. With what you've configured you should be able to execute the following from your Nagios server:wangyu wrote:The Picture 4 show the nrpe.cfg in nagios client.
In picture 4 I add two lines in the nrpe.cfg , it's :
command[check_LV01_RootDirectory]=/usr/local/nagios/libexec/check_disk -w 20% -c 10% -p /dev/mapper/vg-LV01
command[check_LV00_DataDirectory]=/usr/local/nagios/libexec/check_disk -w 20% -c 10% -p /dev/mapper/vg-LV00
Code: Select all
/usr/local/nagios/libexec/check_nrpe -H 10.202.16.77 -c check_LV01_RootDirectory
/usr/local/nagios/libexec/check_nrpe -H 10.202.16.77 -c check_LV00_DataDirectoryCode: Select all
service xinetd restart/usr/local/nagios/etc/nrpe.cfg is the main configuration file on the NRPE client.wangyu wrote:sometimes I can define a command in commands.cfg
sometimes I can define a command in nrpe.cfg
I want to know the difference between commands.cfg and nrpe.cfg ?
commands.cfg on the Nagios server is where you define your command to use in services.
Services use commands to create checks. The commands have variables like $ARG1$ and $HOSTADDRESS$ which allow you to be dynamic in your configs.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: NRPE: Command 'check_LV01_RootDirectory' not defined
According to the method you tell me .
The picture 11 show the nagios client config of the nrpe.cfg
The picture 12 show the nagios server config of the nrpe.cfg
Then I restart the service of xinted on nagios client
[root@swhdtplmam01 /]# service xinetd restart
Stopping xinetd: [ OK ]
Starting xinetd: [ OK ]
Then I do this action on nagios server
But it continue report error:
[root@VSLHAGILEAP01 plugin]# /usr/local/nagios/libexec/check_nrpe -H 10.202.16.77 -c check_LV01_RootDirectory
NRPE: Command 'check_LV01_RootDirectory' not defined
[root@VSLHAGILEAP01 plugin]# /usr/local/nagios/libexec/check_nrpe -H 10.202.16.77 -c check_LV00_DataDirectory
NRPE: Command 'check_LV00_DataDirectory' not defined
What's the wrong about this problem ?
The picture 11 show the nagios client config of the nrpe.cfg
The picture 12 show the nagios server config of the nrpe.cfg
Then I restart the service of xinted on nagios client
[root@swhdtplmam01 /]# service xinetd restart
Stopping xinetd: [ OK ]
Starting xinetd: [ OK ]
Then I do this action on nagios server
But it continue report error:
[root@VSLHAGILEAP01 plugin]# /usr/local/nagios/libexec/check_nrpe -H 10.202.16.77 -c check_LV01_RootDirectory
NRPE: Command 'check_LV01_RootDirectory' not defined
[root@VSLHAGILEAP01 plugin]# /usr/local/nagios/libexec/check_nrpe -H 10.202.16.77 -c check_LV00_DataDirectory
NRPE: Command 'check_LV00_DataDirectory' not defined
What's the wrong about this problem ?
- Box293
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
- Contact:
Re: NRPE: Command 'check_LV01_RootDirectory' not defined
Can you please run these commands on the NRPE Client and show us the output:
Code: Select all
ps -C xinetd
ps -C nrpeAs of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: NRPE: Command 'check_LV01_RootDirectory' not defined
The picture 41.png show the result of the nagios client.
- Attachments
-
- 41.png (3.59 KiB) Viewed 2847 times
- Box293
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
- Contact:
Re: NRPE: Command 'check_LV01_RootDirectory' not defined
It looks like you have both xinetd and nrpe running.
Try:
Does that fix your problem?
Try:
Code: Select all
kill 15985
kill 12850
service xinetd startAs of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: NRPE: Command 'check_LV01_RootDirectory' not defined
When I stop the nrpe service ,the picture show the result ,other monitor is down.
- Box293
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
- Contact:
Re: NRPE: Command 'check_LV01_RootDirectory' not defined
So instead of starting xinetd, does starting the nrpe service work?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: NRPE: Command 'check_LV01_RootDirectory' not defined
It's OK now,thanks very much for box 293.
Please see the picture 57
Please see the picture 57
Re: NRPE: Command 'check_LV01_RootDirectory' not defined
wangyu wrote:It's OK now,thanks very much for box 293.
Please see the picture 57
Thanks for letting us know!
I'm going to go ahead and mark this one as resolved and lock it up.
Former Nagios Employee.
me.
me.