Thursday, February 16, 2012

Monitor Linux Server Memory Usage

                Check_memory.py is script written in Python to monitor Linux server Memory usage in MB (MegaBytes).

>> ./check_memory.py --help

>> ./check_memory.py 1200 1500

where 1200 is Warning Limit & 1500 is Critical Limit in MB.

Service definition in linuxserver.cfg

define service{
        use                                       local-service        
        host_name                           My Linux Server
        service_description             Check Memory
        check_command                 check_memory.py!1200!1500
       }


Command definition in commands.cfg

# 'check_memory.py' command definition
define command{
        command_name    check_memory.py
        command_line    $USER1$/check_memory.py $ARG1$ $ARG2$
        }


Download Check_Memory.py






No comments:

Post a Comment