Ad Widget

Collapse

trigger on a group of windows services

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • MAX270
    Junior Member
    • Jan 2020
    • 2

    #1

    trigger on a group of windows services

    hello everyone;
    i'm new here. i search on a lot of websites for my problem but haven't found anything so i'm asking my question here.
    here it is:
    i have to check the state of many services with "Commvault" in their displayname like Commvault Client Manager Service or Commvault Media Mount Manager.
    I create a discovery rules named services commvault with item key service discovery
    Then i create a item prototype with name
    services {#SERVICE.DISPLAYNAME}and item key service.info[{#SERVICE.DISPLAYNAME}:"Commvault", state]

    I want to create items only for services with commvault in their displayname.
    My final purpose is to create a trigger prototype for the state of all of these services if they are stopped. Then create an action with a remote command to restart the service
    ( i've already did it before but for each services on my windows...)


    if someone can help me, thank you
  • tim.mooney
    Senior Member
    • Dec 2012
    • 1427

    #2
    Are you using auto-discovery because there are a large number of systems (like hundreds of backup clients) and you don't know the members of that set (they change outside of your control)?

    You mention the Media Mount Manager, which I imagine only runs on your media server(s), which is probably a very small set that you know the members of?

    I think what you're trying to do should be possible, but I don't actually have a lot of experience with auto-discovery, so I can't offer you much advice on that part of it.

    I can say that we do this kind of thing, just using templates that we've defined, but we know the set of systems we need to apply a particular service monitoring template to. That means we don't need to use auto-discovery for this set of items & triggers.

    Comment

    • MAX270
      Junior Member
      • Jan 2020
      • 2

      #3
      Hello Tim
      thanks for your answer;
      i was using auto discovery before but i have some trouble when an action was activate after a trigger because it was for each service and not only for Commvault service (received a thousand mails for this mistake )
      i only have to watch for media agent and commserv, i don't need to care for each hosts.
      i have 5 commvault servie on media agent and near 15 on commserve. i just want to manage each service with a "Commvault " in the displayname.
      i tried once to create a trigger for each service of commvault but i can't do the remote command to restart it . So i just tried something else but it didn't work. The real purpose is the remote command for the restart of a Commvault service stopped.
      But thanks for your Message and i think it's possible to do that but i don't know how...

      Comment

      • tim.mooney
        Senior Member
        • Dec 2012
        • 1427

        #4
        Originally posted by MAX270
        i only have to watch for media agent and commserv, i don't need to care for each hosts.
        i have 5 commvault servie on media agent and near 15 on commserve. i just want to manage each service with a "Commvault " in the displayname.
        It's possible, we're doing it here for some of our problematic Windows services, but we've manually defined each service that we want to monitor.

        If you know the systems/servers that have these services running, then you don't need to use low-level discovery (auto-discovery). I'm not saying auto-discovery is bad. It's very powerful, and for a large environment it's extremely useful. But in this case, I think it's additional complexity that you don't need. You already know the specific hosts involved, and you know the specific service names.

        If I were you, I would manually create one template for your media agent and a separate template for your commserv, and then manually create the service.info[] items for each service. Once you have 1 item, you can "clone", change the name to the next service, and then "save" to quickly create the 5 items for the media agent template and the 15 items for the commserv. For the items, I would be sure to set the "Show values" to "Windows service state".

        Once you've manually created the items, assigning triggers to each of the templates is again fairly easy. You can clone and save to quickly create all the triggers you need too. Depending on how your Actions are written, it may help you select these particular problems if each trigger has a tag that your Action can use as a Condition, something like Name: CommVaultService Value: AutoRestart or something similar. Anything so that you can easily identify problems generated by just these triggers.

        Then it's the difficult work of writing your Action and debugging the remote command, and getting it working.

        Comment

        Working...