Announcement

Collapse
No announcement yet.

Nagios Notification Script

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Nagios Notification Script

    My old installation of Nagios would generate alerts that looked like this:

    ***** Nagios *****

    Notification Type: PROBLEM

    Service: OWA
    Host: DH10 - DH Innovations Windows 2003 Exchange Server OWA FrontEnd Server
    Address: 192.168.168.10
    State: CRITICAL

    Date/Time: Tue May 31 21:36:35 EDT 2005

    Additional Info:

    No data received

    The new Oreon / Nagios script is generating this:

    ""*****""Nagios""1.X*****Notification\nType:PROBLE M\n""Host:""DHNETAPP1\nState:""UPAddress:""192.168 .168.20\nInfo:""GPING""CRITICAL""-\nDate/Time:""Tue""May""31""21:56:19""EDT""2005""

    Can someone tell me how to fix this?

    Thanks - Chris

  • #2
    Hi,

    There's a problem with the '\' in your notification command; can you put it here ?

    Are you with Oreon 1.2.1 ?
    Romain Le Merlus
    Centreon Forge
    MERETHIS

    Comment


    • #3
      /usr/bin/printf \"%b\" \"***** Nagios 1.X*****Notification\\\\nType:$NOTIFICATIONTYPE$\\ \\n Host: $HOSTNAME$\\\\nState: $HOSTSTATE$Address: $HOSTADDRESS$\\\\nInfo: $OUTPUT$\\\\nDate/Time: $DATETIME$\" | /bin/mail -s \"Host $HOSTSTATE$ alert for $HOSTNAME$!\" $CONTACTEMAIL$

      Comment


      • #4
        My notification command is :
        Code:
        /usr/bin/printf "%b" "***** Nagios 1.X *****\n\nNotification: $NOTIFICATIONTYPE$\n\nHote: $HOSTNAME$\nAdresse: $HOSTADDRESS$\nEtat: $HOSTSTATE$\n\nDate: $SHORTDATETIME$\n\n Info:\n\n$OUTPUT$" | /bin/mail -s "** $NOTIFICATIONTYPE$ alerte - $HOSTNAME$ est $HOSTSTATE$ **" $CONTACTEMAIL$
        I've changed it in Nagios and Oreon before to start Nagios and in oreon Database.
        If you change in Oreon, automatically you have 4 \. But if you change directly in miscommands.cfg in Oreon, Nagios and in Oreon Database (Command), I think it's OK.

        I don't know what's admin think :wink:

        Comment

        Working...
        X