mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
feature: Add Postgres application support (#6004)
This commit is contained in:
54
html/includes/graphs/application/postgres_rows.inc.php
Normal file
54
html/includes/graphs/application/postgres_rows.inc.php
Normal file
@@ -0,0 +1,54 @@
|
||||
<?php
|
||||
$name = 'postgres';
|
||||
$app_id = $app['app_id'];
|
||||
$scale_min = 0;
|
||||
$colours = 'mixed';
|
||||
$unit_text = 'Rows/Sec';
|
||||
$unitlen = 10;
|
||||
$bigdescrlen = 15;
|
||||
$smalldescrlen = 15;
|
||||
$dostack = 0;
|
||||
$printtotal = 0;
|
||||
$addarea = 1;
|
||||
$transparency = 15;
|
||||
|
||||
$rrd_filename = rrd_name($device['hostname'], array('app', $name, $app_id));
|
||||
|
||||
if (is_file($rrd_filename)) {
|
||||
$rrd_list = array(
|
||||
array(
|
||||
'filename' => $rrd_filename,
|
||||
'descr' => 'Returned',
|
||||
'ds' => 'ret',
|
||||
'colour' => '582A72'
|
||||
),
|
||||
array(
|
||||
'filename' => $rrd_filename,
|
||||
'descr' => 'Fetched',
|
||||
'ds' => 'fetch',
|
||||
'colour' => 'AA6C39'
|
||||
),
|
||||
array(
|
||||
'filename' => $rrd_filename,
|
||||
'descr' => 'Inserted',
|
||||
'ds' => 'ins',
|
||||
'colour' => 'FFD1AA'
|
||||
),
|
||||
array(
|
||||
'filename' => $rrd_filename,
|
||||
'descr' => 'Updated',
|
||||
'ds' => 'upd',
|
||||
'colour' => '88CC88'
|
||||
),
|
||||
array(
|
||||
'filename' => $rrd_filename,
|
||||
'descr' => 'Deleted',
|
||||
'ds' => 'del',
|
||||
'colour' => '28536C'
|
||||
)
|
||||
);
|
||||
} else {
|
||||
echo "file missing: $rrd_filename";
|
||||
}
|
||||
|
||||
require 'includes/graphs/generic_v3_multiline.inc.php';
|
Reference in New Issue
Block a user