Writing Nagios Plugins in Python

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

0 comments

Post a comment

    Post a comment
    Embed Video
    Edit your comment Cancel

    2 Favorites & 1 Event

    Writing Nagios Plugins in Python - Presentation Transcript

    1. Enhancing Nagios with Python Plugins Maurice Maneschi Associate Director, Risk Management Systems Oakvale Capital Limited
    2. Presentation Outline
      • Risk Management Systems
      • What is Nagios
      • Why Python
      • What is a plug in
      • Specific Risks being monitored
      • Analysing reports and logs
      • Where to next
    3. Risk Management Systems
      • A division of five staff
      • Supporting three key applications
      • Running on eight servers
      • Depending on 15+ other boxes spread over 3 LANs
      • Five key vendors
    4. Risk Management System
      • Divisional goals
        • Key goal is application management
        • Some customer support
        • Product innovation
        • Project management
        • No time for nasty surprises
    5.  
    6. What is Nagios
      • Host, service, network monitoring program
      • Open source
      • Written in C
      • Runs on Linux and Apache
    7. What is Nagios
      • Configured with the hosts of a network
        • How the hosts are networked
        • What key services are on the hosts
          • “PING”, SMTP, HTTP etc.
      • Application polls these at specified intervals
        • From the results of the polls, determines the state of hosts, services and networks
        • Alerts sent by email
        • Escalation, reporting, statistics and more
    8. Why Python
      • Flexible
      • Efficient
      • Managable
      • Numerous, diverse libraries
      • Cross-platform
      • Huge number of code samples across the network
    9. What is a plugin
      • Executable file
        • Takes parameters (preferable)
        • Prints a short status message
      • Returns an exit status of
        • 0 – all OK
        • 1 – warning
        • 2 – critical
      • Stateless
    10. What is a plugin
      • Executable Python script
      • Code the test
      • Print the status line
      • Return a status
      • Easy!
    11. Specific risks being monitored
      • Customer email to the help desk system has stopped
        • User issues email in directly into our help desk system for prioritisation, action and eventually billing
        • Spam periodically breaks the import agent
        • Its proprietary, so no fix in sight
        • Nagios watches the queue using POP3
    12. Specific risks being monitored
    13. Specific risks being monitored
    14. Specific risks being monitored
      • Ratefeed is missing some rates
        • Rates feed into our system from Reuters via MS Excel
        • Some rates are critical, and human intervention is required if they are missing
        • Other rates are important, but are just tracked when missing
        • Nagios watches MS Excel file sheet with the “unreliable rates”
    15. Specific risks being monitored
    16. Specific risks being monitored
    17. Specific risks being monitored
      • Rates must be inserted regularly
        • Insertion process has numerous dependencies
        • Moving target – causes of failure change over time
        • Focus on the end point – are the rates in the database?
        • Nagios the databases and alerts to old or missing rates
    18. Specific risks being monitored
    19. Specific risks being monitored
    20. Specific risks being monitored
      • External source of dealing information
        • Fed in through the FIX protocol
        • Numerous failure points being monitored on a (Windows) server
        • Monitor process must check in with Nagios every 10 minutes
        • Using passive and active checks
    21. Specific risks being monitored
    22. Specific risks being monitored
    23. Specific risks being monitored
      • Quick passive check
    24. Specific risks being monitored
      • Successful backups
      • Successful scheduled tasks
      • Database comparisons
      • Common errors
        • Password server on web site
        • Known failure point on an MS Excel worksheet
    25. Extra enhancements to Nagios
      • High level view to systems health
      • Audio alerts and SMSes from UTbox.net
      • Status screen on monitor PC
      • Syslogd for firewall
      • Script reuse for rate checks
      • Ad hoc system problems
        • Currently tracking WAN failures
    26. Analysing reports and logs
      • Screen saver often sufficient
      • Summary views
    27.  
    28.  
    29.  
    30.  
    31.  
    32.  
    33.  
    34. Where to next
      • Low spec-ed PC
      • Nagios is in several distro repositories
        • I compile from the source
      • Allow a day at least to configure Nagios
        • Don't expect to install and switch it on
      • Tuning Nagios is an ongoing job
    35. Further information
      • Nagios: http://www.nagios.org
      • Python: http://www.python.org
        • pyexcelerator, pymssql, freetds from Sourceforge
      • Oakvale Capital: http://www.oakvale.com
      • Code samples: http://www.redwaratah.com/wiki/index.php?title=Nagios_and_Python
      • Maurice Maneschi: [email_address]

    + guesta6e653guesta6e653, 2 years ago

    custom

    2627 views, 2 favs, 1 embeds more stats

    I introduced Nagios to an organisation in 2004 to t more

    More info about this document

    © All Rights Reserved

    Go to text version

    • Total Views 2627
      • 2519 on SlideShare
      • 108 from embeds
    • Comments 0
    • Favorites 2
    • Downloads 60
    Most viewed embeds
    • 108 views on http://exchange.nagios.org

    more

    All embeds
    • 108 views on http://exchange.nagios.org

    less

    Flagged as inappropriate Flag as inappropriate
    Flag as inappropriate

    Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

    Cancel
    File a copyright complaint
    Having problems? Go to our helpdesk?

    Categories

    Groups / Events