Nagios Command
-
raamardhani7
- Posts: 459
- Joined: Tue Jun 02, 2015 12:36 am
Re: Nagios Command
Thanks again, eloyd
have a nice weekend *^.^*
have a nice weekend *^.^*
-
raamardhani7
- Posts: 459
- Joined: Tue Jun 02, 2015 12:36 am
Re: Nagios Command
We will test and let you know.
Re: Nagios Command
Sounds good, let us know if you need any further assistance.
Former Nagios Employee
-
raamardhani7
- Posts: 459
- Joined: Tue Jun 02, 2015 12:36 am
Re: Nagios Command
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
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
Yes. See bottom of page 3, here https://assets.nagios.com/downloads/nrd ... 14565142471. Do we need to install nrdp.php on the each remote servers?
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?2. How would i receive above results from the each remote server with commands? I mean what is the syntax for this?
To clarify , did you install the NDRP client on 172.28.45.13? I ask because of question #1 -- thanks -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"
Be sure to check out the Knowledgebase for helpful articles and solutions!
-
raamardhani7
- Posts: 459
- Joined: Tue Jun 02, 2015 12:36 am
Re: Nagios Command
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
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
-
raamardhani7
- Posts: 459
- Joined: Tue Jun 02, 2015 12:36 am
Re: Nagios Command
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"
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
--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.
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.
Former Nagios employee
Re: Nagios Command
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:/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"
Code: Select all
grep authorized_tokens /usr/local/nrdp/server/config.inc.phpBe sure to check out our Knowledgebase for helpful articles and solutions!