Page 1 of 2

NRDP send command

Posted: Thu Aug 14, 2014 4:38 am
by tariqondego
I have NRDP server running at central.I have remote clients that need to send commands to the NRDP server and recieve results.Each client has send_nrdp.php installed.
How would i go about querying the server with commands? I mean what is the syntax for this?
And is there a way to schedule(autorun) this tasks,instead of having to type commands each time?

Please advise.

Re: NRDP send command

Posted: Thu Aug 14, 2014 8:38 pm
by sreinhardt
You can absolutely use something cron or scheduled tasks on windows to execute that. I would personally suggest using ncpa if you didn't want to manage it all manually and didn't mind an agent running on those systems. As for flags and usage, I will have to look in the morning when I am in the office. Otherwise you can always try to run it without anything and see what happens, or view the source, I seem to recall it being pretty straight forward.

Re: NRDP send command

Posted: Fri Aug 15, 2014 4:05 am
by tariqondego
Thanks,Cron will definately help.
below is how to use the client to send result:

Code: Select all

/usr/bin/php  /usr/local/nrdp/clients/send_nrdp.php --url=<url> --token=<token> --host=<hostname> --service=<servicename> --state=<state> --output=<output>
a couple of questions:
1.How come when I run the above command nothing happens but only displays the send_nrdp.php source code?
2.Rather than having to type in the --state and --output,i want to be able to pick the actual values of these two, from nagios for a specified host,is this possible?
3.The above syntax submits check data,what is the syntax to submit a command?

Please advise and thanks in advance.

Re: NRDP send command

Posted: Mon Aug 18, 2014 5:08 pm
by slansing
Can you show us an example of your send_nrdp.php command with the data filled out, and the output? I'd be interested in seeing what you are placing in there that might be causing that.

Re: NRDP send command

Posted: Wed Aug 20, 2014 5:13 am
by tariqondego

Code: Select all

/usr/bin/php /usr/local/nrdp/clients/send_nrdp.php --url=http://192.168.1.5/nrdp --token=asd7fjk3l34
--host=comp1 --service=ping --state=0 --output="The service looks okay"
Same as from http://assets.nagios.com/downloads/nrdp ... erview.pdf manual

I have two instances of 4.0.7 running followed the same installation procedure on both,but strangely on inst1 its working ok and showing usage information,and when i use the full command to send to inst2,seems to be working ok.But nothing is being received on inst2.

When i run the same command on inst2 it shows the source code.
Please advise.

Re: NRDP send command

Posted: Thu Aug 21, 2014 4:39 pm
by sreinhardt
So are you sending between two core systems, sending from two systems with nrdp installed to a core, or sending between two systems with just nrdp installed? Can you post the output that you are seeing from sending on both servers?

Re: NRDP send command

Posted: Thu Aug 28, 2014 4:26 am
by tariqondego
Yes I am sending between two core systems with nrdp server installed on both .

Re: NRDP send command

Posted: Thu Aug 28, 2014 2:39 pm
by lmiltchev
Can you run the following command on 192.168.1.5 box and show us the output?

Code: Select all

grep asd7fjk3l34 /usr/local/nrdp/server/config.inc.php
Note: Modify the path to the "config.inc.php" if you need to.

Re: NRDP send command

Posted: Fri Aug 29, 2014 1:37 am
by tariqondego
Output:
"asd7fjk3l34",

Point is when I send the service check to 192.168.1.5,nothing gets received.
IS there a way to check for this?
send_nrdp client is on 192.168.1.5, so is it supposed to write this results someplace eg nagios.cmd?
How does it handover this information to nagios?

Re: NRDP send command

Posted: Fri Aug 29, 2014 2:12 pm
by sreinhardt
The first place to look would be the apache access and error logs, on the system receiving the results. Something like:

Code: Select all

grep -i '/nrdp' /var/log/httpd/error_log
grep -i '/nrdp' /var/log/httpd/ssl_error_log
grep -i '/nrdp' /var/log/httpd/access_log
grep -i '/nrdp' /var/log/httpd/ssl_access_log