<div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>Hi John,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana><SPAN style="mso-tab-count: 1"> </SPAN>I think your problem is that you're defining "check_disk_sda5" in your checkcommands.cfg file, while it should be only in your "nrpe.cfg" file in each monitored instance. <o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana><SPAN style="mso-tab-count: 1"> </SPAN>The only checkcommand you should have for nrpe redirection is the following one:<o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><o:p><FONT face=Verdana> </FONT></o:p></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><I
style="mso-bidi-font-style: normal"><FONT face=Verdana>define command{<o:p></o:p></FONT></I></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><I style="mso-bidi-font-style: normal"><FONT face=Verdana><SPAN style="mso-tab-count: 1"> </SPAN>command_name<SPAN style="mso-tab-count: 1"> </SPAN>check_nrpe<o:p></o:p></FONT></I></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><I style="mso-bidi-font-style: normal"><FONT face=Verdana><SPAN style="mso-tab-count: 1"> </SPAN>command_line<SPAN style="mso-tab-count: 1"> </SPAN>$USER1$/check_nrpe -H $HOSTADDRESS$ -c $ARG1$<o:p></o:p></FONT></I></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><I style="mso-bidi-font-style: normal"><FONT face=Verdana>}<o:p></o:p></FONT></I></div> <div class=MsoPlainText style="MARGIN: 0in
0in 0pt"><A name=_MailAutoSig><SPAN style="mso-no-proof: yes"><o:p><FONT face=Verdana> </FONT></o:p></SPAN></A></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><SPAN style="mso-bookmark: _MailAutoSig"><SPAN style="mso-no-proof: yes"><FONT face=Verdana><SPAN style="mso-tab-count: 1"> </SPAN>This tells the system that for each service defined with a check_command like “check_nrpe!...” it should be redirected using that line.<o:p></o:p></FONT></SPAN></SPAN></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><SPAN style="mso-bookmark: _MailAutoSig"><SPAN style="mso-no-proof: yes"><FONT face=Verdana><SPAN style="mso-tab-count: 1"> </SPAN><o:p></o:p></FONT></SPAN></SPAN></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><SPAN style="mso-bookmark: _MailAutoSig"><SPAN style="mso-no-proof: yes"><FONT face=Verdana><SPAN style="mso-tab-count:
1"> </SPAN>After this server side configuration, you should only define the check_disk_sda5 in your target system (the one that would end up reporting the metric), and it should work.<o:p></o:p></FONT></SPAN></SPAN></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><SPAN style="mso-bookmark: _MailAutoSig"><SPAN style="mso-no-proof: yes"><FONT face=Verdana><SPAN style="mso-tab-count: 1"> </SPAN><o:p></o:p></FONT></SPAN></SPAN></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><SPAN style="mso-bookmark: _MailAutoSig"><SPAN style="mso-no-proof: yes"><FONT face=Verdana><SPAN style="mso-tab-count: 1"> </SPAN>Hope you make it with these information.<o:p></o:p></FONT></SPAN></SPAN></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><SPAN style="mso-bookmark: _MailAutoSig"><SPAN
style="mso-no-proof: yes"><FONT face=Verdana><SPAN style="mso-tab-count: 1"> </SPAN>Regards,<o:p></o:p></FONT></SPAN></SPAN></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><SPAN style="mso-bookmark: _MailAutoSig"><SPAN style="mso-no-proof: yes"><o:p><FONT face=Verdana> </FONT></o:p></SPAN></SPAN></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><SPAN style="mso-bookmark: _MailAutoSig"><SPAN style="mso-no-proof: yes"><FONT face=Verdana>Sebastian Ganame<o:p></o:p></FONT></SPAN></SPAN></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><SPAN style="mso-bookmark: _MailAutoSig"><SPAN style="mso-no-proof: yes"><o:p><FONT face=Verdana> </FONT></o:p></SPAN></SPAN></div><SPAN style="mso-bookmark: _MailAutoSig"></SPAN> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><o:p><FONT face=Verdana> </FONT></o:p></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT
face=Verdana>-----Original Message-----<BR>From: Jonathan Murray [mailto:jmurray@whoi.edu] <BR>Sent: Jueves, 31 de Mayo de 2007 01:47 p.m.<BR>To: Sebastian Ganame<BR>Cc: nagios-users@lists.sourceforge.net<BR>Subject: Re: [Nagios-users] NRPE: Command 'check_disk' not defined</FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><o:p><FONT face=Verdana> </FONT></o:p></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>Interesting. I'm still not getting it, or I'm doing something <o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>incorrectly. I have other commands set up the same way, and they work:<o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><o:p><FONT face=Verdana> </FONT></o:p></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>for example,<o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in
0pt"><o:p><FONT face=Verdana> </FONT></o:p></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>on nagios "engine"<o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><o:p><FONT face=Verdana> </FONT></o:p></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>in checkcommands.cfg:<o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><o:p><FONT face=Verdana> </FONT></o:p></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana># 'check_disk_c1'<o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>define command{<o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana><SPAN style="mso-spacerun: yes"> </SPAN>command_name<SPAN style="mso-spacerun: yes"> </SPAN>check_disk_c1<o:p></o:p></FONT></div>
<div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana><SPAN style="mso-spacerun: yes"> </SPAN>command_line<SPAN style="mso-spacerun: yes"> </SPAN>$USER1$/check_nrpe -H $HOSTADDRESS$ -c <o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>check_disk_c1<o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana><SPAN style="mso-spacerun: yes"> </SPAN>}<o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><o:p><FONT face=Verdana> </FONT></o:p></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>in services.cfg:<o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><o:p><FONT face=Verdana> </FONT></o:p></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>define
service{<o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana><SPAN style="mso-tab-count: 1"> </SPAN>use<SPAN style="mso-tab-count: 4"> </SPAN>generic-service<SPAN style="mso-tab-count: 2"> </SPAN>; Name of service template to use<o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana><SPAN style="mso-tab-count: 1"> </SPAN>host_name<SPAN style="mso-tab-count:
3"> </SPAN>varuna<o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana><SPAN style="mso-tab-count: 1"> </SPAN>service_description<SPAN style="mso-tab-count: 2"> </SPAN>Check /raid/c1 space<o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana><SPAN style="mso-tab-count: 1"> </SPAN>retry_check_interval<SPAN style="mso-tab-count: 2"> </SPAN>2<o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana><SPAN style="mso-tab-count: 1">
</SPAN>contact_groups<SPAN style="mso-tab-count: 3"> </SPAN>linux-admin<o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana><SPAN style="mso-tab-count: 1"> </SPAN>notification_options<SPAN style="mso-tab-count: 2"> </SPAN>w,c,r<o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana><SPAN style="mso-tab-count: 1"> </SPAN>check_command<SPAN style="mso-tab-count: 3"> </SPAN>check_disk_c1<o:p></o:p></FONT></div>
<div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana><SPAN style="mso-tab-count: 1"> </SPAN>}<o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><o:p><FONT face=Verdana> </FONT></o:p></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>on machine I am trying to monitor, in /usr/local/nagios/etc/nrpe.cfg:<o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><o:p><FONT face=Verdana> </FONT></o:p></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>command[check_disk_c1]=/usr/local/nagios/libexec/check_disk -w 20 -c 10 <o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>-p /raid<o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>/c1<o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in
0pt"><o:p><FONT face=Verdana> </FONT></o:p></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>On the web interface, in the status column I see the following:<o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>varuna Check /raid/c1 space<o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>OK <SPAN style="mso-tab-count: 1"> </SPAN>05-31-2007 12:21:11 <SPAN style="mso-tab-count: 1"> </SPAN>2d 5h 56m 0s <SPAN style="mso-tab-count: 1"> </SPAN>1/3 <SPAN style="mso-tab-count: 1"> </SPAN>DISK OK - free space: <o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>/raid/c1 114527 MB (16% inode=99%):<o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><o:p><FONT
face=Verdana> </FONT></o:p></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>So in this case, which is the same as the earlier description, it works. <o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana><SPAN style="mso-spacerun: yes"> </SPAN>Here the machine being monitored is a debian system, but I didn't <o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>think that would make such a difference.<o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><o:p><FONT face=Verdana> </FONT></o:p></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>I have also set up the command as you specified, or how I interpreted <o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>what you specified, I hope I was accurate here:<o:p></o:p></FONT></div> <div
class=MsoPlainText style="MARGIN: 0in 0in 0pt"><o:p><FONT face=Verdana> </FONT></o:p></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>Nagios "engine"<o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>in services.cfg:<o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><o:p><FONT face=Verdana> </FONT></o:p></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>define service{<o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana><SPAN style="mso-tab-count: 1"> </SPAN>use<SPAN style="mso-tab-count: 4"> </SPAN>generic-service<SPAN
style="mso-tab-count: 2"> </SPAN>; Name of service template to use<o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana><SPAN style="mso-tab-count: 1"> </SPAN>host_name<SPAN style="mso-tab-count: 3"> </SPAN>paleo<o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana><SPAN style="mso-tab-count: 1"> </SPAN>service_description<SPAN style="mso-tab-count: 2"> </SPAN>check disk sda5<o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana><SPAN
style="mso-tab-count: 1"> </SPAN>retry_check_interval<SPAN style="mso-tab-count: 2"> </SPAN>2<o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana><SPAN style="mso-tab-count: 1"> </SPAN>contact_groups<SPAN style="mso-tab-count: 3"> </SPAN>linux-admin<o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana><SPAN style="mso-tab-count: 1"> </SPAN>notification_options<SPAN style="mso-tab-count: 2"> </SPAN>w,u,c,r<o:p></o:p></FONT></div> <div
class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana><SPAN style="mso-tab-count: 1"> </SPAN>check_command<SPAN style="mso-tab-count: 3"> </SPAN>check_nrpe!check_disk_sda5!20%!10%!/<o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana><SPAN style="mso-tab-count: 1"> </SPAN>}<o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><o:p><FONT face=Verdana> </FONT></o:p></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>In the above, I don't know what that / is doing after the !, but it was <o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>in your mail, so I thought it
was needed.<o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><o:p><FONT face=Verdana> </FONT></o:p></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>in checkcommands.cfg:<o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><o:p><FONT face=Verdana> </FONT></o:p></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana><SPAN style="mso-spacerun: yes"> </SPAN>'check_disk_sda5'<o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>define command{<o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana><SPAN style="mso-tab-count: 1"> </SPAN>command_name<SPAN style="mso-spacerun: yes"> </SPAN>check_disk_sda5<o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana><SPAN
style="mso-spacerun: yes"> </SPAN>command_line<SPAN style="mso-spacerun: yes"> </SPAN>$USER1$/check_nrpe -H $HOSTADDRESS$ -c <o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>check_disk_sda5<o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana><SPAN style="mso-spacerun: yes"> </SPAN>}<o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><o:p><FONT face=Verdana> </FONT></o:p></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>On the machine I am trying to get information on the disk sda5,<o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>command[check_disk_sda5]=/usr/local/nagios/libexec/check_disk -w 20 -c <o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN:
0in 0in 0pt"><FONT face=Verdana>10 -p /dev/sda5<o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><o:p><FONT face=Verdana> </FONT></o:p></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>It would seem here that on the machine being monitored, the command <o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>"check_disk_sda5" would use the local plugin <o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>/usr/local/nagios/libexec/check_disk with the options:<o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>-w 20 -c 10 -p /dev/sda5<o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><o:p><FONT face=Verdana> </FONT></o:p></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>run locally, this is indeed what it seems to do. However,
the server <o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>doesn't seem to use the command I have placed in the nrpe.cfg file.<o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><o:p><FONT face=Verdana> </FONT></o:p></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>On the web interface, this returns, in the "Status" column:<o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><o:p><FONT face=Verdana> </FONT></o:p></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>NRPE v2.7.1<o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><o:p><FONT face=Verdana> </FONT></o:p></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>What do you use for your entries in you checkcommands.cfg for your <o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in
0pt"><FONT face=Verdana>commands? I was under the impression that I had to define the commands <o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>there and nagios would use them.<o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><o:p><FONT face=Verdana> </FONT></o:p></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>Perhaps these questions are getting too basic?<o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><o:p><FONT face=Verdana> </FONT></o:p></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>Thanks,<o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><o:p><FONT face=Verdana> </FONT></o:p></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>Jonathan<o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT
face=Verdana>Sebastian Ganame wrote:<o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>> Hi John,<o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>><SPAN style="mso-spacerun: yes"> </SPAN>Your problem is that you're trying to invoke a service that is not <o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>> local, thus it shouldn be defined not only in your Nagios server <o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>> configuration files, but also in the nrpe.cfg file used when the nrpe <o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>> daemon starts on the target machine.<o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>><SPAN
style="mso-spacerun: yes"> </SPAN>I'll try to explain just a little bit what I did since I suffered <o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>> the same situation:<o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>><SPAN style="mso-spacerun: yes"> </SPAN><o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>><SPAN style="mso-spacerun: yes"> </SPAN>1) Define a new service in Nagios Engine for monitoring non-local <o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>> disks, as follows:<o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>><SPAN style="mso-spacerun: yes"> </SPAN><o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT
face=Verdana>> define service{<o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>><SPAN style="mso-spacerun: yes"> </SPAN>use<SPAN style="mso-spacerun: yes"> </SPAN>local-service ;Name of service <o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>> template to use<o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>><SPAN style="mso-spacerun: yes"> </SPAN>host_name<SPAN style="mso-spacerun: yes"> </SPAN>/[the servers in which you have nrpe <o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>>
installed]/<o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>> /<SPAN style="mso-spacerun: yes"> </SPAN>/service_description<SPAN style="mso-spacerun: yes"> </SPAN>Remote check disk<o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>><SPAN style="mso-spacerun: yes"> </SPAN>check_command<SPAN style="mso-spacerun: yes"> </SPAN>check_nrpe!check_hda1!20%!10%!/<o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>> }<o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>><SPAN style="mso-spacerun: yes"> </SPAN>2) I used check_hda1 instead of check_disk to identify the way I <o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT
face=Verdana>> use this in the target machines. Then you need to include this type of <o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>> call in your target machine's nrpe.cfg file, as follows (at the very end):<o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>><SPAN style="mso-spacerun: yes"> </SPAN><o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>> # The following examples use hardcoded command arguments...<o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>> command[check_hda1]=/usr/local/nagios/libexec/check_disk -w 20 -c 10 -p <o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>> /dev/hda1<o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>><SPAN style="mso-spacerun:
yes"> </SPAN>This way, nrpe tells the target machine to call it's <o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>> /usr/local/nagios/libexec/check_disk command when the Nagios core engine <o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>> calls check_nrpe!check_hda1 on this target machine.<o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>><SPAN style="mso-spacerun: yes"> </SPAN><o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>><SPAN style="mso-spacerun: yes"> </SPAN>Hope it helps, and most important that you understand what I tried <o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>> to tell you ;-)<o:p></o:p></FONT></div> <div class=MsoPlainText
style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>><SPAN style="mso-spacerun: yes"> </SPAN>Regards,<o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>><SPAN style="mso-spacerun: yes"> </SPAN><o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>><SPAN style="mso-spacerun: yes"> </SPAN><o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>> Sebastian Ganame<o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>><SPAN style="mso-spacerun: yes"> </SPAN><o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>><SPAN style="mso-spacerun: yes"> </SPAN><o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>> -----Original Message-----<o:p></o:p></FONT></div>
<div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>> From: nagios-users-bounces@lists.sourceforge.net <o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>> [mailto:nagios-users-bounces@lists.sourceforge.net] On Behalf Of <o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>> Jonathan Murray<o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>> Sent: Miércoles, 30 de Mayo de 2007 07:49 p.m.<o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>> To: nagios-users@lists.sourceforge.net<o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>> Subject: [Nagios-users] NRPE: Command 'check_disk' not defined<o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>><SPAN
style="mso-spacerun: yes"> </SPAN><o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>> I've been staring at this for a long time, likely pilot error, but maybe<o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>> someone has suggestions or sees something I don't...thanks.<o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>><SPAN style="mso-spacerun: yes"> </SPAN><o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>> Nagios server version 2.8, (OS debian)<o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>> Nagios plugin version 1.4.7 (Red Hat Enterprise Linux WS release 4)<o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>> NRPE version 2.7.1<o:p></o:p></FONT></div> <div
class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>><SPAN style="mso-spacerun: yes"> </SPAN><o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>> other plugins work (check_swap, check_load)<o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>><SPAN style="mso-spacerun: yes"> </SPAN><o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>> On nagios server:<o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>><SPAN style="mso-spacerun: yes"> </SPAN><o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>> /usr/local/nagios/etc/checkcommands.cfg<o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>><SPAN style="mso-spacerun: yes"> </SPAN><o:p></o:p></FONT></div>
<div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>> <-snip-><o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>><SPAN style="mso-spacerun: yes"> </SPAN><o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>> # check_disk<o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>> define command{<o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>><SPAN style="mso-spacerun: yes"> </SPAN>command_name<SPAN style="mso-spacerun: yes"> </SPAN>check_disk<o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>><SPAN style="mso-spacerun: yes"> </SPAN>command_line<SPAN style="mso-spacerun:
yes"> </SPAN>$USER1$/check_nrpe -H $HOSTADDRESS$ -c check_disk<o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>><SPAN style="mso-spacerun: yes"> </SPAN>}<o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>><SPAN style="mso-spacerun: yes"> </SPAN><o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>> <-snip-><o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>><SPAN style="mso-spacerun: yes"> </SPAN><o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>> On the machine I'm trying to monitor, the one running nrpe 2.7.1 with<o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>> the Nagios plugin version
1.4.7 (Red Hat Enterprise Linux WS release 4),<o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>> in /usr/local/nagios/libexec/etc/nrpe.cfg:<o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>><SPAN style="mso-spacerun: yes"> </SPAN><o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>> [root@paleo etc]# ls -la<o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>> total 28<o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>> drwxr-xr-x<SPAN style="mso-spacerun: yes"> </SPAN>2 nagios nagios 4096 May 30 17:03 .<o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>> drwxr-xr-x<SPAN style="mso-spacerun: yes"> </SPAN>6 nagios nagios 4096 May 30 17:13 ..<o:p></o:p></FONT></div>
<div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>> -rwxr-xr-x<SPAN style="mso-spacerun: yes"> </SPAN>1 nagios nagios 7536 May 30 17:03 nrpe.cfg<o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>><SPAN style="mso-spacerun: yes"> </SPAN><o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>> <-snip-><o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>><SPAN style="mso-spacerun: yes"> </SPAN><o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>> command[check_disk]=/usr/local/nagios/libexec/check_disk -w 20 -c 10 -p<o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>> /dev/sda5<o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>><SPAN
style="mso-spacerun: yes"> </SPAN><o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>> <-snip-><o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>><SPAN style="mso-spacerun: yes"> </SPAN><o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>> when I test it from the server "nagios" it works fine:<o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>><SPAN style="mso-spacerun: yes"> </SPAN><o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>> root@nagios:/usr/local/nagios/libexec# ./check_nrpe -H paleo -c check_disk<o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>> DISK OK - free space: / 201921 MB (93% inode=99%);|<o:p></o:p></FONT></div> <div class=MsoPlainText
style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>> /=14918MB;228424;228434;0;22 8444<o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>><SPAN style="mso-spacerun: yes"> </SPAN><o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>> on the system running nrpe "paleo":<o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>><SPAN style="mso-spacerun: yes"> </SPAN><o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>> [root@paleo etc]# /usr/local/nagios/libexec/check_disk -w 20 -c 10 -p<o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>> /dev/sda5<o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>> DISK OK - free space: / 201921 MB (93% inode=99%);|<o:p></o:p></FONT></div> <div
class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>> /=14918MB;228424;228434;0;228444<o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>><SPAN style="mso-spacerun: yes"> </SPAN><o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>> If NRPE, Command 'check_disk' not defined as the web interface reports,<o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>> then where should it be defined? I thought I needed to define the<o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>> command in the checkcommands.cfg on the server, then define the command<o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>> on the client that is running nrpe daemon.<o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in
0pt"><FONT face=Verdana>><SPAN style="mso-spacerun: yes"> </SPAN><o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>> thanks for any ideas,<o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>><SPAN style="mso-spacerun: yes"> </SPAN><o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>> Jonathan Murray<o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>><SPAN style="mso-spacerun: yes"> </SPAN><o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>><SPAN style="mso-spacerun: yes"> </SPAN><o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>><SPAN style="mso-spacerun: yes"> </SPAN><o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT
face=Verdana>><SPAN style="mso-spacerun: yes"> </SPAN><o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>><SPAN style="mso-spacerun: yes"> </SPAN><o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>><SPAN style="mso-spacerun: yes"> </SPAN><o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>> -------------------------------------------------------------------------<o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>> This SF.net email is sponsored by DB2 Express<o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>> Download DB2 Express C - the FREE version of DB2 express and take<o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>> control of your XML. No limits. Just
data. Click to get it now.<o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>> http://sourceforge.net/powerbar/db2/<o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>> _______________________________________________<o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>> Nagios-users mailing list<o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>> Nagios-users@lists.sourceforge.net<o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>> https://lists.sourceforge.net/lists/listinfo/nagios-users<o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>> ::: Please include Nagios version, plugin version (-v) and OS when <o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT
face=Verdana>> reporting any issue.<o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>> ::: Messages without supporting info will risk being sent to /dev/null<o:p></o:p></FONT></div> <div class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>><SPAN style="mso-spacerun: yes"> </SPAN></FONT><o:p></o:p></div> <div> </div><p>
<hr size=1>
<b>Preguntá. Respondé. Descubrí.</b><br>
Todo lo que querías saber, y lo que ni imaginabas,<br>
está en <b>Yahoo! Respuestas</b> (Beta).<br>
<b><a href="http://ar.answers.yahoo.com">Probalo ya!</a></b>