Herramientas de usuario

Herramientas del sitio


manuales:nagios:capacitacion:anexo_-_comandos_externos

Diferencias

Muestra las diferencias entre dos versiones de la página.

Enlace a la vista de comparación

Ambos lados, revisión anteriorRevisión previa
manuales:nagios:capacitacion:anexo_-_comandos_externos [2015/10/16 15:02] cayumanuales:nagios:capacitacion:anexo_-_comandos_externos [2015/10/16 15:05] (actual) cayu
Línea 36: Línea 36:
  
 /bin/printf "[%lu] ACKNOWLEDGE_SVC_PROBLEM;host1;service1;2;1;1;Some One;Some Acknowledgement Comment\n" $now > $commandfile /bin/printf "[%lu] ACKNOWLEDGE_SVC_PROBLEM;host1;service1;2;1;1;Some One;Some Acknowledgement Comment\n" $now > $commandfile
 +</code>
 +==== ADD_HOST_COMMENT ====
 +Command Format:
 +ADD_HOST_COMMENT;<host_name>;<persistent>;<author>;<comment>
 +
 +Description:
 +Adds a comment to a particular host. If the "persistent" field is set to zero (0), the comment will be deleted the next time Nagios is restarted. Otherwise, the comment will persist across program restarts until it is deleted manually.
 +
 +
 +Shell Script Usage Example:
 +<code bash>
 +#!/bin/sh
 +# This is a sample shell script showing how you can submit the ADD_HOST_COMMENT command
 +# to Nagios.  Adjust variables to fit your environment as necessary.
 +
 +now=`date +%s`
 +commandfile='/usr/local/nagios/var/rw/nagios.cmd'
 +
 +/bin/printf "[%lu] ADD_HOST_COMMENT;host1;1;Some Author;This is a test comment\n" $now > $commandfile
 +</code>
 +
 +==== ADD_SVC_COMMENT ====
 +
 +Command Format:
 +ADD_SVC_COMMENT;<host_name>;<service_description>;<persistent>;<author>;<comment>
 +
 +Description:
 +Adds a comment to a particular service. If the "persistent" field is set to zero (0), the comment will be deleted the next time Nagios is restarted. Otherwise, the comment will persist across program restarts until it is deleted manually.
 +
 +
 +Shell Script Usage Example:
 +<code bash>
 +#!/bin/sh
 +# This is a sample shell script showing how you can submit the ADD_SVC_COMMENT command
 +# to Nagios.  Adjust variables to fit your environment as necessary.
 +
 +now=`date +%s`
 +commandfile='/usr/local/nagios/var/rw/nagios.cmd'
 +
 +/bin/printf "[%lu] ADD_SVC_COMMENT;host1;service1;1;Some Author;This is a test comment\n" $now > $commandfile
 </code> </code>
 ===== Referencias ===== ===== Referencias =====
 https://old.nagios.org/developerinfo/externalcommands/commandlist.php https://old.nagios.org/developerinfo/externalcommands/commandlist.php
manuales/nagios/capacitacion/anexo_-_comandos_externos.1445007776.txt.gz · Última modificación: 2015/10/16 15:02 por cayu