How do I properly display this value from Nagios in Grafana?

Hello

Im not sure how to explain this so Ill just post some screenshots

I have the following in Nagios:

As we can see, that is the only performance data being returned

In Grafana, Im getting that performance data so I am seeing graphs like this:

image

In the Nagios screenshot, I included a graphic similar to what I would want Grafana to show (lower left hand corner in the Nagios screenshot)

How can I get the percentage used shown instead of just a full value of the MB used?

Please tell me if I am unclear.

Thank you

Hi @riahc3

To get a gauge where you can view the % used (5673406.4) along with the full value (2658191.29), you should have 2 queries. Query A is the % used and Query B is the full value. Then use a transformation in Grafana “Config From Query Results” and set Query B to be the maximum value displayed on the gauge.

1 Like

Thank you for your help

I have the following query:

Here is the stored procedure

CREATE DEFINER=`root`@`localhost` PROCEDURE `DATASTORAGES_VCENTER`()
BEGIN
DECLARE i INT DEFAULT 0;
DECLARE n INT DEFAULT 0;
SET i=1;
SET n=50;
DROP TEMPORARY TABLE IF EXISTS temp_storagevcenter;
CREATE TEMPORARY TABLE temp_storagevcenter (storage VARCHAR(200));
WHILE i<n DO
INSERT INTO temp_storagevcenter(STORAGE) SELECT SUBSTRING_INDEX(SUBSTRING_INDEX(perfdata, '=', i), ' ', -1) AS storage FROM nagios_servicestatus INNER JOIN nagios_services using (service_object_id) INNER JOIN nagios_hosts using (host_object_id) INNER JOIN nagios_hostgroup_members using (host_object_id) INNER JOIN nagios_hostgroups using (hostgroup_id) WHERE nagios_hostgroups.alias = 'Visual group VMWare' AND nagios_services.display_name LIKE 'Datastore%';
SET i = i + 1;
END WHILE;
SELECT DISTINCT STORAGE FROM temp_storagevcenter WHERE STORAGE REGEXP '^[A-Za-z0-9.,_-]+$';
DROP TEMPORARY TABLE temp_storagevcenter;
End

I hope if that gives you enough information.

Thank you

Can you modify query A so that it calculates the % used (5673406.4) and create query B to calculate the full value (2658191.29)?

How can I do that?

Who wrote query A that currently gives you the full value of 2658191.29?

Honestly, no idea. I saw it somewhere and there is no author or anything…

Im new to all of this so sorry.

It gives me the result of all the datastores in vCenter and just makes little graphs which are suppose to give me the percentage

The journey of 1000 miles (or km) begins with the first step:

Do you know if something like MySQL Workbench exists for InfluxDB? That way its easier for me

Ive seen a few tools but they seem years old

What I ment is on-prem software that I can install on my Windows PC.

From what I am seeing this is some phpmyadmin or something cloud based,

I called Influx’s free code-writing hotline and it says they are all booked up in 2025, but that they wrote the 7-part tutorial for anyone like yourself that seeks to better understand the language and solve a problem like this.

What?

Try DBeaver. It has a driver for InfluxDB

1 Like

Ill give it a shot…not a fan of it being in Java but

It doesnt show InfluxDB as a engine I can connect to

The link I provided above contains information on which version should be used.

Note: This driver is available in Lite, Enterprise, Ultimate and Team editions only.

1 Like