Build precise queries to find exactly what you need
Press ESC to close
Nagios World Conference 2026: Sept. 14-17 in St. Paul, MN | Learn More
Your review has been submitted and is pending approval.
Send data to nrpd in nagios using php libraries and CURL
Current Version
0.1
Last Release Date
2016-09-07
Owner
Andres
Download URL
https://exchange.nagios.org/wp-content/uploads/project-files/2016/09/send_curl_nrdp.php
License
GPL
Compatible With
After setting up nagios nrpd: NRDP - Nagios Remote Data Processor http://localhost/directory/Addons/Passive-Checks/NRDP--2D-Nagios-Remote-Data-Processor/details
This script allows to report in nagios through NRPD data. This script is based on php libraries and curl Advantages of this script: - Supports HTTP and HTTPS - Supports basic web user name and password, if configured for example in APACHE - Report individual host and service information
Examples: Uso: send_curl_nrdp.php --url=<url> --token=<token> --host=<hostname> --service=<servicename> --tipo=<tipo> --state=<state> --output=<output> --httpuser=<user:pass> <url> = URL al NRDP finalizando con / ejemplo: http://x.x.x.x/nrdp/ <token> = Token registrado en el NRDP. <hostname> = Host asociado en nagios. <servicename> = Servicio asociado en nagios. <tipo> = Reportar : 1=Check del Host, 2=Check de servicio. <state> = Estado a retornar, 0=OK,1=Warning,2=Critical,3=Unknown. <output> = Usar comillas dobles: "Mensaje con dato | Perfdata". <httpuser> = Si se necesita usuario:password, en otro caso dejar vacio".
Ejemplo: /usr/bin/php /usr/local/nrdp/clients/send_curl_nrdp.php --url=http://192.168.0.60/nrdp/ --token=token_otro --hostname=host-pasive --servicename=check_pasivo --tipo=1 --state=0 --output="Check ejecutado correctamente | perfdata" --httpuser=""
Ejemplo servicio: Token Error token /usr/bin/php send_curl_nrdp.php --url=http://192.168.0.60/nrdp/ --token=error --hostname=host-pasive --servicename=check_pasivo --tipo=2 --state=0 --output="Check ejecutado correctamente | perfdate" --httpuser="" status=-1,message=BAD TOKEN
Ejemplo host: Token bueno /usr/bin/php send_curl_nrdp.php --url=http://192.168.0.60/nrdp/ --token=token_otro --hostname=host-pasive --servicename=misc_check_pasivo --tipo=1 --state=0 --output="Check ejecutado correctamente | perfdate" --httpuser="" status=0,message=OK,meta=1 checks processed.
Ejemplo servicio: Token bueno /usr/bin/php send_curl_nrdp.php --url=http://192.168.0.60/nrdp/ --token=token_otro --hostname=host-pasive --servicename=check_pasivo --tipo=2 --state=0 --output="Check ejecutado correctamente | perfdate" --httpuser="" status=0,message=OK,meta=1 checks processed.
Ejemplo servicio: Token bueno HTTPS /usr/bin/php send_curl_nrdp.php --url=https://192.168.0.60/nrdp/ --token=token_otro --hostname=host-pasive --servicename=check_pasivo --tipo=2 --state=0 --output="Check ejecutado correctamente | perfdate" --httpuser="" status=0,message=OK,meta=1 checks processed.
Ejemplo servicio: Token bueno y usuario/password web /usr/bin/php send_curl_nrdp.php --url=http://192.168.0.60/nrdp/ --token=token_otro --hostname=host-pasive --servicename=check_pasivo --tipo=2 --state=0 --output="Check ejecutado correctamente | perfdate" --httpuser="srvnrdp:labsrvnrdp2k16" status=0,message=OK,meta=1 checks processed.
You must be logged in to submit a review.
To:
From: