Ad Widget

Collapse

Macros {HOSTNAME} & {IPADDRESS} in discovery actions

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • elgoretto
    Junior Member
    • Sep 2007
    • 28

    #1

    Macros {HOSTNAME} & {IPADDRESS} in discovery actions

    According to the documentation:
    {HOSTNAME} Hostname of first item of the trigger which caused a notification.
    {IPADDRESS} IP address of first item of the trigger which caused a notification.

    So that explains why the messages I tried to send on autodiscovery (such as: "new host discovered", or "host removed") reads *UNKNOWN* instead of the value I expected the macros would return.

    I think it would be a good idea to extend the usage of this both macros, so that they will be usefull in discovery actions too.
  • NOB
    Senior Member
    Zabbix Certified Specialist
    • Mar 2007
    • 469

    #2
    [1.4.2] More problems with Mail-Actions / Auto-discover

    Hi,

    I'll check, whether I can fix this.

    We need both informations to check whether new hosts where discovered and
    act accordingly.
    Information like *UNKNOWN* for host and IP-address are not
    that useful.

    However, there is another problem:

    I receive a lot of mails, i.e. whenever a server is discovered (again and
    again), there is a mail sent !
    I don't like to receive around 1900 mails during one night for just one
    discovered server and still don't know the name and IP-address !

    So is there a way to send this mail just once ?

    Regards

    Norbert.

    Comment

    • elgoretto
      Junior Member
      • Sep 2007
      • 28

      #3
      Originally posted by NOB
      However, there is another problem:

      I receive a lot of mails, i.e. whenever a server is discovered (again and
      again), there is a mail sent !
      I don't like to receive around 1900 mails during one night for just one
      discovered server and still don't know the name and IP-address !
      Same thing here.

      Comment

      • r0k5t4r
        Member
        • Jun 2009
        • 91

        #4
        Has this thing been fixed??

        It's really annoying to receive notifications for newly created hosts all the time that are already in the database. Also the {HOSTNAME} and {IPADDRESS} Macros don't seem to be working yet? I'm using the version that can be installed via apt under Ubuntu: Version: 1:1.6.1-3.

        Regards,
        r0k

        Comment

        • hirschnf
          Member
          • Jan 2010
          • 56

          #5
          Hello,

          are there any news about Discovery Emails and the macro functions?
          When I test this part I got many emails but the macros won't be replaced with the real value.

          I've checked {HOSTNAME}, {IPADDRESS} and so on.

          best regards
          Frank

          Comment

          • r0k5t4r
            Member
            • Jun 2009
            • 91

            #6
            Seems like this issue is still not fixed in 1.8.2. Still receiving emails for hosts that are already in the database and the macros are not working. I would say the send message is completely useless in this this case.

            Comment

            • harden@gsu.edu
              Junior Member
              • May 2010
              • 2

              #7
              Repeated auto discovery notifications

              Hi Folks,

              Running:

              Zabbix Server v1.8.2 (revision 11211)
              Zabbix Agent (daemon) v1.8.2 (revision 11211) (on all hosts)

              Just double checking that there still is NOT a way to turn off repeated auto discovery notifications of host that have already been discovered. Any one have any ideas on how to stop emails of already discovered host running zabbix_agentd?

              Thanks,
              Don

              Comment

              • hirschnf
                Member
                • Jan 2010
                • 56

                #8
                no double discovery messages

                Hello Don,

                there is a way where you will get only one discovery mail of a host.
                On Unix-Systems I have done following in the zabbix_agentd.conf:
                Code:
                UserParameter=system.checkdiscovery,echo `uname``find /var/log/zabbix/ -name "discovered" |wc -l`
                UserParameter=system.discovered,echo System discovered >/var/log/zabbix/discovered
                Then create a discovery rule and a action like in the attachment.

                The trick is the condition where I check "Received value like "AIX 0".
                If the file not exists you will get a Discovery mail. If the file exists you get nothing.

                For Windows systems you can do the same.

                Best regards
                Frank
                Attached Files

                Comment

                • harden@gsu.edu
                  Junior Member
                  • May 2010
                  • 2

                  #9
                  system.discovered works

                  Hi Frank,

                  Thanks for your clever tips on using system.checkdiscovery and system.discovered in /etc/zabbix/zabbix_agentd.conf. It works as expected.

                  Don

                  Comment

                  Working...