in More Search Options

Restart Service if down

Last post 02-08-2008 11:06 AM by aLTeReGo. 30 replies.
Page 2 of 2 (31 items) < Previous 1 2
Sort Posts:
  • 02-07-2008 9:56 AM In reply to

    Re: Restart Service if down

    Just FYI, I found this resource which might be helpful:

    http://cwashington.netreach.net/depo/view.asp?Index=1143&ScriptType=vbscript

    Let us know if anybody is able to get this to work as we're exploring the possibility of making this a built-in capability in the next release of APM.

    HTH


     

     

    Chris LaPoint
    Sr. Product Manager
    NCM (Cirrus), ipMonitor, LANsurveyor
    SolarWinds
    Austin, TX
    • Post Points: 7
  • 02-07-2008 12:44 PM In reply to

    • EMetro
    • Top 500 Contributor
    • Joined on 09-25-2007
    • Houston
    • Posts 24
    • Points 58

    Re: Restart Service if down

    Well... I've spent hours on the phone with a support tech.  Hours on the server testing every possible solution I could come up with... and the end result is that  I cannot get NPM's alert to remotely restart a service.  The Tech openly admitted that he's been working with ourselves and another client for about 4 months trying to get this to work with minimal success.  They have to have VB scripting that includes ID's and Passwords in the scripting.  Not something I've been able to re-create, nor would our policies permit anyway.

    I must admit, I'm disappointed to the point of suspicion. APM will implement something like this in the future? It wouldn't be so bad, but in my many many hours of testing, i can't detect any evidence that NPM's alerts execute programs, .bat scripts, or vbscripts at all.  I'm not optimistic that the "new feature" in APM will serve this need.  This isn't even definite... as indicated, it's a POSSIBLE feature, not an actual one.  The only working solution SolarWinds has at the moment is ipMonitor.

    Forgive the hypersensitive reply, but I can sum it up by... I"m not holding my breath that NPM or APM will meet my service monitoring needs.  I love the monitoring tools... They're great. I must say ipMonitor is a very nice tool as well, but when confronted with the likelihood for additional purchases, I'm quite disappointed.

    _____
    ED
    • Post Points: 3
  • 02-07-2008 2:15 PM In reply to

    • aLTeReGo
    • Top 10 Contributor
    • Joined on 01-31-2004
    • 127.0.0.1
    • Posts 864
    • Points 2,424

    Re: Restart Service if down

    What exactly is the problem? Is it that the alert won't execute a program of any type (BAT, EXE etc) on the local machine? Or are you having trouble passing variables/macros to the executable?

    • Post Points: 3
  • 02-07-2008 2:32 PM In reply to

    • EMetro
    • Top 500 Contributor
    • Joined on 09-25-2007
    • Houston
    • Posts 24
    • Points 58

    Re: Restart Service if down

     At this point, could care less about variables/macros.  I have a service that dies, and I need to restart it when it does.  I have .bat files, .vbs files, and .exe files that all work from the SolarWinds Server Desktop to restart the service on the remote machine.  Solarwinds alert has been set (in many ways) to try to trigger these files to work... without success.

    That said.. .in testing, I've tried to get SW to do ANYTHING with the execute program or run VBScript options... .without success.
     

    _____
    ED
    • Post Points: 3
  • 02-07-2008 10:58 PM In reply to

    Re: Restart Service if down

    Fist of all, I am a newbie to APM.  However, I have been testing the suggestions in this thread and have met with some positive results.

    What I did is set the "Log On As" account for the SolarWinds Alerting Engine to an account that has admin permissions to all my servers (and bounced the service, of course).  Then I created an Application Template for the Windows Service that I want to monitor.  The template is named the same as the service name (for example: service display name to be monitored is Computer Browser but the service name is Browser). I named the template Browser, I defined a credential that is the same as the "Log On As" service account for the SolarWinds Alerting Engine, I then created an alert that Executes an external program (ie. .bat file located on the Orion server), in the .bat I have the following:  sc \\%1 start %2

    The script path I have is E:\00.DATA\_Scripts\start_service.bat ${NodeName} ${Name} >>E:\00.DATA\_Scripts\results.log and I log the results to a text file (results.log) to see what is really happening.

    What happens is that the service stops, the external program executes and passed the %1 (node name) and the %2 (template name) to the sc command.  The service starts as planned.

     I plan on tightening up the script once I figure out the actual service name variable that Solarwinds uses.

    Hope this helps and I admit, I havne't tested any other services as of yet.

    • Post Points: 3
  • 02-08-2008 7:40 AM In reply to

    • WINNT
    • Top 75 Contributor
    • Joined on 06-22-2004
    • USA
    • Posts 99
    • Points 580

    Re: Restart Service if down

    Yes, this will work as well.  The reason I didn't suggest changing the service account credentials is that I didn't think SolarWinds would support it.  That's why I put the system account in a group that had access to all my servers.  I also don't have to worry about managing passwords or account lock-outs. 

    • Post Points: 3
  • 02-08-2008 8:30 AM In reply to

    • WINNT
    • Top 75 Contributor
    • Joined on 06-22-2004
    • USA
    • Posts 99
    • Points 580

    Re: Restart Service if down

     

    • Post Points: 1
  • 02-08-2008 8:55 AM In reply to

    • aLTeReGo
    • Top 10 Contributor
    • Joined on 01-31-2004
    • 127.0.0.1
    • Posts 864
    • Points 2,424

    Re: Restart Service if down

    WINNT:
    Yes, this will work as well.  The reason I didn't suggest changing the service account credentials is that I didn't think SolarWinds would support it.  That's why I put the system account in a group that had access to all my servers.  I also don't have to worry about managing passwords or account lock-outs. 

    I believe I mentioned this on the previous page here as well as a solution to the problem that I'm using here that doesn't involve changing service credentials. Though that is a possible solution, I agree that it's likely not Solarwinds preferred method.

     

    • Post Points: 3
  • 02-08-2008 9:27 AM In reply to

    • WINNT
    • Top 75 Contributor
    • Joined on 06-22-2004
    • USA
    • Posts 99
    • Points 580

    Re: Restart Service if down

    clapoint:

    Just FYI, I found this resource which might be helpful:

    http://cwashington.netreach.net/depo/view.asp?Index=1143&ScriptType=vbscript

     

    Let us know if anybody is able to get this to work as we're exploring the possibility of making this a built-in capability in the next release of APM.

    HTH


     

     

    I think people are making this more difficult than it really is.  This is really a simple task, and the functionality already exists in Orion.  I would rather the SolarWinds development team work on integrating the SysLog alerts with the Advanced Alerting Engine.  I see this as long overdue.  A good first step would be to allow the variable macros to work including the ability to execute an SQL query. 

    • Post Points: 1
  • 02-08-2008 9:39 AM In reply to

    • WINNT
    • Top 75 Contributor
    • Joined on 06-22-2004
    • USA
    • Posts 99
    • Points 580

    Re: Restart Service if down

    aLTeReGo:

    WINNT:
    Yes, this will work as well.  The reason I didn't suggest changing the service account credentials is that I didn't think SolarWinds would support it.  That's why I put the system account in a group that had access to all my servers.  I also don't have to worry about managing passwords or account lock-outs. 

    I believe I mentioned this on the previous page here as well as a solution to the problem that I'm using here that doesn't involve changing service credentials. Though that is a possible solution, I agree that it's likely not Solarwinds preferred method.

    One thing to note, aLTeReGo, is that you mentioned that the localsystem account doesn't have access to remote systems.  This is true until you grant the localsystem account access to the remote systems.  The localsystem account is just like a user account in that you can add it to groups and access lists.  If you would add the localsystem account (i.e. orionserver$) to your Administrators group, it will then have access to run remote commands without changing the alerting service account or using the runas command. 

    • Post Points: 3
  • 02-08-2008 11:06 AM In reply to

    • aLTeReGo
    • Top 10 Contributor
    • Joined on 01-31-2004
    • 127.0.0.1
    • Posts 864
    • Points 2,424

    Re: Restart Service if down

    WINNT:
    One thing to note, aLTeReGo, is that you mentioned that the localsystem account doesn't have access to remote systems.  This is true until you grant the localsystem account access to the remote systems.  The localsystem account is just like a user account in that you can add it to groups and access lists.  If you would add the localsystem account (i.e. orionserver$) to your Administrators group, it will then have access to run remote commands without changing the alerting service account or using the runas command. 

     Brilliant! I honestly never thought of that. Thanks!

    • Post Points: 1
Page 2 of 2 (31 items) < Previous 1 2