Ad Widget

Collapse

Check whether process is running in one of the server where template is assigned

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Lurnux
    Junior Member
    • May 2014
    • 22

    #1

    Check whether process is running in one of the server where template is assigned

    I have three servers which all have same template assigned. In my template there is a key that check if process is running on the server or not (1=is running and 0=not running).
    Is it possible to create a trigger to the template that would check which servers has been assigned to this template and alert if the process is not running in any of them or more than one of them?
  • tcilmo
    Senior Member
    • Nov 2016
    • 122

    #2
    Originally posted by Lurnux
    I have three servers which all have same template assigned. In my template there is a key that check if process is running on the server or not (1=is running and 0=not running).
    Is it possible to create a trigger to the template that would check which servers has been assigned to this template and alert if the process is not running in any of them or more than one of them?
    No, not possible with template. You should be able create a new trigger on one of the hosts (no template) and piggy back off of the service item in the template (if you want to keep the existing in place)

    Your trigger express will look like this:

    {my_server_name_1:service_state[service_to_monitor].last()}=0 and {my_server_name_2:service_state[service_to_monitor].last()}=0 and {my_server_name_3:service_state[service_to_monitor].last()}=0

    If you want want to use the existing template, the item will have to be created on each host.

    You can create additional triggers as needed using or statements as well.

    However, I really do see this as a better solution that what you already have in place. Good luck.


    Comment

    Working...