Ad Widget

Collapse

[ Zabbix 2.0.5 ] Monitoring Windows Processes with same name

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • gesgarcia
    Junior Member
    • Oct 2016
    • 4

    #1

    [ Zabbix 2.0.5 ] Monitoring Windows Processes with same name

    Hi

    I need to monitor several Windows processes with same name. They all have different command line. For example:

    process.exe -a CASE_A
    process.exe -a CASE_B
    .
    .
    .
    process.exe -a CASE_X

    How can i do it with zabbix 2.0.5 ? For example, is it possible to know which of them is down?

    Thanks for your help.

    Regards.
  • Colttt
    Senior Member
    Zabbix Certified Specialist
    • Mar 2009
    • 878

    #2
    its not possible yet, but when you use this as a windows service it should work, because it based on the service names
    Debian-User

    Sorry for my bad english

    Comment

    • SBO
      Zabbix Certified Specialist
      Zabbix Certified Specialist
      • Sep 2015
      • 226

      #3
      I have no windows in my infra, so I can't test, but can't you use the proc.num item ?
      Something like proc.num[process.exe -a CASE_A] ?

      Comment

      • ArdzivNubar
        Junior Member
        • Apr 2017
        • 1

        #4
        proc.num for same process in windows

        hi,

        I faced the same issue on my infrastructure, and I had some "java.exe" processes to monitor on windows servers.

        I found a workaround to that:
        The processes were like your scenario:
        "java.exe -DprocessName=XXXX"
        "java.exe -DprocessName=YYYY"
        "java.exe -DprocessName=ZZZZ"

        The problem was that I wanted to use "proc.num[,,,processName=XXXX]", but of course as per Zabbix documentation this feature is not supported on Windows Zabbix Agents.

        but there is a way to perform ALMOST the same thing by using the following:
        1. - Create an ITEM that list the process table from a WMI_GET key:
        2. wmi.get[root\cimv2,select commandline from Win32_Process where Commandline like '%java.exe%XXXXX%']
        3. - Create then a trigger that will check if it finds into the string returned by the wmi_get key the text you are looking for into your commandline:
        4. {TEMPLATE:wmi.get[root\cimv2,select commandline from Win32_Process where Commandline like '%java.exe%{$JAVA_IMSPROXY_HKFE}%'].str(XXXXX)}=1


        Limitations: the zabbix key "wmi_get" only returns the first occurrence it founds from the Win32_Process" object.
        With this method you can only count "1" or "0" processes.
        If there are more than one matching on your "wmi_get" you wont see it as it is not returned by the key.

        hope that answers your problem.

        Ardziv

        Comment

        • Luiz Antonio Oliveira
          Member
          • Feb 2007
          • 49

          #5
          You can generate an lld by searching for information and generating the item with proc.num

          Comment

          • gesgarcia
            Junior Member
            • Oct 2016
            • 4

            #6
            Because my zabbix version does not support wmi.get, what I finally did was define zabbix userparameters using wmic:

            UserParameter=np.case_a,wmic process where commandline='"C:\\Program Files\\process.exe" -a CASE_A' get name 2> nul | find /c /i "process.exe"

            and from zabbix I query for the result of that UserParam

            zabbix monitor = np.case_a

            This way it works with this old zabbix version

            Comment

            Working...