Ad Widget

Collapse

Trigger News Ticker

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • navtek007
    Senior Member
    • May 2005
    • 100

    #1

    Trigger News Ticker

    Hi All,

    I have just created a rss feed from zabbix. See below for the steps

    1. save the attached rss.php on your zabbix server.. (thanks to http://www.cadenhead.org/workbench/s...ta-in-rss.html)

    2. save the attached db_connect.php anywhere that is accessible from your rss.php file (once again thanks to http://www.cadenhead.org/workbench/s...ta-in-rss.html)

    have a bit of a look and if you want modify the $query1 to select what ever information you want to show out of Zabbix on the ticker.

    3. edit the contents of the db_connect.php to access your mysql server

    4. now download the news ticker from http://www.rssnewsticker.com and install on your pc. There are plenty out there.

    5. add a feed that points to your php file on the zabbix server eg: http://monitor.domain.com/rss.php

    That should be about it you should then start to see zabbix data scrolling accross the screen.

    I hope this is useful to some people.
    Attached Files
    Last edited by navtek007; 21-04-2006, 08:56.
  • elkor
    Senior Member
    • Jul 2005
    • 299

    #2
    Neat

    thanks!

    Comment

    • crs9
      Member
      • Feb 2006
      • 35

      #3
      issues

      This looks super simple , so I dont know what I'm doing wrong. It's not giving me any info for my news feed. I even have the db_connect in the same directory as the rss.php for testing. I have put the correct info in the db_connect, changed owner and permission to it. I have even restart httpd. Any ideas what I'm missing?

      Thanks

      Comment

      • navtek007
        Senior Member
        • May 2005
        • 100

        #4
        A simple test is to point your web browser to your rss.php file and make sure that your data is visible. It should look like a xml file with a whole bunch of items (zabbix data) listed..

        If you see no items then there must be something wrong with the sql. Maybe test the sql from mysql command line first

        If you dont see any xml output then try adding the following line to your httpd.conf

        AddType application/x-httpd-php .xml

        Comment

        • cybaspace
          Member
          • Jul 2005
          • 43

          #5
          I only get the first trigger displayed, but there should be more active.

          I have tested the query and that went okay.

          The first time I revceived a parse error in line 19 of rss.php. the '}' was wrong, I believe it should be '{'

          Please help! this would be a verry nice feature

          Cheers!
          Rob
          Last edited by cybaspace; 02-05-2006, 16:50.

          Comment

          • navtek007
            Senior Member
            • May 2005
            • 100

            #6
            what do you get when you place the rss.php file in your browser? Do you get a list of items?

            Comment

            • cybaspace
              Member
              • Jul 2005
              • 43

              #7
              I found the solution.

              Bits of the code was appended to a comment.

              After that it displayed all active triggers, but also the active triggers of 'not monitored' hosts. I changed the $query1 to:

              select triggers.description description, items.lastvalue lastvalue, hosts.host host from triggers, functions, items, hosts where triggers.triggerid = functions.triggerid and items.itemid = functions.itemid and hosts.hostid = items.hostid and hosts.host like '%' and hosts.status=0 and triggers.value = 1 and triggers.status = 0;

              and that fixed it.

              Thanks!

              Comment

              • ruckus37
                Member
                • Oct 2004
                • 57

                #8
                Anyone got a clean copy of this code, the comments are all mixed with the code..

                Comment

                • crayons
                  Junior Member
                  • Oct 2006
                  • 21

                  #9
                  cybaspace perhaps you could attach the code that works for you. I have been unable to get mine to work as well. I tested the query and it works. I just get a blank screen when I goto the rss.php screen.

                  Comment

                  • triplem
                    Junior Member
                    • Jun 2006
                    • 4

                    #10
                    Originally posted by crayons
                    cybaspace perhaps you could attach the code that works for you. I have been unable to get mine to work as well. I tested the query and it works. I just get a blank screen when I goto the rss.php screen.
                    Same result here. This result is after I cleaned up the code ans tested the query as well.

                    Comment

                    • AlexeyHTK
                      Junior Member
                      • Mar 2007
                      • 3

                      #11
                      I think that this feature must included in next version of zabbix-frontend.

                      Comment

                      Working...