NRDP send command
-
- Posts: 85
- Joined: Fri Mar 28, 2014 6:18 am
NRDP send command
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.
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.
-
- -fno-stack-protector
- Posts: 4366
- Joined: Mon Nov 19, 2012 12:10 pm
Re: NRDP send command
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.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
-
- Posts: 85
- Joined: Fri Mar 28, 2014 6:18 am
Re: NRDP send command
Thanks,Cron will definately help.
below is how to use the client to send result:
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.
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>
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.
-
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: NRDP send command
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.
-
- Posts: 85
- Joined: Fri Mar 28, 2014 6:18 am
Re: NRDP send command
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"
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.
-
- -fno-stack-protector
- Posts: 4366
- Joined: Mon Nov 19, 2012 12:10 pm
Re: NRDP send command
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?
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
-
- Posts: 85
- Joined: Fri Mar 28, 2014 6:18 am
Re: NRDP send command
Yes I am sending between two core systems with nrdp server installed on both .
Re: NRDP send command
Can you run the following command on 192.168.1.5 box and show us the output?
Note: Modify the path to the "config.inc.php" if you need to.
Code: Select all
grep asd7fjk3l34 /usr/local/nrdp/server/config.inc.php
Be sure to check out our Knowledgebase for helpful articles and solutions!
-
- Posts: 85
- Joined: Fri Mar 28, 2014 6:18 am
Re: NRDP send command
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?
"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?
-
- -fno-stack-protector
- Posts: 4366
- Joined: Mon Nov 19, 2012 12:10 pm
Re: NRDP send command
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
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.