2024-06-03 11:39:52 +02:00
|
|
|
<?php
|
|
|
|
$config = [
|
|
|
|
'app_demo_metric1' => [ // Key is being used a prometheus key
|
|
|
|
'help' => 'Help text for metric',
|
|
|
|
'command' => 'The command to be run',
|
|
|
|
'jsonelem' => '0.metric', // The json element where the metric is found (Dot notated)
|
|
|
|
],
|
|
|
|
'app_demo_metric2' => [
|
|
|
|
'help' => 'Help text for metric',
|
2024-06-03 14:00:10 +02:00
|
|
|
'http' => [
|
|
|
|
'url' => 'http://example.com', // The url to get collected for the metric
|
2024-06-03 14:01:26 +02:00
|
|
|
'data' => 'responsebody', // The body is used as output
|
2024-06-03 14:00:10 +02:00
|
|
|
],
|
2024-06-03 11:39:52 +02:00
|
|
|
'jsonelem' => '0.metric',
|
|
|
|
],
|
2024-06-03 14:00:10 +02:00
|
|
|
'app_demo_metric3' => [
|
|
|
|
'help' => 'Help text for metric',
|
|
|
|
'http' => [
|
|
|
|
'url' => 'http://example.com', // The url to get collected for the metric
|
2024-06-03 14:01:26 +02:00
|
|
|
'data' => 'hasresponse', // If an error occured during request this will return 0, otherwise 1
|
2024-06-03 14:00:10 +02:00
|
|
|
],
|
|
|
|
],
|
|
|
|
'app_demo_metric4' => [
|
|
|
|
'help' => 'Help text for metric',
|
|
|
|
'http' => [
|
|
|
|
'url' => 'http://example.com', // The url to get collected for the metric
|
2024-06-03 14:01:26 +02:00
|
|
|
'data' => 'responsetime', // This will return the transfer time
|
|
|
|
'proxy' => 'http://192.168.1.252:8080', // The proxy server the request needs to use
|
2024-06-03 14:00:10 +02:00
|
|
|
],
|
|
|
|
],
|
2024-06-03 11:39:52 +02:00
|
|
|
];
|