Ad Widget

Collapse

Compare two items in trigger, one in template, another on host.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • xibbaz
    Member
    Zabbix Certified Specialist
    • Jun 2009
    • 74

    #1

    Compare two items in trigger, one in template, another on host.

    Hi all,

    I'm trying to compare if the virus definition version on clients is equal the one on the server.

    When I try to add this trigger in Template_Client:

    Code:
    {Template_Client:sep.av.update[-target, client, -key, raw].last(0)}#{server:sep.av.update[-target, server, -key, raw].last(0)}
    I get this error:

    Code:
    - Added trigger "Symantec Endpoint Protection Antivirus definition is out of sync on {HOSTNAME}" to host "Template_Client"
    - Missing key "sep.av.update[-target, server, -key, raw]" for host "Template_Windows"
    I'm wondering is this is supported by Zabbix.
  • JBo
    Senior Member
    • Jan 2011
    • 310

    #2
    Hi,

    Maybe by replacing Template_Client with server name :
    Code:
    {server:sep.av.update[-target, client, -key, raw].last(0)}#{server:sep.av.update[-target, server, -key, raw].last(0)}
    Regards,
    JBo

    Comment

    • xibbaz
      Member
      Zabbix Certified Specialist
      • Jun 2009
      • 74

      #3
      What I'm trying to achieve is a trigger that fires when a client's virus definition is not sync with the one reported on the server. I made a unique Powershell script for both the clients and the server, and I made two templates, one for the clients (Template_client) and one for the server (Template_server) which both call the same script but with a switch parameter (-target):

      In clear this is what the items look like:
      • Template_Client:sep.av.update[-target, client, -key, raw]
      • Template_Server:sep.av.update[-target, server, -key, raw]


      So, since the clients and the server are both already using the Template_Windows template, I simply linked Template_Client to Template_Windows and this does the job. On the server, I linked Template_Server directly to the host.

      So, in clear, this is what it looks like in the template gui:
      • Template_Client linked to -> Template_Windows
      • Template_Server linked to -> Server_Host


      What I think is causing the problem is that the Server_Host is also linked to Template_Windows:
      • Template_Client linked to -> Template_Windows linked to -> Server_Host


      So, in the Template_Client, when I try to create this trigger:
      Code:
      {Template_Client:sep.av.update[-target, client, -key, raw].last(0)}#{Server_Host:sep.av.update[-target, server, -key, raw].last(0)}
      I get this error:
      • Added trigger "Symantec Endpoint Protection Antivirus definition is out of sync on {HOSTNAME}" to host "Template_Client"
      • Missing key "sep.av.update[-target, server, -key, raw]" for host "Template_Windows"
      Which make no sense to me. Why is Zabbix referring to host "Template_Windows"?

      As I am writing this, I'm thinking... Do I have to specify "Server_Host:Template_Server:sep.av.update[...]? I'm sure this is not the case since I used the GUI to navigate to that item.

      So' I think what I'm trying to achieve makes sense but it seem that Zabbix either does not support it or that I do this the wrong way.
      Last edited by xibbaz; 11-04-2012, 15:18.

      Comment

      Working...