Ad Widget

Collapse

Receiving notifications for UNKNOWN events?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • andrewd
    Junior Member
    • Jun 2010
    • 26

    #31
    Noise reduction

    I've you've used my template you may have items that fail to return results periodically because a server is busy or simply what's being polled is not that reliable (some SNMP agents behave like this).

    In order to reduce noise I use the following trigger expression

    Trigger name: Triggers are in state UNKNOWN:{ITEM.VALUE2}
    Trigger expression: {Tem_unsupp_items:unknownTriggersDetails.regexp([[:alnum:]])}=1&{Tem_unsupp_items:unknownTriggersCount.min(#5 )}>0

    As the server is looking for unsupported items every 1 min (on my server), this will trigger if unsupported items are detected for at least 5 minutes.

    Comment

    • chewie71
      Junior Member
      • Feb 2011
      • 12

      #32
      Hi Andrew,

      I'm trying to implement your templates in my Zabbix instance (1.8.7). When I run your DB query below on my Zabbix db, I don't get any data for some reason....so that seems to be why I'm maybe not seeing anything in the GUI?

      Code:
      mysql>  select h.host, t.description, i.key_ from items i left join hosts h on i.hostid = h.hostid left join functions f on i.itemid = f.itemid left join triggers t on f.triggerid = t.triggerid where t.status=0 and t.status=2 and h.status=0;
      Empty set (0.00 sec)
      Thanks,
      Matt


      Originally posted by andrewd

      You could then go straight to the database and run the statement

      Code:
       select h.host, t.description, i.key_ from items i left join hosts h on i.hostid = h.hostid left join functions f on i.itemid = f.itemid left join triggers t on f.triggerid = t.triggerid where t.status=0 and t.status=2 and h.status=0;

      Comment

      • ninguno
        Junior Member
        • Nov 2011
        • 29

        #33
        chewie, that query is wrong, cause your have "t.status = 2 AND t.status = 0" which are mutually exclusive. The right query is inside unsupItemsCheck.pl script.

        Comment

        • ninguno
          Junior Member
          • Nov 2011
          • 29

          #34
          Andrew thanks for your work, the template seems very nice but I don't get it to work.
          What the field 'allowed hosts' mean? Do I have to put the IP of the zabbix server or all the ips of my monitored hosts?

          Besied, I make a try to only configure the templates for the zabbix server (for monitoring unkwown state trigers in the server) but I'm getting one of the following lines in zabbix_server.log for each server monitored and I don't understand why because the template 'Template_unsupported_items' is only assigned to zabbix server and not all the monitored hosts.

          4696:20111114:174238.641 In zbx_popen() command:'/home/zabbix/externalscripts/unsupItemsCheck.pl 127.0.0.1
          ...
          4696:20111114:174238.641 In zbx_popen() command:'/home/zabbix/externalscripts/unsupItemsCheck.pl 192.168.1.102

          Thanks in advance!

          Comment

          • andrewd
            Junior Member
            • Jun 2010
            • 26

            #35
            Allowed host should have to ip of your zabbix server. As this is a trapper item, 'Allowed hosts' lists which servers can submit data for this check.

            'Template_unsupported_items_collector' is only for the zabbix server. This is the template that contains the item that queries the database.

            'Template_unsupported_items' is for each host that you want to check for unsupported items. This template contains items that records what items and triggered have problems.

            Comment

            • ninguno
              Junior Member
              • Nov 2011
              • 29

              #36
              Thanks andrewd! I put the collector template in my zabbix server, and the 'Template_unsupported_items' in the other hosts, all with 127.0.0.1 as "Allowed host" (cause all my hosts are checked from the same zabbix server) and now is working great!

              Comment

              • sineex
                Junior Member
                • Sep 2010
                • 6

                #37
                Doesn't work in 2.0 beta 3

                Database structure changed in pre 2.0 version, script goves me an error:
                DBD::mysql::st execute failed: Unknown column 'h.ip' in 'field list' at /etc/zabbix/externalscripts/unsupItemsCheck.pl line 51.
                SQL Error: Unknown column 'h.ip' in 'field list'

                there is no more column 'ip' in table 'hosts'

                Comment

                • cheezus
                  Member
                  • Nov 2011
                  • 35

                  #38
                  Zabbix: agentd is not running on xxxxx Status UNKNOWN.

                  Seriously? The zabbix agent isn't running which puts the trigger into a failed state that doesn't alert us. Wow... whoever thought this made sense should be kicked in the crotch.

                  Why is this not a an option when creating an action "Trigger value = "PROBLEM"" you add "UNKNOWN" in addtion to just "OK" and "PROBLEM". WTF

                  Comment

                  • cheezus
                    Member
                    • Nov 2011
                    • 35

                    #39
                    *bump

                    _
                    Last edited by richlv; 03-02-2012, 16:01. Reason: removed offtopic image

                    Comment

                    • k_mike
                      Junior Member
                      • Jun 2012
                      • 4

                      #40
                      change for 2.0.1 zabbix:

                      $sql = "SELECT DISTINCT h.host,f.ip,i.key_ FROM items i, hosts h, interface f WHERE i.hostid = h.hostid AND h.status = 0 AND i.status = 3 AND f.hostid = h.hostid AND f.type = 1 and f.ip is not null";

                      Comment

                      • Anth0ny
                        Member
                        • Nov 2009
                        • 85

                        #41
                        hello!

                        need a support with small script modification.

                        i don't want to use clear text login+password at script and tried to read data from zabbix.conf.php but unsuccessful (extremely low perl skill, damn).

                        can anybody help me to do that?

                        need part 'read file (by full path), find SERVER, DATABASE, USER and PASSWORD strings and set their values to the new script's variables'

                        thanks!

                        Comment

                        • ArtemK
                          Senior Member
                          • May 2013
                          • 232

                          #42
                          sorry for dead posting :-)

                          v2.2 database schema changed, to fix sql queries: i.status=3 -> i.state=1

                          Comment

                          • burn1024
                            Member
                            • Jun 2012
                            • 52

                            #43
                            More necroposting: https://github.com/burner1024/zabbix-unknown-data
                            Maybe will be useful to someone.

                            Comment

                            Working...