Ad Widget

Collapse

Zabbix RSS feeds

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • SkyioN
    Junior Member
    • Jun 2007
    • 1

    #1

    Zabbix RSS feeds

    Hey Guys, Kind New to this, but it would be kewl if zabbix had RSS feeds for events.
  • qix
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • Oct 2006
    • 423

    #2
    This would indeed be a nice add-on.
    Perhaps this could also be done by a script? (media type??)
    With kind regards,

    Raymond

    Comment

    • Alexei
      Founder, CEO
      Zabbix Certified Trainer
      Zabbix Certified SpecialistZabbix Certified Professional
      • Sep 2004
      • 5654

      #3
      Added to wish list for 1.6.
      Alexei Vladishev
      Creator of Zabbix, Product manager
      New York | Tokyo | Riga
      My Twitter

      Comment

      • lostmarbles
        Member
        • Mar 2009
        • 50

        #4
        Sorry to bring this zombie thread up from the long dead....

        Did you guys ever add this feature?

        I need events available via RSS so I can post them in our forum automatically.

        Comment

        • bogdar
          Member
          • Jan 2009
          • 33

          #5
          Are there any way for automated data export?
          At least triggers values?

          Comment

          • richlv
            Senior Member
            Zabbix Certified Trainer
            Zabbix Certified SpecialistZabbix Certified Professional
            • Oct 2005
            • 3112

            #6
            you could try using external script as an action target (already suggested here)
            Zabbix 3.0 Network Monitoring book

            Comment

            • bulledk
              Junior Member
              • Jul 2009
              • 22

              #7
              Originally posted by lostmarbles
              Sorry to bring this zombie thread up from the long dead....

              Did you guys ever add this feature?

              I need events available via RSS so I can post them in our forum automatically.
              Hi, did you find something... ?

              Comment

              • antani
                Member
                • Apr 2008
                • 50

                #8
                Originally posted by lostmarbles
                Sorry to bring this zombie thread up from the long dead....

                Did you guys ever add this feature?

                I need events available via RSS so I can post them in our forum automatically.
                I wish to have this feature too. Any news?

                Comment

                • gryphius
                  Member
                  • Aug 2007
                  • 30

                  #9
                  made a quick hack to display all active triggers in rss format. definitely not perfect but may serve as a pointer to get started...

                  Code:
                  <?php
                  header('Content-type: ' . 'text/xml');
                  echo "<?xml version='1.0' encoding='ISO-8859-1' ?>";
                  ?>
                  <rss version='2.0'>
                  <channel>
                  <title>your title</title>
                  <link>http://www.zabbix.com</link>
                  <description>Zabbix Triggers</description>
                  <?php
                  function rssitem($title,$link,$description){
                   echo "<item>\n";
                   echo " <title>$title</title>\n";
                   echo " <link>$link</link>\n";
                   echo " <description>$description</description>\n";
                   echo "</item>\n";
                  }
                  
                  $conn=mysql_connect('localhost','root','');
                  $sel=mysql_select_db('zabbix');
                  $query="select host,triggers.description from triggers inner join functions on (functions.triggerid=triggers.triggerid) inner join items on(items.itemid=functions.itemid) inner join hosts on (items.hostid=hosts.hostid) where (triggers.value=1 or (triggers.value=0 and unix_timestamp(now()) -triggers.lastchange < 1800)) and hosts.status=0 and items.status=0";
                  $result=mysql_query($query);
                  $counter=0;
                  $total=mysql_affected_rows();
                  while($row=mysql_fetch_array($result)){
                   $counter++;
                   $title="Trigger $counter of $total";
                   $description=str_replace('{HOSTNAME}',$row[0],$row[1]);
                   $link='http://www.yourzabbixhost.com'; #maybe add direct links to trigger here
                   rssitem($title,$link,$description);
                  }
                  if($counter==0){
                   rssitem('All good','http://www.yourzabbixhost.com/','No Triggers are active');
                  }
                  ?>
                  </channel>
                  </rss>

                  Comment

                  • nepto
                    Junior Member
                    • Sep 2007
                    • 12

                    #10
                    Though the official way how to fetch data from Zabbix is to use API, the script above is very good and it works just well. It is easy to alter and customize. Great work!

                    However there is one bug -- if there are two or more triggers per one host, only one trigger is displayed. I need to fix this. Once I will have it ready, I will post a bugfix here.

                    Comment

                    Working...