skip to Main Content

I have followed this guide:

https://support.nagios.com/kb/article/nagios-core-performance-graphs-using-influxdb-nagflux-grafana-histou-802.html#Nagflux_Config

Already have pnp4nagios running on the server (Debian 9). But I can’t get any further, busy for weeks to try to get this fixed.

I am stuck at this point:

Verify Nagflux Is Working

Execute the following query to verify that InfluxDB is being populated with Nagios performance data:

curl -G "http://localhost:8086/query?db=nagflux&pretty=true" --data-urlencode "q=show series"

When I execute that command I get this:

{
    "results": [
        {}
    ]
}

Already done this on another distro (CentOS 8), still not results.

But when I execute this command (earlier in the documentation)

curl -G "http://localhost:8086/query?pretty=true" --data-urlencode "q=show databases"

This works:


{
    "results": [
        {
            "series": [
                {
                    "name": "databases",
                    "columns": [
                        "name"
                    ],
                    "values": [
                        [
                            "_internal"
                        ],
                        [
                            "nagflux"
                        ]
                    ]
                }
            ]
        }
    ]
}

I can add the InfluxDB datasource succesfully in Grafana but I can not select any data when I try so select it from the field "FROM".

It’s only showing:

  • Default
  • Autogen

So I am very curious what am I doing wrong, normally the documentation from Nagios support works very good.

Thank you big time for reading my issue :).

2

Answers


  1. As you already have PNP4Nagios installed, https://support.nagios.com/kb/article/nagios-core-using-grafana-with-pnp4nagios-803.html would be more apropriate solution for you.

    /usr/local/nagios/etc/nagios.cfg has different host_perfdata_file_processing_command when you try to fill influxdb (with nagflux) instead of using Grafana with PNP4Nagios.

    Login or Signup to reply.
  2. You don’t need another server. I have Nagios Core, InfluxDB, Nagflux, Histou and Grafana working on same machine.
    And you don’t have to uninstal PNP4Nagios, just stop & disable service on boot: systemctl stop npcd.service && systemctl disable npcd.service.

    After that you have to edit nagios.cfg according to: https://support.nagios.com/kb/article/nagios-core-performance-graphs-using-influxdb-nagflux-grafana-histou-802.html#Nagios_Command_Config to change host_perfdata_file_processing_command value, and change format of *_perfdata_file_template.

    Then define process-host-perfdata-file-nagflux & process-service-perfdata-file-nagflux commands in commands.cfg.

    If you did like described above, after minute you should see changes in your nagflux database.
    Install influxdb-client, then:

    influx
    use nagflux
    SELECT * FROM METRICS
    

    You should see your database loading 🙂

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search