Coder Social home page Coder Social logo

nagios's Introduction

Puppet Nagios module

This module is based on the internal puppet module of the University of Bristol IT services. Many thanks to @djjudas21 and Paul for providing the source and documentation.

This module to sets up Nagios monitoring for your infrastructure which includes:

  • core: domain, CPU, daemons, I/O, networker, memory usage, load, uptime, yum, selinux, certificate, smtp, swap, zombies, users, cron, NTP, TCP traffic, openmanage, xinetd, DNS
  • bind: named status
  • dhcp: dhcpd status, pools, failover
  • mysql: Queries Per Second (QPS), Multi-Master replication Manager (MMM), DB size,
  • nagios client: config, stats
  • nagios server: config, apache, AAAA record, NRPE
  • puppet: last run, environment, master, DB

Usage

Contribution

Please read CONTRIBUTING.md.

nagios's People

Contributors

kreczko avatar

Watchers

Jonathan avatar James Cloos avatar  avatar  avatar Alessandra Forti avatar  avatar

nagios's Issues

Missing dependencies

A bunch of dependencies are still missing from the private module. The corresponding tests, implementation and documentation need to be added.

Error: /Stage[main]/Nagios::Config::Client/File[/etc/nagios/nrpe.cfg]: Could not evaluate: Could not retrieve information from environment development source(s) puppet:///modules/nagios/nrpe/nrpe.cfg

Error: /Stage[main]/Nagios::Plugins::Core/Nagios::Plugin[check_kernel_passive]/File[/usr/lib64/nagios/plugins/check_kernel_passive]: Could not evaluate: Could not retrieve information from environment development source(s) puppet:///modules/nagios/plugins/check_kernel_passive

Warning: /Stage[main]/Nagios::Cron::Kernel_passive/Cron[kernel-passive-reboot]: Skipping because of failed dependencies

Error: /Stage[main]/Nagios::Plugins::Core/File[/usr/lib64/nagios/plugins/check_hardware_spec]: Could not evaluate: Could not retrieve information from environment development source(s) puppet:///modules/nagios/plugins/check_hardware_spec

Error: /Stage[main]/Nagios::Plugins::Puppet/Nagios::Plugin[check_puppet_checkin_db]/File[/usr/lib64/nagios/plugins/check_puppet_checkin_db]: Could not evaluate: Could not retrieve information from environment development source(s) puppet:///modules/nagios/plugins/check_puppet_checkin_db

and the missing treatment of the global facter variable monitoring_server

vmstat does not return an average for last line

This script purports to check cpu state over a specified interval, but uses vmstat to check state, then assumes the last line gives an average. Suggest changing from vmstat to sar. To overcome the problem of processing float output in bash, can use bc to process.

Linux avg cpu over interval:

  Linux)
    CPU_REPORT=`/usr/bin -u $INTERVAL_SEC $NUM_REPORT | tail -1`
    CPU_USER=`echo $CPU_REPORT | awk '{ print $3 }'`
    CPU_SYSTEM=`echo $CPU_REPORT | awk '{ print $5 }'`
    CPU_IOWAIT=`echo $CPU_REPORT | awk '{ print $6 }'`
    CPU_IDLE=`echo $CPU_REPORT | awk '{ print $8 }'`

Floating point comparison for bash/bc

float_ge() {
  [ $(echo "$1 >= $2" | /usr/bin/bc) -eq 1 ]
}

Floating point comparison in use:

if float_ge "${CPU_IOWAIT}" "${IO_CPU_C}" || float_ge "${CPU_USER}" "${U_CPU_C}" || float_ge "${CPU_SYSTEM}" "${S_CPU_C}";
then
...

Requires packages sysstat and bc to fully implement

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.