Ad Widget

Collapse

Monitoring a non-common-service

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ittec
    Member
    • Mar 2008
    • 73

    #1

    Monitoring a non-common-service

    Hi folks

    Im having a little trouble here. Few days ago I have installed on some servers open source software to prevent SSH brute force attacks: denyhosts.

    I would like to monitor when this "service" is running or not. Denyohsts is a kind of python software (if im not wrong).

    When I list processes on server I see:

    root 17336 0.0 0.0 140668 5756 ? S 11:45 0:00 python /usr/bin/denyhosts.py --daemon --config=/etc/denyhosts/denyhosts.cfg


    I don't know the way to monitor this, because is pyhton itself which is running denyhosts.py daemon. I was thinking on create a new item with proc.num but I'm not sure of how do it.

    Somebody can help me a little with this?

    Thanks guys
  • bashman
    Senior Member
    • Dec 2009
    • 432

    #2
    You can use:

    Code:
    proc.num[/usr/bin/denyhosts.py]
    or:

    Code:
    ps -ef|grep "python /usr/bin/denyhosts.py --daemon --config=/etc/denyhosts/denyhosts.cfg"|grep -v grep > /dev/null 2>&1;echo $?
    As a UserParameter command.
    978 Hosts / 16.901 Items / 8.703 Triggers / 44 usr / 90,59 nvps / v1.8.15

    Comment

    • James Wells
      Senior Member
      • Jun 2005
      • 664

      #3
      Greetings,
      Originally posted by ittec
      root 17336 0.0 0.0 140668 5756 ? S 11:45 0:00 python /usr/bin/denyhosts.py --daemon --config=/etc/denyhosts/denyhosts.cfg
      It really depends on how your system's proc/PID layout looks. Based on the ps output you are showing, the proper way to do it would be;
      Code:
      proc.num[python,,,denyhosts.py]
      However, if your system supports setproctitle, then Bashman's code will work. If you are unsure, an alternative would be;
      Code:
      proc.num[,,,denyhosts.py]
      Unofficial Zabbix Developer

      Comment

      Working...