Ad Widget

Collapse

trigger event only when software is installed

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • goldman76
    Junior Member
    • Dec 2022
    • 1

    #1

    trigger event only when software is installed

    Hello, I'm new to Zabbix and we're using an old version (5.9) unfortunately, so it's quite complicated for me to find some help/example for my problem. And i've got to do it without the help of plugins and so on.

    I want to monitor for instance HTTPD processes; but only when http server is installed. I've got a trigger with should give a high alert with a problem expression like this:

    {check_webserversroc.num[httpd].last()}<1 and {check_webservers:system.sw.packages["httpd",rpm].str(http)}=1

    So on a RHEL webserver it will report a high alert when httpd is down. But on a ubuntu apacheserver it won't alert anything.

    Thanks in advance,

    Vincent
  • themactech
    Junior Member
    • Dec 2022
    • 7

    #2
    Do you have SNMP configured on this system? You can configure the Net-SNMP agent to report on a specific service, and specify minimum/maximum threads. It will then report on that service in a SNMP OID. I suspect that would give you the result you are looking for.

    Here is an example from a random website (just google snmpd.conf examples):

    Process Monitoring
    The list of services running on a system can be monitored (and provision made for
    correcting any problems), using:
    # At least one web server process must be running at all times
    proc httpd
    procfix httpd /etc/rc.d/init.d/httpd restart

    # There should never be more than 10 mail processes running
    # (more implies a probable mail storm, so shut down the mail system)
    proc sendmail 10
    procfix sendmail /etc/rc.d/init.d/sendmail stop

    Comment

    • tim.mooney
      Senior Member
      • Dec 2012
      • 1427

      #3
      Originally posted by goldman76
      Hello, I'm new to Zabbix and we're using an old version (5.9) unfortunately, so it's quite complicated for me to find some help/example for my problem.
      Zabbix 5.9 doesn't exist. The early pre-alpha builds for Zabbix 6.0 (which is current long term support) were numbered as Zabbix 5.5 I think, but either way, 5.9 would be some kind of "later than 5.4, but prior to 6.0" release.

      With that in mind, you could just use the documentation for 5.4 in the drop-down here: https://www.zabbix.com/documentation/

      Originally posted by goldman76
      I want to monitor for instance HTTPD processes; but only when http server is installed. I've got a trigger with should give a high alert with a problem expression like this:

      {check_webserversroc.num[httpd].last()}<1 and {check_webservers:system.sw.packages["httpd",rpm].str(http)}=1

      So on a RHEL webserver it will report a high alert when httpd is down. But on a ubuntu apacheserver it won't alert anything.
      Ok, but you don't say what the problem is.

      Is it that you also want it to work on Ubuntu? If so, then change "rpm" to "all".

      BTW, your search will miss nginx on most platforms. Also, doesn't Debian and derived systems call it "apache" or something similar, rather than "httpd", for the httpd server that comes from Apache? If so, you need to adjust your system.sw.packages regex further.

      Comment

      Working...