Forum Discussion

KANSTANTSIN's avatar
10 years ago

Service Monitor

Hi,

I have problem with serviceMonitor agent.

I created script(www.bat):

@echo off
ping 172.16.11.1>nul
if %errorlevel% == 0 goto A
:A
exit 110
if %errorlevel% == 1 goto B
:B
exit 100

Script's directory - C:\Program Files\Veritas\cluster server\bin\www.bat

 

I added resouse ServiceMonitor

ServiceOrScriptName:C:\Program Files\Veritas\cluster server\bin\www.bat

user:admin@jambo.ga

password:XXXXXXXX

domain:jamdo.ga

 

Status for agent UNKNOWN for all servers in cluster.

ServiceMonitor`s logs:

2015/06/24 07:15:26 VCS ERROR V-16-10051-7506 ServiceMonitor:ping_def:monitor:Failed to open the service 'C:\Program Files\Veritas\cluster server\bin\www.bat'. Error = 1060.
2015/06/24 07:15:32 VCS ERROR V-16-10051-7506 ServiceMonitor:ping_def:monitor:Failed to open the service 'C:\Program Files\Veritas\cluster server\bin\www.bat'. Error = 1060.
2015/06/24 07:16:27 VCS ERROR V-16-10051-7506 ServiceMonitor:ping_def:monitor:Failed to open the service 'C:\Program Files\Veritas\cluster server\bin\www.bat'. Error = 1060.
2015/06/24 07:17:00 VCS ERROR V-16-10051-7506 ServiceMonitor:ping_def:monitor:Failed to open the service 'C:\Program Files\Veritas\cluster server\bin\www.bat'. Error = 1060.

 

Who know how I can resolve it?

 

 

  • You need to set MonitorService to 0 in the ServiceMonitor resource - see description of attribute in VCS bundled agents guide:

    MonitorService
    Defines whether the agent monitors a service or starts a script. If
    set to 1, the agent monitors a service specified by the attribute
    ServiceOrScriptName. If set to 0 the agent starts a script specified
    by the attribute ServiceOrScriptName. Default is 1.

     

    Mike

  • You need to set MonitorService to 0 in the ServiceMonitor resource - see description of attribute in VCS bundled agents guide:

    MonitorService
    Defines whether the agent monitors a service or starts a script. If
    set to 1, the agent monitors a service specified by the attribute
    ServiceOrScriptName. If set to 0 the agent starts a script specified
    by the attribute ServiceOrScriptName. Default is 1.

     

    Mike

  • Hi Kanstantsin,

    Your script seems a bit simple.  Did you know that the NIC resource can be used to monitor connectivity to an external IP address.  You can configure the PingHostList with the IP address and then change the UseConnectionStatus to enable and disable the use of the PingHostList attribute.

    If this is just a test and you will be adding more to your monitor script then you might want to look at the Process agent.

    Error 1060 = The specified service does not exist as an installed service.

    Thank you,

    Wally