Ad Widget

Collapse

zabbix integration with ELK stack, grafana

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • pc99096
    Senior Member
    • Oct 2011
    • 193

    #1

    zabbix integration with ELK stack, grafana

    i thought i could share here some of the experiences with the tools we've been experimenting with in the last few weeks.
    due to some limitations in the zabbix architecture (slow API, "latest data" screen being extremely slow, busy housekeeper, backend DB performance, need for DB partitioning, lack of proper reports etc), we have decided to try some alternatives.

    so what we are doing:
    pushing some linux server logs (messages, apache, app logs etc) via filebeat to ELK. therefore it makes sense for us to use ELK for zabbix metrics as well. other option we have considered was influxdb, but since ELK is already there, we simply used it and it works fine so far.

    there is a very nice node.js application, which reads zabbix data directly from the DB and can push it to elasticsearch - https://github.com/jojohappy/zabbix-relay
    we have a simple cronjob, which runs every 5 minutes and loads the last 5 minutes into elasticsearch (i wish there was some native real-time integration in zabbix )

    as a frontend, grafana seems to be the best option, especially when you have this nice plugin - https://github.com/alexanderzobnin/grafana-zabbix
    it is using zabbix API and therefore speed is not very good, but you can display for example zabbix dashboard together it any other grafana items (graphs, tables etc).

    kibana is nice for analysing logs, but for dashboards, i think that grafana clearly wins here.

    i believe that modular setup like this is the future (as opposed to current "monolithic" zabbix architecture) and i hope next zabbix releases will try to integrate as much as possible with at least some of those products.

    we are still in the early evaluation phase, for example still missing some reports, but hopefully we will find a way here also

    we will also definitely consider the logstash zabbix output - https://www.elastic.co/guide/en/logs...ts-zabbix.html


    anyone else maybe going the same direction?
  • jan.garaj
    Senior Member
    Zabbix Certified Specialist
    • Jan 2010
    • 506

    #2
    Utilize ELK stack properly and use/write beat (docker, top, packer, ...) for every check, which you need. You will have nice graphs (Kibana/Grafana), fast response time, horizontal scale-ability, ...
    Well, depends on your requirements. But if you don't need Zabbix features (authentication/authorization, smart triggers, alerting, API, ...), then I don't see any reason why integrate Zabbix into ELK.
    Devops Monitoring Expert advice: Dockerize/automate/monitor all the things.
    My DevOps stack: Docker / Kubernetes / Mesos / ECS / Terraform / Elasticsearch / Zabbix / Grafana / Puppet / Ansible / Vagrant

    Comment

    • GPegel
      Senior Member
      Zabbix Certified SpecialistZabbix Certified Professional
      • Dec 2015
      • 113

      #3
      Keep in mind that Kibana is only for showing results of log files and creating some fancy dashboards, Grafana only for showing some fancy graphics but the part where Zabbix comes in is when you need triggers and allerting.

      We have a ELK setup (incl. a couple of REDIS servers) for reading all the log files in our environment (500+ Windows, AIX, CentOS and Websphere servers). The reason why I use Zabbix (version 3.0.3) is to be able to trigger and send allerts when there's something in the log files that needs proper attention.

      For example, graphs in Grafana look really cool but I can't create trends in Grafana. In Grafana or Kibana, I can't predict, based on history data and current SLA's, what will happen when something is going on in our systems. Zabbix can. Zabbix is also able to calculate results I gathered from Logstash and those results could trigger (or not) some allerts. Since this morning I'm also capable of writing SQL queries in Zabbix to be able to get some results from Oracle databases and use those results to trigger an item when there's a wrong value in the database.

      No I'm not going to earn some extra money by saying what a great tool Zabbix is but I want you to realise that all those tools have their own pro's and con's. And use those tools where they are meant for. Zabbix is capable of showing some graphs but they look like they are from the 80's. But, they are functional.

      To make a long story short, I use ELK for logging, Grafana for a nice graphical representation of our ELK stack and Zabbix for monitoring, triggering and allerting of all the messages in our environment. And I'm talking about +/- 20.000.000 messages every 24 hours.

      By the way, you mentioned 'lack of proper reports' in Zabbix. Which reporting option does Grafana & Kibana have?

      Comment

      • GPegel
        Senior Member
        Zabbix Certified SpecialistZabbix Certified Professional
        • Dec 2015
        • 113

        #4
        One note... I've installed the newest version of Grafana yesterday and it seems like it is also capable of doing something with trends. I'm going to try this and I will keep you posted.

        Comment

        • kloczek
          Senior Member
          • Jun 2006
          • 1771

          #5
          Originally posted by GPegel
          One note... I've installed the newest version of Grafana yesterday and it seems like it is also capable of doing something with trends. I'm going to try this and I will keep you posted.
          So Grafana is more and more like zabbix but still without proper alarming?
          http://uk.linkedin.com/pub/tomasz-k%...zko/6/940/430/
          https://kloczek.wordpress.com/
          zapish - Zabbix API SHell binding https://github.com/kloczek/zapish
          My zabbix templates https://github.com/kloczek/zabbix-templates

          Comment

          • GPegel
            Senior Member
            Zabbix Certified SpecialistZabbix Certified Professional
            • Dec 2015
            • 113

            #6
            No, Grafana is by far not like Zabbix

            Grafana isn't capable of setting triggers on different items, it's also not able to execute remote commands like Zabbix can. But... Grafana is really cool. Now with the newest updates I discovered that there are 2 templates in Grafana who I can import from the Zabbix plugin. Now I can see the complete health of my Zabbix monitoring cluster in one dashboard without coding.

            Comment

            • kloczek
              Senior Member
              • Jun 2006
              • 1771

              #7
              Originally posted by GPegel
              No, Grafana is by far not like Zabbix

              Grafana isn't capable of setting triggers on different items, it's also not able to execute remote commands like Zabbix can. But... Grafana is really cool. Now with the newest updates I discovered that there are 2 templates in Grafana who I can import from the Zabbix plugin. Now I can see the complete health of my Zabbix monitoring cluster in one dashboard without coding.
              IMO Grafana it is still a bit waste of time but it is my private opinion
              Why? Because development of the zabbix is driven by exact needs of the customers which needs some functionalities and are able to pay for for new features than only nice looking interface.
              Speaking about interface. In zbx 3.0 has been introduced some parts of web interface changes which sooner or later will drive this interface to be drown on web browser side which will allow do much more on interactive presentation of the raw data.
              Complexity of introducing such set of changes would be far lower than adding to Grafana all zabbix non-presentation layer changes.
              Zabbix is already used on scale where every minute is written to zabbix DB backend few GB of raw data and thousands of hosts/devices. If someone is working on such scale cuteness of single dashboard is nothing as long as this dashboard cannot be templated across many hosts with some set of monitored metrics similarities.
              BTW dashboards .. in case of zabbix it is possible to have per host dashboards using screens which may contain not only graphs.

              Grafana IMO is to much focuses on presenting data and to be honest .. IMO it is nothing more than only this part.
              http://uk.linkedin.com/pub/tomasz-k%...zko/6/940/430/
              https://kloczek.wordpress.com/
              zapish - Zabbix API SHell binding https://github.com/kloczek/zapish
              My zabbix templates https://github.com/kloczek/zabbix-templates

              Comment

              • GPegel
                Senior Member
                Zabbix Certified SpecialistZabbix Certified Professional
                • Dec 2015
                • 113

                #8
                I totally share your opinion. That's why I said in my post earlier that we need to use these tools as what they are meant for. Zabbix is in my opinion a complete toolbox about monitoring, triggering and allerting. Grafana is just... yeah wel...it's just another dashboard. It looks cool though.

                Comment

                • pc99096
                  Senior Member
                  • Oct 2011
                  • 193

                  #9
                  Originally posted by GPegel
                  I totally share your opinion. That's why I said in my post earlier that we need to use these tools as what they are meant for. Zabbix is in my opinion a complete toolbox about monitoring, triggering and allerting. Grafana is just... yeah wel...it's just another dashboard. It looks cool though.
                  that is exactly what we use it for - nice dashboard. since we implemented grafana, most of the people stopped using zabbix at all. all they need is to see the zabbix dashboard with latest issues and a few graphs and numbers. grafana graphs and dashboards (with data pulled through zabbix API) are much simpler to configure and they look way better.

                  zabbix is obviously still running in the background, doing all the stuff around collecting data, triggering, alerting and emailing.

                  Comment

                  • onallion
                    Senior Member
                    • Mar 2016
                    • 131

                    #10
                    We use ELK, Zabbix and Grafana as well.

                    Zabbix for monitoring and alerting on our various hardware (the alerts are sent via email and to cellphones via Pagerduty, with escalations etc.).

                    ELK for collecting Windows/IIS/Application logs. Kibana is mostly used for easy centralized log browsing, we don't use the dashboards.

                    Grafana to create beautiful and informative dashboards from our Zabbix data.
                    We've made many cool dashboards to monitor our entire network stack, iLO, branch offices...

                    We also use Graphite for application metrics (using StatsD).

                    What we're currently missing is alerting on the logs that go through ELK, any recommendations?

                    Comment

                    • kloczek
                      Senior Member
                      • Jun 2006
                      • 1771

                      #11
                      Originally posted by onallion
                      ELK for collecting Windows/IIS/Application logs. Kibana is mostly used for easy centralized log browsing, we don't use the dashboards.
                      If it is simple/plain log collection it can be done by zabbix agent without ELK.
                      http://uk.linkedin.com/pub/tomasz-k%...zko/6/940/430/
                      https://kloczek.wordpress.com/
                      zapish - Zabbix API SHell binding https://github.com/kloczek/zapish
                      My zabbix templates https://github.com/kloczek/zabbix-templates

                      Comment

                      • onallion
                        Senior Member
                        • Mar 2016
                        • 131

                        #12
                        Our developers use Log4net for their application logs

                        Comment

                        • angelhc
                          Senior Member
                          Zabbix Certified Specialist
                          • Nov 2009
                          • 226

                          #13
                          AFAIK ELK is a complete stack to process Petabytes of logs, can not imagine if we process that amount of logs with Zabbix server.. kloczek Are you sure the zabbix server can made a unified search with only one sessionID on 40 apache logs?
                          So interested on the integration with ELK, I think the output plugin for logtash will be a good option.
                          Regards
                          Number of hosts 1600,Number of items +90k,Number of triggers +22k, Number of users +100, New values per second +1270

                          http://zabbixes.wordpress.com/

                          Comment

                          • zabbixfk
                            Senior Member
                            • Jun 2013
                            • 256

                            #14
                            Originally posted by onallion
                            We use ELK, Zabbix and Grafana as well.

                            Zabbix for monitoring and alerting on our various hardware (the alerts are sent via email and to cellphones via Pagerduty, with escalations etc.).

                            ELK for collecting Windows/IIS/Application logs. Kibana is mostly used for easy centralized log browsing, we don't use the dashboards.

                            Grafana to create beautiful and informative dashboards from our Zabbix data.
                            We've made many cool dashboards to monitor our entire network stack, iLO, branch offices...

                            We also use Graphite for application metrics (using StatsD).

                            What we're currently missing is alerting on the logs that go through ELK, any recommendations?
                            Can you share how did you integrated graphana and zabbix. I wanted a decent dashboard ,
                            to my alerts/triggers grouped together
                            to latest data sorted and all - graphana seems an option.

                            Thanks

                            Comment

                            • GPegel
                              Senior Member
                              Zabbix Certified SpecialistZabbix Certified Professional
                              • Dec 2015
                              • 113

                              #15
                              just download the grafana-zabbix plugin and install this on your server.

                              When installed, configure the Zabbix datasource in Grafana so it's able to talk to the Zabbix API.

                              Comment

                              Working...