Ad Widget

Collapse

proc.num and Unix agent

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • steveboyson
    Senior Member
    • Jul 2013
    • 582

    #1

    proc.num and Unix agent

    Hi all,
    I want to check if the "VMWare Tools" service/process is running. Checks are performed both on Windows and Linux agents.

    While under Unix the process is called "vmtoolsd" (running as "root"), it is "vmtoolsd.exe" on Windows (running as "system").

    I want to apply the check items via a common template, so I have two items to check for both process names. Surely, depending on the target OS, one of these will always fail.

    - for Windows agents: proc.num[vmtoolsd.exe,system]
    - for Linux agents: proc.num[vmtoolsd,root]

    What I'm experiencing is that the Windows item fails with ZBX_NOTSUPPORTED on Linux systems. Further tests showed that "system" is the failing parameter since a user "system" is not known to the agent on Linux side. That means the agent accepts only usernames which exists in /etc/passwd (which I find poorly designed).
    After that, Zabbix disables that item raising "unsupported items" errors.

    On the other hand, the Linux item (as mentioned above) does work well on Windows agents giving the correct "0" as a result.

    I want to summarize the item results in a trigger:
    ({MyTemplateroc.num[vmtoolsd,root]}.last(0) + {MyTemplateroc.num[vmtoolsd.exe,system]}.last(0) ) < 1

    Since the Windows item fails on Linux and the item gets disabled then, the whole trigger fails as "unsupported" and never kicks in.

    How could I perform the checks and triggers for both Unix and Windows without having to write external checks?
    Any hints are greatly appreciated!
  • steveboyson
    Senior Member
    • Jul 2013
    • 582

    #2
    I found no solution so I wrote scripts for both sides.

    Now I can query both Windows and Linux systems with an identical syntax. I just add both test results and the trigger fires if (result_summary < 1)

    Comment

    Working...