Skip to main content

Hi,

I try to use the prometheus expression plugin.

First, with a basic query for load average 1m. Whatever I do, I always get the same result:

 

UNKNOWN: No expressions found.

Command:

/usr/lib/centreon/plugins//centreon_prometheus_api.pl --plugin=cloud::prometheus::restapi::plugin --mode=expression --hostname=xxxxxxxx --url-path='/api/v1' --port='9090' --proto='http' --query='cpuload1m,node_load1{job="node-exporter"}' --output='%{instance} load 1m: %cpuload1m%' --instance='node' --use-new-perfdata --verbose

No alert for now, i’m just trying to view the result.

What is curious is that in debug mode, I have the desired result, but with the same error message no expression found

What am I doing wrong ? I have a lot of metrics to do, and even the simplest one doesn't work, that's promising 😯

 

Thanks

Ah I think the problem is with --instance value. It was the wrong value ( change node to instance ).

It’s better after that 😁


Reply