Re: [Nagios-users] RES: Nagios do not send e.mails

2006-08-01 Thread Felipe Tocchetto
What is the OS that Nagios is installed?

2006/7/31, Marcos Marinho <[EMAIL PROTECTED]>:
>
>
>
> Yes, Mike ,
>
> In the nagios.cfg there is a line config like this :
> enable_notifications=1
>
> Is this right ?
>
> Thanks for your cooperation
>
>
> [Marcos Marinho]  -Mensagem original-
> De: Mike Koponick [mailto:[EMAIL PROTECTED]
> Enviada em: segunda-feira, 31 de julho de 2006 18:58
> Para: [EMAIL PROTECTED];
> nagios-users@lists.sourceforge.net
> Assunto: RE: [Nagios-users] Nagios do not send e.mails
>
>
>
> Are notifications turned on in the nagios.cfg file?
>
> Mike
>
>
>
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On
> Behalf Of Marcos Marinho
> Sent: Monday, July 31, 2006 2:57 PM
> To: nagios-users@lists.sourceforge.net
> Subject: [Nagios-users] Nagios do not send e.mails
>
> I had installed the version 2.4 by binary way and we had using NagiosQL to
> configure.
>
> The servers had been monitored ok
>
> In all time that nagios was installed here  none of the serves had not been
> down any moment
>
> On the first server down one, the nagios process did not send any e.mail
> using the pre-configured scritp host-notify-by-email.
>
> Whe I had tried runnig the script using user nagios the message was sent
> with no problem.
>
> This is what is showed in nagio.log
>
> [1154056710] HOST ALERT: marcos;DOWN;SOFT;1;CRITICAL - Plugin timed out
> after 10 seconds
>
> [1154056720] HOST ALERT: marcos;DOWN;SOFT;2;CRITICAL - Plugin timed out
> after 10 seconds
>
> [1154056730] HOST ALERT: marcos;DOWN;SOFT;3;CRITICAL - Plugin timed out
> after 10 seconds
>
> [1154056740] HOST ALERT: marcos;DOWN;SOFT;4;CRITICAL - Plugin timed out
> after 10 seconds
>
> [1154056750] HOST ALERT: marcos;DOWN;HARD;5;CRITICAL - Plugin timed out
> after 10 seconds
>
> This is our configuration files
>
> 
>
> define  host {
>
> host_name   marcos
>
> alias   Workstation Marcos
>
> address 10.10.21.18
>
> parents Debian
>
> check_command   check-host-alive
>
> max_check_attempts  5
>
> check_interval  10
>
> active_checks_enabled   1
>
> passive_checks_enabled  1
>
> check_period24x7
>
> obsess_over_host1
>
> check_freshness 1
>
> freshness_threshold 360
>
> event_handler_enabled   0
>
> flap_detection_enabled  0
>
> process_perf_data   1
>
> retain_status_information   1
>
> retain_nonstatus_information1
>
> contact_groups  admins
>
> notification_interval   5
>
> notification_period 24x7
>
> notification_optionsd,u
>
> notifications_enabled   1
>
> stalking_optionsd,u
>
> register1
>
> }
>
> 
>
> define  command {
>
> command_namehost-notify-by-email
>
> command_line/usr/bin/printf \\"%b\\" \\"* Nagios
> *\n\nNotification Type: $NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nState:
> $HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo: $HOSTOUTPUT$\n\nDate/Time:
> $LONGDATETIME$\n\\" | /usr/bin/mail -s \\"Host $HOSTSTATE$ alert for
> $HOSTNAME$!\\" $CONTACTEMAIL$
>
> }
>
> 
>
> define  contactgroup {
>
> contactgroup_name   admins
>
> alias   Nagios Administrators
>
> members redes
>
> }
>
> 
>
> define  contact {
>
> contact_nameredes
>
> alias   Grupo Redes
>
> host_notification_period24x7
>
> service_notification_period 24x7
>
> host_notification_options   d,u,r
>
> service_notification_optionsw,u,c,r
>
> host_notification_commands  host-notify-by-email
>
> service_notification_commands   notify-by-email
>
> email   [EMAIL PROTECTED]
>
> }
>
> 
>
> Any hints
>
> Thank you before hands << File: ATT350909.txt >>  << File: ATT350911.txt >>
> -
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys -- and earn cash
> http://www.techsay.com/default.php?p

Re: [Nagios-users] not receiving the nagios notifications

2006-07-31 Thread Felipe Tocchetto
Solved!

After all this thread the problem is resolved.

I changed the "mail" command by "mailx"

Thanks Marc, Mike, Hugo, Aaron, Morris and all the others that read this thread.


2006/7/28, Mike Emigh <[EMAIL PROTECTED]>:
>
>
> On 7/28/06, Aaron Segura <[EMAIL PROTECTED]> wrote:
> > Shameless plug:
> >
> >
> http://www.nagiosexchange.org/Notifications.35.0.html?&tx_netnagext_pi1[p_view]=627
> >
> > Maybe try this?  That way you don't have to put anything "tricky" on the
> cmdline.  It all just goes into the template.  No worries about escaping
> special shell characters, etc...
> >
> > -Original Message-

-- 
Felipe L. Tocchetto
http://felipe.tocchetto.com

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Nagios-users mailing list
Nagios-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting 
any issue. 
::: Messages without supporting info will risk being sent to /dev/null


Re: [Nagios-users] not receiving the nagios notifications

2006-07-28 Thread Felipe Tocchetto
Now i am receiveing the notification. Thanks for all who try to help me.

The last point, the messages are some bad format, here it is:

* Nagios  *

Notification Type: PROBLEM
Host: host.tocchetto.com\ nState: DOWN
Address: 200.xx.xx.x
Info: CRITICAL - Plugin timed out after 10 seconds

Date/Time: Fri Jul 28 12:02:34 BRT 2006

And without subject


2006/7/28, Marc Powell <[EMAIL PROTECTED]>:
>
>
> > -Original Message-
> > From: [EMAIL PROTECTED] [mailto:nagios-users-
> > [EMAIL PROTECTED] On Behalf Of Felipe Tocchetto
> > Sent: Friday, July 28, 2006 8:48 AM
> > To: Marc Powell; Nagios Users Mailinglist
> > Subject: Re: [Nagios-users] not receiving the nagios notifications
> >
> > Hi Marc
> >
> > I changed the command in the misccomands.cfg to the one you suggest,
> > it creates the file, and here is the output.
> >
> > I supress some of my host and IP information.
> >
> > bash-3.00# more /tmp/host-notify
> >
> > /usr/bin/printf "%b" "* Nagios *
> >
> > Notification Type: PROBLEM
> > Host: host.xx-xx.xx.x
> > State: DOWN
> > Address: 200.000.00.00
> > Info: CRITICAL - Plugin timed out after 10 seconds
> >
> > Date/Time: Fri Jul 28 10:27:14 BRT 2006
> > " | /usr/bin/mail -s "Host DOWN alert for host.xx-xx.xx.x!"
> > [EMAIL PROTECTED]
> >
> > Information about my OS:
> >
> > SunOS 5.10 Generic_118844-26 i86pc i386 i86pc
> >
> > I notice somethig:
> >
> > bash-3.00# printf TEST123 | mail -s "test mail to felipe"
> > [EMAIL PROTECTED]
> >
> > Without the "!" in the end of the subject it was sent with no problems
>
> Yup. I suspected that might be an issue. You can remove the '!' or use
> ''s around the subject to prevent the interpretation of the !  like --
>
>   | /usr/bin/mail -s 'Host $HOSTSTATE$ alert for $HOSTNAME$!'
> $CONTACTEMAIL$'
>
> --
> Marc
>


-- 
Felipe L. Tocchetto
http://felipe.tocchetto.com

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Nagios-users mailing list
Nagios-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting 
any issue. 
::: Messages without supporting info will risk being sent to /dev/null


Re: [Nagios-users] not receiving the nagios notifications

2006-07-28 Thread Felipe Tocchetto
Hi Marc

Here some tests

The command:

id;/usr/bin/printf "%b" "* Nagios *\n\nNotification Type: Host
Notification\nHost: teste.xxx..br\nState: CRITICAL\nAddress:
200.xxx.xx.xx\nInfo: CRITICAL - Plugin timed out after 10
seconds\n\nDate//Time: 24/07/2006 11:11:11\n" | /usr/bin/mail -s
"alert" [EMAIL PROTECTED]

just 1 line!

The output for the command:

uid=100(nagios) gid=1(other)

And I receive the email:

* Nagios *

Notification Type: Host
Notification
Host: teste.xxx..br
State: CRITICAL
Address:
200.xxx.xx.xx
Info: CRITICAL - Plugin timed out after 10
seconds

Date/Time: 24/07/2006 11:11:11

All commands are in just 1 line...

I am using the default commands from the nagios instalation, I didn´t
change anything.



2006/7/24, Marc Powell <[EMAIL PROTECTED]>:
>
>
> > -Original Message-
> > From: [EMAIL PROTECTED] [mailto:nagios-users-
> > [EMAIL PROTECTED] On Behalf Of Felipe Tocchetto
> > Sent: Monday, July 24, 2006 3:34 PM
> > To: Nagios Users Mailinglist
> > Subject: Re: [Nagios-users] not receiving the nagios notifications
> >
> > I am using the default command.
> >
> > Manually it works, without the vars.
> > Thanks a lot.
> >
> > I really dont know how to fix it.
>
>
> I see a couple more things that I originally attributed to my mail
> client formatting of your original message. They may actually be
> problems with your config.
>
> # 'host-notify-by-email' command definition
> define command{
>command_namehost-notify-by-email
>command_line/usr/bin/printf "%b" "* Nagios
> *\n\nNotification Type: $NOTIFICATIONTYPE$\nHost: $HOSTNAME$\
> nState: $HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo:
> $HOSTOUTPUT$\n\nDate/Time: $LONGDATETIME$\n" | /usr/bin/mail -s "Host
> $HOS
> TSTATE$ alert for $HOSTNAME$!" $CONTACTEMAIL$
>}
>
> In the above definition I see a carriage returns between "$HOSTNAME\"
> and "nState:" as well as between "Host $HOS" and "TSTATE$". Do they
> really exist in your config file? They should not. If no, can you send
> the output of the following command when run as the nagios user?
>
> id;/usr/bin/printf "%b" "* Nagios *\n\nNotification Type: Host
> Notification\nHost: teste.xxx..br\nState: CRITICAL\nAddress:
> 200.xxx.xx.xx\nInfo: CRITICAL - Plugin timed out after 10
> seconds\n\nDate/Time: 24/07/2006 11:11:11\n" | /usr/bin/mail -s "Host
> CRITICAL alert for Test Machine!"  [EMAIL PROTECTED]
>
>
>
> --
>
> # 'notify-by-email' command definition
> define command{
>command_namenotify-by-email
>command_line/usr/bin/printf "%b" "* Nagios
> *\n\nNotification Type: $NOTIFICATIONTYPE$\n\nService: $SERVI
> CEDESC$\nHost: $HOSTALIAS$\nAddress: $HOSTADDRESS$\nState:
> $SERVICESTATE$\n\nDate/Time: $LONGDATETIME$\n\nAdditional Info:\n\
> n$SERVICEOUTPUT$" | /usr/bin/mail -s "** $NOTIFICATIONTYPE$ alert -
> $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **" $CONTACTE
> MAIL$
>}
>
> In the above command I see a carriage returns between "$SERIV" and
> "CEDESC$" as well as between "$CONTACTE" and "MAIL$". Do they really
> exist in your config file? They should not.
>
> --
> Marc
>
> -
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys -- and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> ___
> Nagios-users mailing list
> Nagios-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagios-users
> ::: Please include Nagios version, plugin version (-v) and OS when reporting 
> any issue.
> ::: Messages without supporting info will risk being sent to /dev/null
>


-- 
Felipe L. Tocchetto
http://felipe.tocchetto.com

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Nagios-users mailing list
Nagios-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting 
any issue. 
::: Messages without supporting info will risk being sent to /dev/null


Re: [Nagios-users] not receiving the nagios notifications

2006-07-28 Thread Felipe Tocchetto
Just another point:

I received the email without subject. Maybe the problem is my "mail" command.

2006/7/28, Felipe Tocchetto <[EMAIL PROTECTED]>:
> Hi Marc
>
> I changed the command in the misccomands.cfg to the one you suggest,
> it creates the file, and here is the output.
>
> I supress some of my host and IP information.
>
> bash-3.00# more /tmp/host-notify
>
> /usr/bin/printf "%b" "* Nagios *
>
> Notification Type: PROBLEM
> Host: host.xx-xx.xx.x
> State: DOWN
> Address: 200.000.00.00
> Info: CRITICAL - Plugin timed out after 10 seconds
>
> Date/Time: Fri Jul 28 10:27:14 BRT 2006
> " | /usr/bin/mail -s "Host DOWN alert for host.xx-xx.xx.x!" [EMAIL PROTECTED]
>
> Information about my OS:
>
> SunOS 5.10 Generic_118844-26 i86pc i386 i86pc
>
> I notice somethig:
>
> bash-3.00# printf TEST123 | mail -s "test mail to felipe" [EMAIL PROTECTED]
>
> Without the "!" in the end of the subject it was sent with no problems
>
> bash-3.00# printf TEST123 | mail -s "test mail to felipe!" [EMAIL PROTECTED]
> bash: !": event not found
>
> and now with the "!" in the end of the -s parameter. It wasnt send to me...
>
> I will try to change the command
>
> 2006/7/26, Marc Powell <[EMAIL PROTECTED]>:
> >
> >
> > > -Original Message-
> > > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Felipe
> > > Tocchetto
> > > Sent: Wednesday, July 26, 2006 2:54 PM
> > > To: Marc Powell
> > > Cc: Nagios Users Mailinglist
> > > Subject: Re: [Nagios-users] not receiving the nagios notifications
> > >
> > > Hi Marc
> > >
> > > Thaks for your effort in help me.
> > >
> > > Here is the commands outputs
> > >
> > > bash-3.00$ /bin/echo '/usr/bin/printf "%b" "* Nagios
> > > *\n\nNotification Type: $NOTIFICATIONTYPE$\nHost:
> > > $HOSTNAME$\nState: $HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo:
> > > $HOSTOUTPUT$\n\nDate/Time: $LONGDATETIME$\n" | /usr/bin/mail -s "Host
> > > $HOSTSTATE$ alert for $HOSTNAME$!" $CONTACTEMAIL$' >> /tmp/host-notify
> > >
> >
> > I meant for you to replace your current command_line in your 
> > host-notify-by-email command{} definition and trigger a failure again. 
> > After a notification attempt had been made by nagios, look at the contents 
> > of /tmp/host-notify for the command that nagios would have attempted to 
> > execute. I am attempting to discern _exactly_ what it is nagios is trying 
> > to do when it sends the notification and whether that actually works when 
> > you try it manually. There just might be different behavior when the macros 
> > get filled with appropriate data that we're missing. It's a stretch but I'm 
> > running out of ideas myself.
> >
> > It's good that you did this though as I can see that on whatever OS you are 
> > running the default behavior of echo is to interpret backslash-escaped 
> > characters (\n). You must determine from the echo man page (man echo) the 
> > command line switch to disable that and add it after '/bin/echo' in the 
> > command_line definition. It's probably -E so you would use "/bin/echo -E 
> > '/usr/bin/printf..."
> >
> > --
> > Marc
> >
> > >
> > > 2006/7/26, Marc Powell <[EMAIL PROTECTED]>:
> > > > I'm running out of ideas. Try changing your notify command_line to be --
> > > >
> > > >command_line/bin/echo '/usr/bin/printf "%b" "* Nagios
> > > *\n\nNotification Type: $NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nState:
> > > $HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo: $HOSTOUTPUT$\n\nDate/Time:
> > > $LONGDATETIME$\n" | /usr/bin/mail -s "Host $HOSTSTATE$ alert for
> > > $HOSTNAME$!" $CONTACTEMAIL$' >> /tmp/host-notify
> > > >
> > > > Make sure it's all one line. After a notification attempt, the file
> > > /tmp/host-notify will contain the command line that nagios would have
> > > executed. Try running that as the nagios user.
> > > >
> > > > --
> > > > Marc
> > > >
> > > > > -Original Message-
> > > > > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of
> > > Felipe
> > > > > Tocchetto
> > > > > Sent: Tuesday, July 25, 2006 4:31 PM
> > > > > To: Ma

Re: [Nagios-users] not receiving the nagios notifications

2006-07-28 Thread Felipe Tocchetto
Hi Marc

I changed the command in the misccomands.cfg to the one you suggest,
it creates the file, and here is the output.

I supress some of my host and IP information.

bash-3.00# more /tmp/host-notify

/usr/bin/printf "%b" "* Nagios *

Notification Type: PROBLEM
Host: host.xx-xx.xx.x
State: DOWN
Address: 200.000.00.00
Info: CRITICAL - Plugin timed out after 10 seconds

Date/Time: Fri Jul 28 10:27:14 BRT 2006
" | /usr/bin/mail -s "Host DOWN alert for host.xx-xx.xx.x!" [EMAIL PROTECTED]

Information about my OS:

SunOS 5.10 Generic_118844-26 i86pc i386 i86pc

I notice somethig:

bash-3.00# printf TEST123 | mail -s "test mail to felipe" [EMAIL PROTECTED]

Without the "!" in the end of the subject it was sent with no problems

bash-3.00# printf TEST123 | mail -s "test mail to felipe!" [EMAIL PROTECTED]
bash: !": event not found

and now with the "!" in the end of the -s parameter. It wasnt send to me...

I will try to change the command

2006/7/26, Marc Powell <[EMAIL PROTECTED]>:
>
>
> > -Original Message-
> > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Felipe
> > Tocchetto
> > Sent: Wednesday, July 26, 2006 2:54 PM
> > To: Marc Powell
> > Cc: Nagios Users Mailinglist
> > Subject: Re: [Nagios-users] not receiving the nagios notifications
> >
> > Hi Marc
> >
> > Thaks for your effort in help me.
> >
> > Here is the commands outputs
> >
> > bash-3.00$ /bin/echo '/usr/bin/printf "%b" "* Nagios
> > *\n\nNotification Type: $NOTIFICATIONTYPE$\nHost:
> > $HOSTNAME$\nState: $HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo:
> > $HOSTOUTPUT$\n\nDate/Time: $LONGDATETIME$\n" | /usr/bin/mail -s "Host
> > $HOSTSTATE$ alert for $HOSTNAME$!" $CONTACTEMAIL$' >> /tmp/host-notify
> >
>
> I meant for you to replace your current command_line in your 
> host-notify-by-email command{} definition and trigger a failure again. After 
> a notification attempt had been made by nagios, look at the contents of 
> /tmp/host-notify for the command that nagios would have attempted to execute. 
> I am attempting to discern _exactly_ what it is nagios is trying to do when 
> it sends the notification and whether that actually works when you try it 
> manually. There just might be different behavior when the macros get filled 
> with appropriate data that we're missing. It's a stretch but I'm running out 
> of ideas myself.
>
> It's good that you did this though as I can see that on whatever OS you are 
> running the default behavior of echo is to interpret backslash-escaped 
> characters (\n). You must determine from the echo man page (man echo) the 
> command line switch to disable that and add it after '/bin/echo' in the 
> command_line definition. It's probably -E so you would use "/bin/echo -E 
> '/usr/bin/printf..."
>
> --
> Marc
>
> >
> > 2006/7/26, Marc Powell <[EMAIL PROTECTED]>:
> > > I'm running out of ideas. Try changing your notify command_line to be --
> > >
> > >command_line/bin/echo '/usr/bin/printf "%b" "* Nagios
> > *\n\nNotification Type: $NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nState:
> > $HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo: $HOSTOUTPUT$\n\nDate/Time:
> > $LONGDATETIME$\n" | /usr/bin/mail -s "Host $HOSTSTATE$ alert for
> > $HOSTNAME$!" $CONTACTEMAIL$' >> /tmp/host-notify
> > >
> > > Make sure it's all one line. After a notification attempt, the file
> > /tmp/host-notify will contain the command line that nagios would have
> > executed. Try running that as the nagios user.
> > >
> > > --
> > > Marc
> > >
> > > > -Original Message-
> > > > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of
> > Felipe
> > > > Tocchetto
> > > > Sent: Tuesday, July 25, 2006 4:31 PM
> > > > To: Marc Powell
> > > > Cc: Nagios Users Mailinglist
> > > > Subject: Re: [Nagios-users] not receiving the nagios notifications
> > > >
> > > > Hi Marc
> > > >
> > > > Here some tests
> > > >
> > > > The command:
> > > >
> > > > id;/usr/bin/printf "%b" "* Nagios *\n\nNotification Type: Host
> > > > Notification\nHost: teste.xxx..br\nState: CRITICAL\nAddress:
> > > > 200.xxx.xx.xx\nInfo: CRITICAL - Plugin timed out after 10
> > > > seconds\n\nDate//Time: 24/07/2006 11:11:11\n" |

Re: [Nagios-users] not receiving the nagios notifications

2006-07-26 Thread Felipe Tocchetto
Hi Marc

Thaks for your effort in help me.

Here is the commands outputs

bash-3.00$ /bin/echo '/usr/bin/printf "%b" "* Nagios
*\n\nNotification Type: $NOTIFICATIONTYPE$\nHost:
$HOSTNAME$\nState: $HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo:
$HOSTOUTPUT$\n\nDate/Time: $LONGDATETIME$\n" | /usr/bin/mail -s "Host
$HOSTSTATE$ alert for $HOSTNAME$!" $CONTACTEMAIL$' >> /tmp/host-notify


bash-3.00$ cat /tmp/host-notify
/usr/bin/printf "%b" "* Nagios *

Notification Type: $NOTIFICATIONTYPE$
Host: $HOSTNAME$
State: $HOSTSTATE$
Address: $HOSTADDRESS$
Info: $HOSTOUTPUT$

Date/Time: $LONGDATETIME$
" | /usr/bin/mail -s "Host $HOSTSTATE$ alert for $HOSTNAME$!" $CONTACTEMAIL$


bash-3.00$ id
uid=100(nagios) gid=1(other)

2006/7/26, Marc Powell <[EMAIL PROTECTED]>:
> I'm running out of ideas. Try changing your notify command_line to be --
>
>command_line/bin/echo '/usr/bin/printf "%b" "* Nagios 
> *\n\nNotification Type: $NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nState: 
> $HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo: $HOSTOUTPUT$\n\nDate/Time: 
> $LONGDATETIME$\n" | /usr/bin/mail -s "Host $HOSTSTATE$ alert for $HOSTNAME$!" 
> $CONTACTEMAIL$' >> /tmp/host-notify
>
> Make sure it's all one line. After a notification attempt, the file 
> /tmp/host-notify will contain the command line that nagios would have 
> executed. Try running that as the nagios user.
>
> --
> Marc
>
> > -Original Message-
> > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Felipe
> > Tocchetto
> > Sent: Tuesday, July 25, 2006 4:31 PM
> > To: Marc Powell
> > Cc: Nagios Users Mailinglist
> > Subject: Re: [Nagios-users] not receiving the nagios notifications
> >
> > Hi Marc
> >
> > Here some tests
> >
> > The command:
> >
> > id;/usr/bin/printf "%b" "* Nagios *\n\nNotification Type: Host
> > Notification\nHost: teste.xxx..br\nState: CRITICAL\nAddress:
> > 200.xxx.xx.xx\nInfo: CRITICAL - Plugin timed out after 10
> > seconds\n\nDate//Time: 24/07/2006 11:11:11\n" | /usr/bin/mail -s
> > "alert" [EMAIL PROTECTED]
> >
> > just 1 line!
> >
> > The output for the command:
> >
> > uid=100(nagios) gid=1(other)
> >
> > And I receive the email:
> >
> > * Nagios *
> >
> > Notification Type: Host
> > Notification
> > Host: teste.xxx..br
> > State: CRITICAL
> > Address:
> > 200.xxx.xx.xx
> > Info: CRITICAL - Plugin timed out after 10
> > seconds
> >
> > Date/Time: 24/07/2006 11:11:11
> >
> > All commands are in just 1 line...
> >
> > I am using the default commands from the nagios instalation, I didn´t
> > change anything.
> >
> >
> >
> > 2006/7/24, Marc Powell <[EMAIL PROTECTED]>:
> > >
> > >
> > > > -Original Message-
> > > > From: [EMAIL PROTECTED] [mailto:nagios-users-
> > > > [EMAIL PROTECTED] On Behalf Of Felipe Tocchetto
> > > > Sent: Monday, July 24, 2006 3:34 PM
> > > > To: Nagios Users Mailinglist
> > > > Subject: Re: [Nagios-users] not receiving the nagios notifications
> > > >
> > > > I am using the default command.
> > > >
> > > > Manually it works, without the vars.
> > > > Thanks a lot.
> > > >
> > > > I really dont know how to fix it.
> > >
> > >
> > > I see a couple more things that I originally attributed to my mail
> > > client formatting of your original message. They may actually be
> > > problems with your config.
> > >
> > > # 'host-notify-by-email' command definition
> > > define command{
> > >command_namehost-notify-by-email
> > >command_line/usr/bin/printf "%b" "* Nagios
> > > *\n\nNotification Type: $NOTIFICATIONTYPE$\nHost: $HOSTNAME$\
> > > nState: $HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo:
> > > $HOSTOUTPUT$\n\nDate/Time: $LONGDATETIME$\n" | /usr/bin/mail -s "Host
> > > $HOS
> > > TSTATE$ alert for $HOSTNAME$!" $CONTACTEMAIL$
> > >}
> > >
> > > In the above definition I see a carriage returns between "$HOSTNAME\"
> > > and "nState:" as well as between "Host $HOS" and "TSTATE$". Do they
> > > really exist in your config file? They should not. If no, can you send
> > > the out

Re: [Nagios-users] not receiving the nagios notifications

2006-07-24 Thread Felipe Tocchetto
I am using the default command.

Manually it works, without the vars.
Thanks a lot.

I really dont know how to fix it.

=(

2006/7/24, Hugo van der Kooij <[EMAIL PROTECTED]>:
> On Mon, 24 Jul 2006, Felipe Tocchetto wrote:
>
> > Now I fixed the files, and the notifications are in the log file:
> >
> > [1153746375] HOST NOTIFICATION:
> > felipe;test.xx.x.br;DOWN;host-notify-by-email;CRITICAL - Plugin
> > timed out after 10 seconds
> >
> > But I don?t receive nothing by email
>
> So. Go and check on the host-notify-by-email definition.
>
> Test the command there manually as the 'nagios user' on your system to see
> if email works at all for Nagios.
>
> Hugo.
>
> --
> I hate duplicates. Just reply to the relevant mailinglist.
> [EMAIL PROTECTED]http://hvdkooij.xs4all.nl/
> Don't meddle in the affairs of magicians,
> for they are subtle and quick to anger.
>
> -
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys -- and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> ___
> Nagios-users mailing list
> Nagios-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagios-users
> ::: Please include Nagios version, plugin version (-v) and OS when reporting 
> any issue.
> ::: Messages without supporting info will risk being sent to /dev/null
>


-- 
Felipe L. Tocchetto
http://felipe.tocchetto.com

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Nagios-users mailing list
Nagios-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting 
any issue. 
::: Messages without supporting info will risk being sent to /dev/null


Re: [Nagios-users] not receiving the nagios notifications

2006-07-24 Thread Felipe Tocchetto
Hi Marc

I did this mistake, thanks!

Now I fixed the files, and the notifications are in the log file:

[1153746375] HOST NOTIFICATION:
felipe;test.xx.x.br;DOWN;host-notify-by-email;CRITICAL - Plugin
timed out after 10 seconds

But I don´t receive nothing by email
 =(

2006/7/23, Marc Powell <[EMAIL PROTECTED]>:
>
>
> > -Original Message-
> > From: [EMAIL PROTECTED] [mailto:nagios-users-
> > [EMAIL PROTECTED] On Behalf Of Felipe Tocchetto
> > Sent: Friday, July 21, 2006 1:28 PM
> > To: nagios-users@lists.sourceforge.net
> > Subject: [Nagios-users] not receiving the nagios notifications
> >
> > Hi All
> >
> > I have a nagios 2.4 here, I already insert some hosts to it monitor.
> > But when a host goes down, the nagios system do not send me the
> > notifications by email.
>
> You've told it not to. See below.
>
> > define contact{
> >contact_namefelipe
> >alias   Felipe Tocchetto
> >host_notification_period24x7
> >service_notification_period 24x7
> >host_notification_options   d,u,r,n
> >service_notification_optionsw,u,c,r,n
> >host_notification_commands  host-notify-by-email
> >service_notification_commands   notify-by-email
> >email   [EMAIL PROTECTED]
> >}
>
> http://nagios.sourceforge.net/docs/1_0/xodtemplate.html#contact
>
> For host_notification_options and service_notification_options, 'n'
> means don't send _any_ notifications. Remove it and restart nagios.
>
> host_notification_options:  This directive is used to define the
> host states for which notifications can be sent out to this contact.
> Valid options are a combination of one or more of the following: d =
> notify on DOWN host states, u = notify on UNREACHABLE host states, and r
> = notify on host recoveries (UP states). *If you specify n (none) as
> an option, the contact will not receive any type of host
> notifications.*
>
> service_notification_options:   This directive is used to define the
> service states for which notifications can be sent out to this contact.
> Valid options are a combination of one or more of the following: w =
> notify on WARNING service states, u = notify on UNKNOWN service states,
> c = notify on CRITICAL service states, and r = notify on service
> recoveries (OK states). *If you specify n (none) as an option, the
> contact will not receive any type of service notifications.*
>
> (emphasis mine)
>
> --
> Marc
>
>
>
> -
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys -- and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> ___
> Nagios-users mailing list
> Nagios-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagios-users
> ::: Please include Nagios version, plugin version (-v) and OS when reporting 
> any issue.
> ::: Messages without supporting info will risk being sent to /dev/null
>


-- 
Felipe L. Tocchetto
http://felipe.tocchetto.com

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Nagios-users mailing list
Nagios-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting 
any issue. 
::: Messages without supporting info will risk being sent to /dev/null


Re: [Nagios-users] not receiving the nagios notifications

2006-07-24 Thread Felipe Tocchetto
Thanks for the relply Hugo

If you read the my message u will see that i am using the 'ping' to
monitor my host.

2006/7/22, Hugo van der Kooij <[EMAIL PROTECTED]>:
> On Fri, 21 Jul 2006, Felipe Tocchetto wrote:
>
> > I have a nagios 2.4 here, I already insert some hosts to it monitor.
> > But when a host goes down, the nagios system do not send me the
> > notifications by email.
>
> And just what DO you see happening in the ligs?
>
> Keep in mind that nagios is not intended as host monitor but service
> monitor. If you want a check on host make it a pseudo service on the host.
> Like the PING example you have seen.
>
> More details can be found in the many posts in the archives on this list
> regarding this matter.
>
> Hugo.
>
> --
> I hate duplicates. Just reply to the relevant mailinglist.
> [EMAIL PROTECTED]http://hvdkooij.xs4all.nl/
> Don't meddle in the affairs of magicians,
> for they are subtle and quick to anger.
>
> -
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys -- and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> ___
> Nagios-users mailing list
> Nagios-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagios-users
> ::: Please include Nagios version, plugin version (-v) and OS when reporting 
> any issue.
> ::: Messages without supporting info will risk being sent to /dev/null
>


-- 
Felipe L. Tocchetto
http://felipe.tocchetto.com

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Nagios-users mailing list
Nagios-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting 
any issue. 
::: Messages without supporting info will risk being sent to /dev/null


[Nagios-users] not receiving the nagios notifications

2006-07-22 Thread Felipe Tocchetto
Hi All

I have a nagios 2.4 here, I already insert some hosts to it monitor.
But when a host goes down, the nagios system do not send me the
notifications by email.

I think all my confs files are just ok. I don´t have a clue for what
is happening.

Here is the way I configured it:

The hosts.cfg file:

define host{
   host_name   teste.xxx..br
   alias   Test Machine
   address 200.xxx.xx.xx
   check_command   check-host-alive
   max_check_attempts  2
   checks_enabled  1
   active_checks_enabled   1
   passive_checks_enabled  1
   check_interval  1
   process_perf_data   0
   retain_status_information   1
   retain_nonstatus_information1
   notification_interval   15
   contact_groups  suporte-local
   notification_period 24x7
   notification_optionsd,u,r
   notifications_enabled   1
   stalking_optionso,d,u
   }

Ok, notifications_enabled   1

So the contat group that it had to send the emails:

cat contactgroups.cfg
define contactgroup{
   contactgroup_name   suporte-local
   alias   suporte
   members felipe
   }

In this case, just me, Felipe, so I put my email in the contacts.cfg file

define contact{
   contact_namefelipe
   alias   Felipe Tocchetto
   host_notification_period24x7
   service_notification_period 24x7
   host_notification_options   d,u,r,n
   service_notification_optionsw,u,c,r,n
   host_notification_commands  host-notify-by-email
   service_notification_commands   notify-by-email
   email   [EMAIL PROTECTED]
   }

The host-notify-by-email e notify-by-email commands, in miscconmands.cfg:

# 'host-notify-by-email' command definition
define command{
   command_namehost-notify-by-email
   command_line/usr/bin/printf "%b" "* Nagios
*\n\nNotification Type: $NOTIFICATIONTYPE$\nHost: $HOSTNAME$\
nState: $HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo:
$HOSTOUTPUT$\n\nDate/Time: $LONGDATETIME$\n" | /usr/bin/mail -s "Host
$HOS
TSTATE$ alert for $HOSTNAME$!" $CONTACTEMAIL$
   }

# 'notify-by-email' command definition
define command{
   command_namenotify-by-email
   command_line/usr/bin/printf "%b" "* Nagios
*\n\nNotification Type: $NOTIFICATIONTYPE$\n\nService: $SERVI
CEDESC$\nHost: $HOSTALIAS$\nAddress: $HOSTADDRESS$\nState:
$SERVICESTATE$\n\nDate/Time: $LONGDATETIME$\n\nAdditional Info:\n\
n$SERVICEOUTPUT$" | /usr/bin/mail -s "** $NOTIFICATIONTYPE$ alert -
$HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **" $CONTACTE
MAIL$
   }


When I type mannualy the commands, a receive the email from the nagios
Machine...

Does any body know what is happening?

-- 
Felipe L. Tocchetto
http://felipe.tocchetto.com

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Nagios-users mailing list
Nagios-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting 
any issue. 
::: Messages without supporting info will risk being sent to /dev/null


Re: [Nagios-users] Nagios 2.3.1 and 2.4 compilation problem - statusmap.cgi

2006-06-02 Thread Felipe Tocchetto
Patrick

Thanks for your answer:

I compile the GD again with this flags ( thanks to Luc Suryo):

 ./configure --with-png=/usr/local/lib/
--with-freetype=/usr/local/lib/ --with-jpeg=/usr/local/lib/

On 6/1/06, Patrick Morris <[EMAIL PROTECTED]> wrote:
> Check the FAQs:
>
> http://www.nagios.org/faqs/viewfaq.php?faq_id=182&expand=false&showdesc=false
>
> On Thu, 01 Jun 2006, Felipe Tocchetto wrote:
>
> > Recently I started to try install Nagios in a Solaris 10 box, but I
> > didn´t get it works.
> >
> > First I was trying the 2.3.1 version of Nagios, so yesterday I notice
> > that the new version 2.4 has this fix:
> >
> > - Fix for missing  include that prevented CGI compilation under Solaris
> >
> > So I downloaded the new version but I am getting the same compilation error.
> >
> > The flags that I am using (the same I was using in previous version):
> >
> > ./configure --prefix=/usr/local/nagios-2.4/ --with-nagios-user=nagios
> > --with-nagios-group=nagios --with-command-group=nagcmd
> > --with-gd-lib=/usr/local/lib --with-gd-inc=/usr/local/include
> >
> > The error is after de 'make all' command:
> >
> > gcc -g -O2 -I/usr/local/include -DHAVE_CONFIG_H -DNSCGI
> > -L/usr/local/lib -o statusmap.cgi statusmap.c getcgi.o cgiutils.o
> > cgiauth.o  objects-cgi.o xobjects-cgi.o statusdata-cgi.o
> > xstatusdata-cgi.o -lgd -liconv -lpng -ljpeg -lz -lm -lrt
> > Undefined   first referenced
> > symbol in file
> > gdImageCreateFromJpeg   /var/tmp//ccu5735L.o
> > ld: fatal: Symbol referencing errors. No output written to statusmap.cgi
> > collect2: ld returned 1 exit status
> > make[1]: *** [statusmap.cgi] Error 1
> > make[1]: Leaving directory `/usr/local/src/nagios-2.4/cgi'
> > make: *** [all] Error 2
> >
> > Some extra information:
> >
> > SunOS 5.10 Generic_118844-26 i86pc i386 i86pc
> > gcc version 3.3.2
> > gd-2.0.33
> > libiconv-1.8
> > libpng-1.2.8
> > jpeg-6b
> >
> > If anybody knows how to solve this I agree.
> >
> > Best Wishes
> >
> > Thanks for you attention
> >
> > --
> > Felipe L. Tocchetto
> > msn [EMAIL PROTECTED]
> > icq 163263160
> > [EMAIL PROTECTED]
> > http://www.felipe.tocchetto.com
> >
> >
> > ---
> > All the advantages of Linux Managed Hosting--Without the Cost and Risk!
> > Fully trained technicians. The highest number of Red Hat certifications in
> > the hosting industry. Fanatical Support. Click to learn more
> > http://sel.as-us.falkag.net/sel?cmd=lnk&kid7521&bid$8729&dat1642
> > ___
> > Nagios-users mailing list
> > Nagios-users@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/nagios-users
> > ::: Please include Nagios version, plugin version (-v) and OS when
> > reporting any issue.
> > ::: Messages without supporting info will risk being sent to /dev/null
>
> --
> Patrick Morris
> Snapfish/HP
> 303 Second Street
> Suite 500, South Tower
> San Francisco, CA 94107
> (415) 979-3727
>
>


-- 
Felipe L. Tocchetto
msn [EMAIL PROTECTED]
icq 163263160
[EMAIL PROTECTED]
http://www.felipe.tocchetto.com


___
Nagios-users mailing list
Nagios-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting 
any issue. 
::: Messages without supporting info will risk being sent to /dev/null


[Nagios-users] Nagios 2.3.1 and 2.4 compilation problem - statusmap.cgi

2006-06-01 Thread Felipe Tocchetto

Recently I started to try install Nagios in a Solaris 10 box, but I
didn´t get it works.

First I was trying the 2.3.1 version of Nagios, so yesterday I notice
that the new version 2.4 has this fix:

- Fix for missing  include that prevented CGI compilation under Solaris

So I downloaded the new version but I am getting the same compilation error.

The flags that I am using (the same I was using in previous version):

./configure --prefix=/usr/local/nagios-2.4/ --with-nagios-user=nagios
--with-nagios-group=nagios --with-command-group=nagcmd
--with-gd-lib=/usr/local/lib --with-gd-inc=/usr/local/include

The error is after de 'make all' command:

gcc -g -O2 -I/usr/local/include -DHAVE_CONFIG_H -DNSCGI
-L/usr/local/lib -o statusmap.cgi statusmap.c getcgi.o cgiutils.o
cgiauth.o  objects-cgi.o xobjects-cgi.o statusdata-cgi.o
xstatusdata-cgi.o -lgd -liconv -lpng -ljpeg -lz -lm -lrt
Undefined   first referenced
symbol in file
gdImageCreateFromJpeg   /var/tmp//ccu5735L.o
ld: fatal: Symbol referencing errors. No output written to statusmap.cgi
collect2: ld returned 1 exit status
make[1]: *** [statusmap.cgi] Error 1
make[1]: Leaving directory `/usr/local/src/nagios-2.4/cgi'
make: *** [all] Error 2

Some extra information:

SunOS 5.10 Generic_118844-26 i86pc i386 i86pc
gcc version 3.3.2
gd-2.0.33
libiconv-1.8
libpng-1.2.8
jpeg-6b

If anybody knows how to solve this I agree.

Best Wishes

Thanks for you attention

--
Felipe L. Tocchetto
msn [EMAIL PROTECTED]
icq 163263160
[EMAIL PROTECTED]
http://www.felipe.tocchetto.com


---
All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnk&kid7521&bid$8729&dat1642
___
Nagios-users mailing list
Nagios-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting 
any issue.
::: Messages without supporting info will risk being sent to /dev/null