Ad Widget

Collapse

problem monitoring a process

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ben.bressler
    Member
    • Dec 2012
    • 45

    #1

    problem monitoring a process

    Hello!

    I'm new to zabbix/linux and am having some issues figuring out how to monitor a process.

    On my server I have a single process that runs 100% of the time and I'd like to receive an alert if it isn't running for whatever reason.

    I know the process is running because "ps aux | grep twitter" returns:

    root 660 0.1 0.4 238568 16328 ? Ssl Nov30 1:34 python twitter_gnip.py start

    I think my problem is an incorrect key when I am creating the item but I can't figure out what to enter in.

    I've tried:
    proc.num[,,, /opt/scripts/twitter_gnip.py]
    proc.num[python twitter_gnip.py start]
    proc.num[pythontwitter_gnip.pystart]
    proc.num[twitter_gnip.py]

    All return "twitter_gnip.py is not running on {HOSTNAME} (Twitterroc.num[python twitter_gnip.py start]): 0" as its item value when I know the process is currently running.

    Any help is appriciated. Thanks!
  • eskytthe
    Senior Member
    Zabbix Certified Specialist
    • May 2011
    • 363

    #2
    proc.num[,,,twitter_gnip.py] should do it
    Some more details here:

    Br
    Erik

    Comment

    • heaje
      Senior Member
      Zabbix Certified Specialist
      • Sep 2009
      • 325

      #3
      eskytthe is right. Here's why:

      The proper syntax for the proc.num item is:
      proc.num[<name>,<user>,<state>,<cmdline>]
      Here's what the things mean:

      <name>=This is the process name that would show up if you did not show the full process name using "ps" (ie: Using "ps -e" in your case would cause your process to most likely show up as "python")

      <user>=The user that should be running the process

      <state>=What state the process should be in

      <cmdline>=A value to search for in the full process name (as shown in "ps aux" or "ps -eaf"). In your case, a good value to search for would be "twitter_gnip.py").

      So if I were writing your item, I would use this item key:

      proc.num[python,,,twitter_gnip.py] = That would look for a process called "python" that has the string "twitter_gnip.py" somewhere in its full process name.

      Comment

      Working...