Ad Widget

Collapse

Notification mails when host is added or deleted manually

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • kcadmin
    Junior Member
    • Sep 2023
    • 2

    #1

    Notification mails when host is added or deleted manually

    Hi there!

    We're using Zabbix 6 LTS on our systems.
    I want to achieve that a notification mail is sent whenever a host is added or deleted manually. We do not use the auto-registration.

    Several people have the rights to create or delete hosts here.

    I can't find anything related to that under "Actions" to achieve what I want to do.

    TIA for your help
  • kcadmin
    Junior Member
    • Sep 2023
    • 2

    #2
    *bump*

    Is there really no possibility to achieve this?

    Comment

    • LenR
      Senior Member
      • Sep 2009
      • 1005

      #3
      AFAIK there is nothing built-in that would do this. There are actions for auto registration. I think the assumption is that the adminis with authority to add/delete hosts are trustworthy.

      Depending on how timely you need notification, you could write an API to save the hosts and their status (active/inactive) in a table called BEFORE. Then schedule another API to compare current hosts to BEFORE, report and refresh BEFORE.

      I'm not an expert DBA, but could DB triggers do this?

      Comment

      • tim.mooney
        Senior Member
        • Dec 2012
        • 1427

        #4
        I would agree with LenR's answer, there's nothing currently built-in to do this.

        The Zabbix audit logs have improved quite a bit in recent versions, though. I've used the Zabbix API in the past to solve problems that we have that don't have a built-in solution. I don't know if the audit area is even available via the API, but if it is, you may be able to script something through the API to report on certain types of audit records.

        Comment

        • dimir
          Zabbix developer
          • Apr 2011
          • 1080

          #5
          It is: https://www.zabbix.com/documentation...e/auditlog/get

          Comment

          Working...