View Full Version : monitoring windows service
mary nancy
21-02-2006, 06:06
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. :confused:
Regards
Nancy
cameronsto
21-02-2006, 15:01
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. :confused:
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...
mary nancy
22-02-2006, 06:39
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
bbrendon
22-02-2006, 09:10
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.
cameronsto
22-02-2006, 14:32
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:
static DWORD states[7]={ SERVICE_RUNNING,SERVICE_PAUSED,SERVICE_START_PENDI NG,
SERVICE_PAUSE_PENDING,SERVICE_CONTINUE_PENDING,
SERVICE_STOP_PENDING,SERVICE_STOPPED };
Which matches what is defined in the documentation.
-cameron