Ad Widget

Collapse

find all hosts that have no action defined

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • tvtue
    Member
    • Sep 2012
    • 71

    #1

    find all hosts that have no action defined

    Hello,

    it should be possible to formulate a SQL statement which lists all hosts, that have no action defined for them. If working together with multiple admins, it would be nice to tell them where they missed something.

    I took a look into the tables, but I haven't found the glue between hosts, triggers and actions so far.

    This gives all hosts, that are of interest:
    Code:
    SELECT host,status FROM hosts WHERE status=0;
    and these are all actions:
    Code:
    SELECT actionid,name FROM actions WHERE eventsource=0 AND status=0;
    Maybe someone has done this before and can help me?

    We are using Zabbix 2.0.x with postgres.

    thx and regards,
    tvtue
  • Heilig
    Senior Member
    Zabbix Certified Trainer
    Zabbix Certified SpecialistZabbix Certified Professional
    • Mar 2013
    • 366

    #2
    Originally posted by tvtue
    I took a look into the tables, but I haven't found the glue between hosts, triggers and actions so far.
    Perhaps, you be able to find the glue here.

    Comment

    • tvtue
      Member
      • Sep 2012
      • 71

      #3
      Hello Heilig,

      thank you for that link. I haven't found the time to digg deeper into that yet. But will have a look.

      tvtue.

      Comment

      • Heilig
        Senior Member
        Zabbix Certified Trainer
        Zabbix Certified SpecialistZabbix Certified Professional
        • Mar 2013
        • 366

        #4
        In this situation, is more correct to use the API. See method action.get (https://www.zabbix.com/documentation...api/action/get) and action.exists (https://www.zabbix.com/documentation.../action/exists), perhaps you don't need glue.

        Comment

        Working...