Page 2 of 3

Re: Nagios Command

Posted: Fri Apr 15, 2016 8:45 am
by raamardhani7
Thanks again, eloyd
have a nice weekend *^.^*

Re: Nagios Command

Posted: Fri Apr 15, 2016 9:55 am
by rkennedy
Are we good to mark this thread as resolved?

Re: Nagios Command

Posted: Fri Apr 15, 2016 10:09 am
by raamardhani7
We will test and let you know.

Re: Nagios Command

Posted: Fri Apr 15, 2016 10:17 am
by rkennedy
Sounds good, let us know if you need any further assistance.

Re: Nagios Command

Posted: Mon Apr 18, 2016 4:13 pm
by raamardhani7
Hi,

I have installed NRDP on the Nagios XI server. However, I'd like to send some command to the NRDP server and receive below results from remote server.
OK, mccdev, MCCD13X, ONLINE INCREMENTAL completed on 04/13/16 at 20.15.30 in 00.15.08 h.m.s.
OK, mccqa, MCCQ13X, ONLINE INCREMENTAL completed on 04/13/16 at 20.17.56 in 00.01.07 h.m.s.
OK, mccref, MCCR13X, ONLINE INCREMENTAL completed on 04/13/16 at 20.20.47 in 00.01.34 h.m.s.
OK, mcctrain, MCCT13X, ONLINE INCREMENTAL completed on 04/13/16 at 20.23.28 in 00.01.06 h.m.s.
OK, plmdev, PLMD14X, ONLINE INCREMENTAL completed on 04/13/16 at 20.27.59 in 00.02.52 h.m.s.
OK, plmqa, PLMQ14X, ONLINE INCREMENTAL completed on 04/13/16 at 20.32.30 in 00.03.06 h.m.s.
OK, plmref, PLMR14X, ONLINE INCREMENTAL completed on 04/13/16 at 20.35.26 in 00.01.22 h.m.s.
OK, plmsand, PLMS14X, ONLINE INCREMENTAL completed on 04/13/16 at 20.42.07 in 00.05.10 h.m.s.
OK, plmstag, STG14X, ONLINE INCREMENTAL completed on 04/13/16 at 20.47.34 in 00.04.06 h.m.s.
OK, plmtrain, PLMT14X, ONLINE INCREMENTAL completed on 04/13/16 at 21.02.04 in 00.12.39 h.m.s.


Here are my questions:
1. Do we need to install nrdp.php on the each remote servers?
2. How would i receive above results from the each remote server with commands? I mean what is the syntax for this?
3. Once I typed the below command, I did not receive any result:
/usr/bin/php /usr/local/nrdp/clients/send_nrdp.php --url=http://10.10.83.90/nrdp --token=asd7fjk3l34 --host==172.28.45.13 --service=ping --state=0 --output="The service looks okay"

note: 10.10.83.90: NRPD server
172.28.45.13: remote server

Re: Nagios Command

Posted: Mon Apr 18, 2016 5:04 pm
by bwallace
1. Do we need to install nrdp.php on the each remote servers?
Yes. See bottom of page 3, here https://assets.nagios.com/downloads/nrd ... 1456514247
2. How would i receive above results from the each remote server with commands? I mean what is the syntax for this?
As tmcdonald mentioned, "The way around this is to run this as a passive check on a cron, and write directly to the nagios.cmd file to generate an alert for each match" he posted links with examples. Can you post what you have thus far?
3. Once I typed the below command, I did not receive any result:
/usr/bin/php /usr/local/nrdp/clients/send_nrdp.php --url=http://10.10.83.90/nrdp --token=asd7fjk3l34 --host==172.28.45.13 --service=ping --state=0 --output="The service looks okay"
To clarify , did you install the NDRP client on 172.28.45.13? I ask because of question #1 -- thanks -

Re: Nagios Command

Posted: Mon Apr 18, 2016 5:46 pm
by raamardhani7
OK. I will install on the remote server. However, I'd like to clarify one thing.

If I'd like to generate alert for each line of below file using NRDP. Would there be any problem?

OK, mccdev, MCCD13X, ONLINE INCREMENTAL completed on 04/13/16 at 20.15.30 in 00.15.08 h.m.s.
OK, mccqa, MCCQ13X, ONLINE INCREMENTAL completed on 04/13/16 at 20.17.56 in 00.01.07 h.m.s.
OK, mccref, MCCR13X, ONLINE INCREMENTAL completed on 04/13/16 at 20.20.47 in 00.01.34 h.m.s.
OK, mcctrain, MCCT13X, ONLINE INCREMENTAL completed on 04/13/16 at 20.23.28 in 00.01.06 h.m.s.
OK, plmdev, PLMD14X, ONLINE INCREMENTAL completed on 04/13/16 at 20.27.59 in 00.02.52 h.m.s.
OK, plmqa, PLMQ14X, ONLINE INCREMENTAL completed on 04/13/16 at 20.32.30 in 00.03.06 h.m.s.
OK, plmref, PLMR14X, ONLINE INCREMENTAL completed on 04/13/16 at 20.35.26 in 00.01.22 h.m.s.
OK, plmsand, PLMS14X, ONLINE INCREMENTAL completed on 04/13/16 at 20.42.07 in 00.05.10 h.m.s.
OK, plmstag, STG14X, ONLINE INCREMENTAL completed on 04/13/16 at 20.47.34 in 00.04.06 h.m.s.
OK, plmtrain, PLMT14X, ONLINE INCREMENTAL completed on 04/13/16 at 21.02.04 in 00.12.39 h.m.s

Re: Nagios Command

Posted: Tue Apr 19, 2016 9:12 am
by raamardhani7
Hi,
I have installed NRDP on the Nagios XI (10.10.83.90) and remote (172.28.45.13) servers. However, once I typed the below command, I did not receive any result:
/usr/bin/php /usr/local/nrdp/clients/send_nrdp.php --url=http://10.10.83.90/nrdp --token=asd7fjk3l34 --host==172.28.45.13 --service=ping --state=0 --output="The service looks okay"

Re: Nagios Command

Posted: Tue Apr 19, 2016 2:02 pm
by tmcdonald
--host==172.28.45.13
Was that a typo? I don't know if double-equals will matter but just to make sure, can you confirm whether you had a single or double?

Update: To address your previous question, you can certainly do this using the method I described before, otherwise you will need to either send each line to a different service, or set up a single service as a volatile service:

https://assets.nagios.com/downloads/nag ... vices.html

That, or use Nagios Logserver for this sort of thing, which is much better suited for parsing log entries.

Re: Nagios Command

Posted: Tue Apr 19, 2016 2:09 pm
by lmiltchev
/usr/bin/php /usr/local/nrdp/clients/send_nrdp.php --url=http://10.10.83.90/nrdp --token=asd7fjk3l34 --host==172.28.45.13 --service=ping --state=0 --output="The service looks okay"
Is this a typo? It should be:
/usr/bin/php /usr/local/nrdp/clients/send_nrdp.php --url=http://10.10.83.90/nrdp --token=asd7fjk3l34 --host=172.28.45.13 --service=ping --state=0 --output="The service looks okay"
Also, can you verify this is a valid token? To check, run the following command from the CLI on 10.10.83.90:

Code: Select all

grep authorized_tokens /usr/local/nrdp/server/config.inc.php