Help with Nagios Script
HI!
first of all my apologies due to my poor English, is not lenguage I have a little problem with a script that i use to send email messages regarding service status. all process to sent and receive is ok, but the body of the message is not complete, below theres an example Notificacion de tipo: PROBLEM Equipo: Server (CPU) Servicio: CRITICAL Estado actual: busy <<<<<<<<<<<<<<< in the line with "busy" must be show also a percentaje for the critical message and another stuff that the plugin shows as result but i just receive only one word My question is, is there some command line or instruccion on the perl script who is limiting the characters ??? I am not an Expert on perl or linux, so is difficult to me try to understand the code of the sript the scrip that i use is the following #!/usr/bin/perl use Net::SMTP; $destinatario=$ARGV[0]; $tipo=$ARGV[1]; $host=$ARGV[2]; $svname=$ARGV[3]; $status=$ARGV[4]; $ip=$ARGV[5]; $sdesc=$ARGV[6]; $smtp= Net::SMTP-> new("mailserver"); $smtp->mail("nagios@mydomain.com"); $smtp->to("$destinatario"); $smtp->data(); $smtp->datasend("To: $destinatario\n"); $smtp->datasend("subject: NAGIOS - $tipo: $host $svname estado $status\n"); $smtp->datasend("Notificacion de tipo: $tipo\n"); $smtp->datasend("Equipo: $host ($ip)\n"); $smtp->datasend("Servicio: $svname\n"); $smtp->datasend("Estado actual: $sdesc $status\n"); $smtp->dataend(); $smtp->quit; thanks in advance for any help |
Just off the top of my head... if the $status argument being passed in contains for example: "%90", it may get interpreted as a hash that doesn't exist, you may need to validate the input.
cheers |
This is a sub I use for sending emails from Perl;
Code:
#****************************************************************************** |
All times are GMT -5. The time now is 12:19 AM. |