External metrics server and missing data

May 10, 2018
2
0
1
I'm currently setting up external metric and have some issue with data that I was expecting but there is no data. I'm using Grafana with influxdb and use this wiki page for guidence

https://pve.proxmox.com/wiki/External_Metric_Server

Code:
influxdb:
        server monitor.mylocaldomain.no
        port 8089

This work perfect for VMs and LXCs but not for the Host (Proxmox)

chrome_2018-06-05_11-34-50.png

SQL I currently using in grafana

Code:
SELECT derivative(mean("netin"), 1s) AS "$host" FROM "nics" WHERE ("object" = 'qemu') AND $timeFilter GROUP BY time($__interval), "host" fill(null)
If i try this with nodes (proxmox host) there is no data.

Code:
SELECT derivative(mean("netin"), 1s) AS "$host" FROM "nics" WHERE ("object" = 'nodes') AND $timeFilter GROUP BY time($__interval), "host" fill(null)
or
Code:
SELECT derivative(mean("netin"), 1s) AS "$host" FROM "system" WHERE ("object" = 'nodes') AND $timeFilter GROUP BY time($__interval), "host" fill(null)


The same issue with disk IOPS and data read/write. If I have to do modification to get this working is there possible to include data from ceph and temprature sensors? I know that using telegraf I can fix this, but feels this is kinda uncessary when proxmox have this function inluded
 
the fields have a different name for hosts
this works for example on my personal grafana dashboard:
Code:
SELECT non_negative_derivative(last("transmit"), 1s) *8 AS "out", non_negative_derivative(last("receive"), 1s) *8 AS "in" FROM "nics" WHERE ("host" = 'HOSTNAME' AND "instance" = 'bond0') AND $timeFilter GROUP BY time(1s) fill(none)
 
the fields have a different name for hosts
this works for example on my personal grafana dashboard:
Code:
SELECT non_negative_derivative(last("transmit"), 1s) *8 AS "out", non_negative_derivative(last("receive"), 1s) *8 AS "in" FROM "nics" WHERE ("host" = 'HOSTNAME' AND "instance" = 'bond0') AND $timeFilter GROUP BY time(1s) fill(none)

Thanks! I didn't even think about using the transmit/receive to calculate it. Had to remove * 8 to get correct value but it works!

Network transfer (in)
Code:
SELECT non_negative_derivative(last("receive"), 1s) AS "in" FROM "nics" WHERE ("object" = 'nodes' AND "instance" = 'bond0') AND $timeFilter GROUP BY time($__interval), "host" fill(null)
Network transfer (out)
Code:
SELECT non_negative_derivative(last("transmit"), 1s)  AS "out" FROM "nics" WHERE ("object" = 'nodes' AND "instance" = 'bond0') AND $timeFilter GROUP BY time($__interval), "host" fill(null)

If you use this SQL remember to use correct instance for your setup


If somebody have quick fix for getting read/write/IOPS from proxmox nodes I would love it.
 
write IOPS

Code:
SELECT derivative(mean("wr_operations"), 1s) AS "$host" FROM "blockstat" WHERE ("object" = 'qemu') AND $timeFilter GROUP BY time($__interval), "host" fill(null)

read IOPS
Code:
SELECT derivative(mean("rd_operations"), 1s) AS "$host" FROM "blockstat" WHERE ("object" = 'qemu') AND $timeFilter GROUP BY time($__interval), "host" fill(null)
 
is there any way to get ceph metrics this way? I don't see any relevant fields currently, and i don't know how to add anything to the metric server.
> show measurements
name: measurements
name
----
ballooninfo
blockstat
cpustat
memory
nics
system
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!