Giter Site home page Giter Site logo

vahidhedayati / snmp_remote_load Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 112 KB

nagios snmp remote load check - against auto cpu count (Linux)

Home Page: http://exchange.nagios.org/directory/Plugins/System-Metrics/CPU-Usage-and-Load/snmp_remote_load/details

snmp_remote_load's Introduction

snmp_remote_load

nagios snmp remote load check - against auto cpu count (Linux)

http://exchange.nagios.org/directory/Plugins/System-Metrics/CPU-Usage-and-Load/snmp_remote_load/details

This script takes:

-H -l -p

Once given a hostname and community string with or without specific load limit with no load limit, using snmp it will look at amount of cpu's and calculate load average / cpu count - -- UPDATES - debian - ubuntu systems run: sudo apt-get install snmp-mibs-downloader

This has now been updated in the uploaded script, you can revert back to old commented method if you do not with to use HOST-RESOURCES-MIB and find the old commented out method works for you.

Anyhow when executed this is what happens, it returns the actual cpus on the machine, the script has been set to increment by two for any amount found so that we begin to get alerts when the load is really really high rather than as soon as it hits a 100%. This is another hack found further in the script where cpu_count++ occurs twice

Help -h

./snmp_remote_load -h ./snmp_remote_load -H localhost -l 1 -p public ./snmp_remote_load -H localhost -p public

-H is hostname set to localhost -l is load limit set to 1 or not set at all -p is snmp passsword

You can leave the load blank , this then defines the load according to CPU's so a 4 cpu server will have a load set to 6 if it goes above 4 then alerts are sent

Auto load check against CPU count

./snmp_remote_load -H localhost -p public ./snmp_remote_load -H localhost -l -p public |Actual_cpus:_4|Alert_Limit:6|-|1 minute load->OK:1.59167|-|5 minute load->OK:1.545|-|15 minute load->OK:1.575|-|FINAL_RESULT:GOOD

./snmp_remote_load -H localhost -p public |Actual_cpus:_4|Alert_Limit:6|-|1 minute load->OK:1.59167|-|5 minute load->OK:1.545|-|15 minute load->OK:1.575|-|FINAL_RESULT:GOOD

Define a limit

./snmp_remote_load -H localhost -l 1 -p public |Actual_cpus:_4|Alert_Limit:1|-|1 minute load->CRITICAL:2.35833|-|5 minute load->CRITICAL:1.78333|-|15 minute load->CRITICAL:1.59833|-|FINAL_RESULT:CRITICAL

Command configuration

define command {

command_name check_load_remote

command_line $USER1$/snmp_remote_load -H $HOSTADDRESS$ -l $ARG1$ -p $ARG2$

}

define command {

command_name check_auto_load_remote

command_line $USER1$/snmp_remote_load -H $HOSTADDRESS$ -p $ARG1$

}

Service configuration

define service{

use ....

hostgroup_name generic-uat

service_description cpu_load

check_command check_auto_load_remote!public!

}

this will set the load max level to 2

define service{

use ....

hostgroup_name generic-uat

service_description cpu_load

check_command check_load_remote!2!public!

}

snmp_remote_load's People

Watchers

Vahid Hedayati avatar

snmp_remote_load's Issues

snmp_remote_load script for snmp version 3

Hi Sir,
I am using this script for one of our environment. This script suits for SNMP version 2. I am trying to test for snmp version 3 also. May I know is that possible for SNMP v3 also

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.