Pandora FMS Community

(SOLVED)monitoring services through snmp

dan2kg · 26 jun 2012, 14:23 · 8 mensajes · 56 visitas

  1. Inicio del debate

    Hello, I am trying to monitor services through snmp on ubuntu. However since the PID of a service changes when it restarts giving it a different OID i tend to lose track of the service when it restarts. Is there a way around this or am i going about this monitoring wrongly.

  2. hi dan try to use the ps command, is more usefull than snmp to monitor process of a linux computer

    # Process information
    module_begin
    module_name smsDaemon
    module_type generic_proc
    module_exec ps -Af | grep smsd | grep -v "grep" | wc -l
    module_description check the sms process
    module_end
    
  3. hello alumbreras...thanks for the help. After defining a module like you mentioned in the pandora_agent.conf, will it show in the pandora_console automatically or will i have to define a data module through the console.  I tried testing a module i found at http://pandorafms.com/index.php?sec=pandora&sec2=repository&lng=en&action=view_PUI&id_PUI=43 #MySQL process (mysqld) CPU usage (%) module_begin module_name Mysql_CPU module_description Mysql CPU usage (%) module_type generic_data module_exec ps aux | grep "mysqld --basedir" | grep -v "grep" | awk '{ print $3 }' module_end however the data doesn't show on the console. Thanks again for the help.

  4. Hi . You don´t have to create a new module in the console, you just have to put your agent in learning mode (by default) and then restart the agent, after that it should be the new module you created with all the other modules of that agent. If not you should check the logs a see if you receive an error. Regards.

  5. hello Jartel...thanks for your response.  I tried it and it worked.  Initially it wasn't showing but i tried the module exec command from this module in terminal and realized that it wasn't displaying any value.

    MySQL Process (mysqld) RAM usage (%)
    
    module_begin
    module_name Mysql_RAM
    module_description Mysql RAM usage (%)
    module_type generic_data
    module_exec ps aux | grep "mysqld --basedir" | grep -v "grep" | awk '{ print $4 }'
    module_end 
    

    hence i figured something was wrong with the module on the pandora module library because the other ones i tried like the active threads and querries works just fine.

  6. hello Jartel...thanks for your response.  I tried it and it worked.  Initially it wasn't showing but i tried the module exec command from this module in terminal and realized that it wasn't displaying any value.

    MySQL Process (mysqld) RAM usage (%)
    
    module_begin
    module_name Mysql_RAM
    module_description Mysql RAM usage (%)
    module_type generic_data
    module_exec ps aux | grep "mysqld --basedir" | grep -v "grep" | awk '{ print $4 }'
    module_end 
    

    hence i figured something was wrong with the module on the pandora module library because the other ones i tried like the active threads and querries works just fine.

    Go to console (under the same user is executing the agent, most cases is root) and try to play with the command until find what is the problem. First: ps aux | gerp "mysqld --basedir" | grep -v grep And see if report something If not: ps aux | gerp "mysqld" | grep -v grep And go on to find the exact command match. Good luck !

  7. Wow thanks for the quick response. when i tried the response you gave it worked. The module with the 

    module_exec ps aux | grep "mysqld --basedir" | grep -v "grep" | awk '{ print $4 }' 
    

    does not work. However with

    ps aux | grep "mysqld" | grep -v grep | awk '{ print $4 }' 
    

    it works perfectly. Thanks for the help

  8. I change the post as solved.

Entra en tu cuenta para publicar.