Solved

Syslog-NG notifications

Posted on 2009-04-14
1
1,399 Views
Last Modified: 2013-11-15
For some reason, I can't get my Nagios notifications up and working.
I'm trying to set up a new user to use a Perl script, which currently sits at /runme.pl

I think that I have all the various notification pieces in place - I've spent the last 3 hours going over the notification documentation on the nagios homepage - but I'm still missing something.
All necessary definitions should be included in the code section.
define host{
        name                    generic-switch-loud
        use                     generic-host
        check_period            24x7
        check_interval          5
        retry_interval          1
        max_check_attempts      10
        check_command           check-host-alive
        notification_period     24x7
        notification_interval   30
        notification_options    d,u,r,f,s
        contact_groups          admins
        register                0
        }
 
define service{
        name                            generic-service-loud
        active_checks_enabled           1
        passive_checks_enabled          1
        parallelize_check               1
        obsess_over_service             1
        check_freshness                 0
        notifications_enabled           1
        event_handler_enabled           1
        flap_detection_enabled          1
        failure_prediction_enabled      1
        process_perf_data               1
        retain_status_information       1
        retain_nonstatus_information    1
        is_volatile                     0
        check_period                    24x7
        max_check_attempts              3
        normal_check_interval           10
        retry_check_interval            2
        contact_groups                  admins
        notification_options            w,u,c,r,f,s
        notification_interval           60
        notification_period             24x7
        register                        0
        }
 
 
define host{
        use             generic-switch-loud
        host_name       cfcapc1
        alias           CFCA Switch 1
        address         cfcapc1
        hostgroups      switches
        contacts        syslog
        }
# Just to create a failing alert
define service{
        use                     generic-service-loud
        name                    ping_test
        host_name               cfcapc1
        service_description     PING TEST
        check_command           check_ping_other!10.100.100.1!200.0,20%!600.0,60%
        normal_check_interval   5
        retry_check_interval    1
        }
 
define command{
        command_name    notify-by-syslog
        command_line    /runme.pl "From Syslog"
        }
 
define contact{
        alias                           Syslog Generator
        contact_name                    syslog
        name                            syslog
        service_notification_period     24x7
        host_notification_period        24x7
        service_notification_options    w,u,c,r,f,s
        host_notification_options       d,u,r,f,s
        service_notification_commands   notify-by-syslog
        host_notification_commands      notify-by-syslog
}
 
define contactgroup{
        contactgroup_name       admins
        alias                   Nagios Administrators
        members                 nagiosadmin,syslog
        }

Open in new window

0
Comment
Question by:timbrigham
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 1

Accepted Solution

by:
timbrigham earned 0 total points
ID: 24147473
The problem turned out to be with the embedded perl interpreter.
Updating the command_line to use the standard perl instance straightened this out.
define command{
        command_name    notify-by-syslog
        command_line    /usr/bin/perl /runme.pl "From Syslog"
        }

Open in new window

0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Software to count how many instances of words 109 216
SonarQube on Linux vs Windows 3 71
null0 7 53
Read some really old .pic files??? 18 53
In our personal lives, we have well-designed consumer apps to delight us and make even the most complex transactions simple. Many enterprise applications, however, are a bit behind the times. For an enterprise app to be successful in today's tech wo…
Skype is a P2P (Peer to Peer) instant messaging and VOIP (Voice over IP) service – as well as a whole lot more.
Using Adobe Premiere Pro, the viewer will learn how to set up a sequence with proper settings, importing pictures, rendering, and exporting the finished product.
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

735 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question