Grafana is an open source platform for real-time data display and monitoring. One of its functions is the creation of interactive and customizable dashboards that make metric analysis from several sources, such as databases, monitoring systems and cloud platforms.
Its flexibility and compatibility with multiple data providers make it an essential tool for observability and decision making in IT environments.
What advantages does it offer for your infrastructure?
- Real-time monitoring of metrics and logs.
- Support for multiple data sources, such as Prometheus, InfluxDB, MySQL, AWS CloudWatch, and more.
- Customizable alerts and notifications for a proactive response.
- Intuitive and highly customizable interface for effective visual analysis.
- Scalability and extensibility through custom plugins and boards.
Grafana is perfect for organizations looking to improve the visibility of their systems, optimize monitoring, and make data-driven decision making easier.
Grafana integration with Pandora FMS
Grafana has an integration in Pandora FMS, which allows to merge both monitoring platforms. In order to use this integration, only a few minimum prerequisites are necessary:
- API extension loaded in Pandora.
- Access from Grafana to Pandora machine from which you will receive the data and which has the API Extension loaded.
- Enable the plugin ID in the Grafana configuration file.
These configurations can be done quickly by following the steps below:
1. Add Pandora FMS Extension
First of all, start in your Pandora FMS console the extension that will allow you to obtain the data to be represented in Grafana dashboards.
To that end, just download the ZIP package that you may find in your library and upload it to Pandora FMS console from the menu: Admin tools > Extension manager > Extension uploader:
It is important not to check the “Upload enterprise extension” option.
In short, these steps basically locate the contents of the ZIP file in the extensions directory of Pandora FMS console, which will lead to the directory being created:
/var/www/html/pandora_console/extensions/grafana
If, as in this case, the installation is based on a Pandora FMS ISO, it will also be necessary to modify a configuration parameter of the Apache server.
Just edit the file /etc/httpd/conf/httpd.conf, and set the parameter “AllowOverride none” as “AllowOverride All”, within the directives of the block ‘
Also add a parameter in the PHP settings. Add the following line at the end of the file /etc/php.ini: serialize_precision = -1
And for these changes to go into effect, the Apache service must be restarted: Upload the ZIP file to the Grafana server with all the plugin files and place it in the path “/var/lib/grafana/plugins”. Unzip the file on this path with the “unzip” command and restart the Grafana service to load it: Add the following lines to the end of the Grafana configuration file (/etc/grafana/grafana.ini): After this change is applied, the Grafana service must be restarted using the following command: service grafana-server restart At this point, what you have to do is configure the plugin uploaded in Grafana so that it connects to the extension loaded in Pandora FMS and allows you to use its data in Grafana dashboards. You will see different plugins that you may configure, and at the bottom of the list, you will see the plugin that you just loaded for Pandora FMS. Click on it: This will take you to a form where you only need to fill out 3 fields for the connection with the Pandora FMS extension: With these fields completed, you may click on “Save & Test ” to verify the operation of your new data source: In configuration you might see different errors, such as: First, go to the “Create > Dashboard” menu, and in the board that will appear, click “Add query”: This will take you to a form where to choose your “Pandora FMS” data source in the “Query” drop-down. This will make the bottom of the form change and you will see a query to choose a module from which to display the data on the board: And once done, there you have your Pandora FMS data in Grafana. You may include more than one query in the same board, which allows you to compare data from different modules: And you may also add more boards within the same Grafana dashboard, so that you have all the necessary information on the same screen. You may create an alert from the “Alert” menu, in the dashboard display (once the Dashboard is saved). In this menu, adjust a few rules to configure your alert: 2. Define the query and the alert condition. 3. Establish alert evaluation behavior. 4. Add notes. 5. Set up notifications. Once the alert is configured and saved, you may see it in the dashboard: Pandora FMS’s editorial team is made up of a group of writers and IT professionals with one thing in common: their passion for computer system monitoring. Pandora FMS’s editorial team is made up of a group of writers and IT professionals with one thing in common: their passion for computer system monitoring.
2. Loading Pandora FMS plugin for Grafana
3. Configuring Pandora FMS as data source for Grafana dashboards
Access the “Configuration > Datasources” menu in Grafana and click on the “Add datasource” button:
What happens if it does not work properly?
Create your first Dashboard in Grafana
Create your first alarm in Grafana
1 . Set the name of the alert rule.