Ad Widget

Collapse

monitoring windows service

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mary nancy
    Senior Member
    • Jul 2005
    • 125

    #1

    monitoring windows service

    Hi

    I am monitoring windows services.
    For eg:- service_state[Zabbix Win32 Agent].
    The output is always 1 even if the service is running.(this is the same for all the services)

    According to the manual if the service is running, The output should be 0.
    If the output is 1 it shows that the service is stopped.

    Please someone guide me why i am getting 1 as the output for all the services.

    Regards
    Nancy
  • cameronsto
    Senior Member
    • Oct 2005
    • 148

    #2
    Originally posted by mary nancy
    Hi

    I am monitoring windows services.
    For eg:- service_state[Zabbix Win32 Agent].
    The output is always 1 even if the service is running.(this is the same for all the services)

    According to the manual if the service is running, The output should be 0.
    If the output is 1 it shows that the service is stopped.

    Please someone guide me why i am getting 1 as the output for all the services.

    Regards
    Nancy
    You might be using the wrong service name based on your example. The parameter for service_state[] should be the service name listed in the Service properties such as ZabbixAgentdW32 not 'Zabbix Win32 Agent'. Check to see if this is how you have actually set it up.

    -cameron

    ps. Just to be sure...you're not trying to use Zabbix to monitor the Zabbix service are you? That won't work...

    Comment

    • mary nancy
      Senior Member
      • Jul 2005
      • 125

      #3
      Originally posted by cameronsto
      You might be using the wrong service name based on your example. The parameter for service_state[] should be the service name listed in the Service properties such as ZabbixAgentdW32 not 'Zabbix Win32 Agent'. Check to see if this is how you have actually set it up.

      -cameron

      ps. Just to be sure...you're not trying to use Zabbix to monitor the Zabbix service are you? That won't work...

      I have used the same naming convention as in the computer managment -> services.
      But still the output of the paramter is 1

      Regards
      Nancy

      Comment

      • bbrendon
        Senior Member
        • Sep 2005
        • 870

        #4
        Originally posted by mary nancy
        I have used the same naming convention as in the computer managment -> services.
        But still the output of the paramter is 1
        Could it be that the service up is 1 and the service down is 0? Maybe it is working.
        Unofficial Zabbix Expert
        Blog, Corporate Site

        Comment

        • cameronsto
          Senior Member
          • Oct 2005
          • 148

          #5
          Originally posted by bbrendon
          Could it be that the service up is 1 and the service down is 0? Maybe it is working.
          It appears correct in the code:
          Code:
           static DWORD states[7]={ SERVICE_RUNNING,SERVICE_PAUSED,SERVICE_START_PENDING,
          			  SERVICE_PAUSE_PENDING,SERVICE_CONTINUE_PENDING,
          			  SERVICE_STOP_PENDING,SERVICE_STOPPED };
          Which matches what is defined in the documentation.

          -cameron

          Comment

          Working...