Search Exchange

Search All Sites

Nagios Live Webinars

Let our experts show you how Nagios can help your organization.

Contact Us

Phone: 1-888-NAGIOS-1
Email: sales@nagios.com

Login

Remember Me

Directory Tree

send_curl_nrdp

Rating
0 votes
Favoured:
0
Current Version
0.1
Last Release Date
2016-09-07
Compatible With
  • Nagios 3.x
  • Nagios 4.x
  • Nagios XI
Owner
License
GPL
Hits
6349
Files:
FileDescription
send_curl_nrdp.phpsend_curl_nrdp.php
Nagios CSP

Meet The New Nagios Core Services Platform

Built on over 25 years of monitoring experience, the Nagios Core Services Platform provides insightful monitoring dashboards, time-saving monitoring wizards, and unmatched ease of use. Use it for free indefinitely.

Monitoring Made Magically Better

  • Nagios Core on Overdrive
  • Powerful Monitoring Dashboards
  • Time-Saving Configuration Wizards
  • Open Source Powered Monitoring On Steroids
  • And So Much More!
Send data to nrpd in nagios using php libraries and CURL
After setting up nagios nrpd:
NRDP - Nagios Remote Data Processor
https://exchange.nagios.org/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= --token= --host= --service= --tipo= --state= --output= --httpuser=
= URL al NRDP finalizando con / ejemplo: http://x.x.x.x/nrdp/
= Token registrado en el NRDP.
= Host asociado en nagios.
= Servicio asociado en nagios.
= Reportar : 1=Check del Host, 2=Check de servicio.
= Estado a retornar, 0=OK,1=Warning,2=Critical,3=Unknown.
= Usar comillas dobles: "Mensaje con dato | Perfdata".
= 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.