I need to Start a service based off an Analysis

(imported topic written by chrism91)

I keep having issues where some of my servers SNMP Service keeps stopping. I have an analysis thats checks every 5 min. to see if the SNMP service is running. I also have a task that goes and restarts the service. What I would like to do is merge the 2 into one so that when the Analysis runs and detects SNMP has Stopped it restarts it automatically.

Is this easily done? Please help.

Thanks

(imported comment written by Bill.Ehardt)

Why dont you create an open ended task to start snmp, put in relevance to run if snmp is stopped?

(imported comment written by chrism91)

What would the relevance look like.

I have: if exists service “SNMP” then state of service “SNMP” else “Not Installed” for my Analysis

I have: waithidden cmd.exe /c net start “SNMP” to start the service back up.

Thank you for your help.

(imported comment written by chrism91)

Would like to do something like this

if state of service “SNMP” is “Stopped” then waithidden cmd.exe /c net start “SNMP”

Could I get something like the above string working?

(imported comment written by Bill.Ehardt)

Well, I would think action of…

waithidden cmd /c net start snmp

with relevance:

exists it whose (state of it != "Running") of service "snmp"

(imported comment written by Bill.Ehardt)

I’m pretty new to BigFix, but I’m just bypassing that analysis and just creating an open ended action.

You can set an open ended action to all machines or apply it open ended to just a group.

(imported comment written by JackCoates91)

You should also check the startup type… otherwise someone after you will set it as a recurring policy and it’ll keep trying to restart on machines that never should have had the service.

(imported comment written by Bill.Ehardt)

Oh good point… something like this then

exist it whose (start type of it = "auto" AND state of it != "Running") of service "snmp"

(imported comment written by Raja9109)

how can we use user name & password to start or stop any service becuase we are using symantec endpoint protectoin in our enivironment and to stop sep service it requires password so for some maintance activity we need to stop sep so how can we do that through bigfix script …

pls help me on this…