Comments (4)
In your case MAX would be the right choice i guess. According to
https://www.monitoring-plugins.org/doc/guidelines.html#AEN201
the syntax is 'label'=value[UOM];[warn];[crit];[min];[max]
.
There is no such thing as total_size.
from grafana-pnp-datasource.
Thanks for the response.
I try to use MIN or MAX but in the query inspector the value is the same with Avarage. If I use WARNING or CRITICAL the value is correct.
In Nagios perfdata the Value MAX Exist:
Could the problem be that PNP4Nagios changes the MAX Value to the Maximum value recorded in the sampling period?
In the perfdata file there are the information about MAX
DATATYPE::SERVICEPERFDATA TIMET::1664486591 HOSTNAME::xxxxxxx SERVICEDESC::[COLLAUDO] - SO Admin - Agent NRPE - Check Swap Usage SERVICEPERFDATA::swap=1808MB;198;39;0;3967 SERVICECHECKCOMMAND::check_nrpe_args!check_swap!5%!1% HOSTSTATE::UP HOSTSTATETYPE::HARD SERVICESTATE::OK SERVICESTATETYPE::HARD
In the XML from PNP4Nagios the Value MAX is Present (erase Hostname for security)
from grafana-pnp-datasource.
I Resolve the problem.
In the api.php there are only configuration for Warning and Critical and I add it MAX Value.
This code modify:
$perflabels[] = array(
"label" => arr_get($value, "NAME" ),
"warn" => arr_get($value, "WARN" ),
"crit" => arr_get($value, "CRIT" ),
"max" => arr_get($value, "MAX" )
);
AND this
foreach ( $xpd->data->row as $row=>$value){
// timestamp in milliseconds
$timestamp = ( $start + $i * $step ) * 1000;
if($type == "WARNING") {
$d = floatval($tmp_perflabel['warn']);
} elseif($type == "CRITICAL") {
$d = floatval($tmp_perflabel['crit']);
} else {
$d = floatval($tmp_perflabel['max']);
}
$data['targets'][$key][$hk]['datapoints'][] = array( $d, $timestamp );
$i++;
}
The Issue can be closed
from grafana-pnp-datasource.
is this something that needs to be fixed in the api.php from pnp4nagios? If so, could you please provide a patch?
from grafana-pnp-datasource.
Related Issues (20)
- TSDB auth fails HOT 1
- Feature request: Grafana variables in wildcard search HOT 2
- Problem Grafana HOT 13
- using wildcards? HOT 2
- Authentication with check-mk-raw HOT 2
- transpile error HOT 5
- Add dashboard variable HOT 4
- Grafana v7.3.1 (6668161a88 HOT 2
- Data source not connected: 404 Not Found in grafana HOT 2
- Cant add graph if host is down/graph stops working if host goes down HOT 2
- Grafana 8.3.4 HOT 7
- Feature Request: Ability to use regex or wildcards on "Label" option HOT 2
- 2.0.0 -> "Plugin disabled" HOT 6
- Probably wrong API URL HOT 1
- Template variables not expanded HOT 1
- Problem in configuring the pnp plugin
- BUG: "Hit enter to add" selects the wrong input HOT 1
- Grafana not receiving values HOT 2
- Pnp4Nagios doe not work with PHP 8 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from grafana-pnp-datasource.