diff --git a/component/auth/group.php b/component/auth/group.php new file mode 100644 index 00000000..e53c1e8b --- /dev/null +++ b/component/auth/group.php @@ -0,0 +1,3 @@ + diff --git a/component/auth/user.php b/component/auth/user.php new file mode 100644 index 00000000..85a76f62 --- /dev/null +++ b/component/auth/user.php @@ -0,0 +1,3 @@ + diff --git a/component/config/dynamic_dashboard.php b/component/config/dynamic_dashboard.php new file mode 100644 index 00000000..6ea123b8 --- /dev/null +++ b/component/config/dynamic_dashboard.php @@ -0,0 +1,3 @@ + diff --git a/component/config/environment.php b/component/config/environment.php new file mode 100644 index 00000000..9908e373 --- /dev/null +++ b/component/config/environment.php @@ -0,0 +1,3 @@ + diff --git a/component/config/plugin.php b/component/config/plugin.php new file mode 100644 index 00000000..403a67ea --- /dev/null +++ b/component/config/plugin.php @@ -0,0 +1,3 @@ + diff --git a/component/config/project.php b/component/config/project.php new file mode 100644 index 00000000..98f8410c --- /dev/null +++ b/component/config/project.php @@ -0,0 +1,3 @@ + diff --git a/component/config/role.php b/component/config/role.php new file mode 100644 index 00000000..dae649d5 --- /dev/null +++ b/component/config/role.php @@ -0,0 +1,3 @@ + diff --git a/component/config/server.php b/component/config/server.php new file mode 100644 index 00000000..55f11f6a --- /dev/null +++ b/component/config/server.php @@ -0,0 +1,3 @@ + diff --git a/component/dashboard/dynamic.php b/component/dashboard/dynamic.php new file mode 100644 index 00000000..005ff3a3 --- /dev/null +++ b/component/dashboard/dynamic.php @@ -0,0 +1,4 @@ + diff --git a/component/dashboard/light.php b/component/dashboard/light.php new file mode 100644 index 00000000..1a63bb58 --- /dev/null +++ b/component/dashboard/light.php @@ -0,0 +1,4 @@ + diff --git a/component/dashboard/view.php b/component/dashboard/view.php new file mode 100644 index 00000000..6572c4c9 --- /dev/null +++ b/component/dashboard/view.php @@ -0,0 +1,8 @@ + diff --git a/component/perm/module.php b/component/perm/module.php new file mode 100644 index 00000000..8d462f34 --- /dev/null +++ b/component/perm/module.php @@ -0,0 +1,3 @@ + diff --git a/component/small_admin/myaccount.php b/component/small_admin/myaccount.php new file mode 100644 index 00000000..abf84c4c --- /dev/null +++ b/component/small_admin/myaccount.php @@ -0,0 +1,8 @@ +'.MY_ACCOUNT.''; + echo '
'; + echo ''.EDIT.''; + include(DIR_FSROOT.'/html/small_admin/myaccount/w_myaccount.php'); + include(DIR_FSROOT.'/html/small_admin/myaccount/r_myaccount_wh_id.php'); + include(DIR_FSROOT.'/html/small_admin/myaccount/f_myaccount.php'); +?> diff --git a/component/small_admin/mydashboard.php b/component/small_admin/mydashboard.php new file mode 100644 index 00000000..e07afbd8 --- /dev/null +++ b/component/small_admin/mydashboard.php @@ -0,0 +1,3 @@ + diff --git a/component/small_admin/mygroup.php b/component/small_admin/mygroup.php new file mode 100644 index 00000000..7f3142c0 --- /dev/null +++ b/component/small_admin/mygroup.php @@ -0,0 +1,56 @@ +'.MANAGE_MYGROUP.''; + include(DIR_FSROOT.'/html/small_admin/mygroup/w_group.php'); + include(DIR_FSROOT.'/html/small_admin/mygroup/r_group_wh_id.php'); + include(DIR_FSROOT.'/html/small_admin/mygroup/r_group.php'); + include(DIR_FSROOT.'/html/small_admin/mygroup/d_group.php'); + echo '
'; + + if (isset($_GET['f_id_auth_group'])) { + echo ''; + } + echo '
'; + $perm_grp = new PERMS(); + $f_id_auth_group=intval(GET('f_id_auth_group')); + if (($f_id_auth_group && $perm_grp->auth_user_group($f_id_auth_group,true)) || !$f_id_auth_group) { + echo '
'; + if (isset($cur_group)) { + echo ''.$cur_group->group.''; + } + echo '
'; + if (isset($_GET['f_id_auth_group'])) { + echo ''.EDIT.''; + } + else { + echo ''.ADD.''; + } + + include(DIR_FSROOT.'/html/small_admin/mygroup/f_group.php'); + echo '
'; + + if (isset($_GET['f_id_auth_group'])) { + echo '
'; + echo ''.USERS.''; + include(DIR_FSROOT.'/html/small_admin/mygroup_user/w_group_user.php'); + include(DIR_FSROOT.'/html/small_admin/mygroup_user/e_group_user.php'); + include(DIR_FSROOT.'/html/small_admin/mygroup_user/r_group_user_wh_id.php'); + include(DIR_FSROOT.'/html/small_admin/mygroup_user/r_group_user.php'); + include(DIR_FSROOT.'/html/small_admin/mygroup_user/d_group_user.php'); + echo '
'; + + if (isset($_GET['f_id_auth_user'])) { + echo ''; + } + echo '
'; + if (isset($_GET['f_id_auth_user'])) { + echo ''.DEL.''; + } else { + echo ''.ADD.''; + } + include(DIR_FSROOT.'/html/small_admin/mygroup_user/f_group_user.php'); + echo '
'; + } + echo '
'; + } + echo '
'; +?> diff --git a/component/small_admin/newuser.php b/component/small_admin/newuser.php new file mode 100644 index 00000000..33a8e3d4 --- /dev/null +++ b/component/small_admin/newuser.php @@ -0,0 +1,8 @@ +'.ADD_USER.''; + echo '
'; + echo ''.EDIT.''; + include(DIR_FSROOT.'/html/small_admin/newuser/w_user.php'); + include(DIR_FSROOT.'/html/small_admin/newuser/f_user.php'); + echo '
'; +?> diff --git a/config/config.php.tpl b/config/config.php.tpl index 6e048253..11f16a18 100644 --- a/config/config.php.tpl +++ b/config/config.php.tpl @@ -52,6 +52,9 @@ define('SL_CSS','col-xs-offset-3 col-sm-offset-3 col-md-offset-3 col-lg-offset-3 define('SEM_CSS','col-xs-9 col-sm-9 col-md-9 col-lg-9'); define('C_CSS','col-xs-offset-3 col-sm-offset-3 col-md-offset-3 col-lg-offset-3 col-xs-9 col-sm-9 col-md-9 col-lg-9'); +# Display graph title as text (text/rrd) +define('GRAPH_TITLE','rrd'); + /************************* CGP *************************/ # extra typesdb config to merge to default #$CONFIG['typesdb'][] = '/usr/share/collectd/my_extra_types.db'; diff --git a/config/module.php b/config/module.php index 3fa4ee39..8eb750c7 100644 --- a/config/module.php +++ b/config/module.php @@ -1,9 +1,4 @@ perm_module($module, $component)) { // DEBUT PERM MODULE - if ($module=='config') { - if ($component=='project') { - include(DIR_FSROOT.'/view/backend/v_project.php'); - } elseif ($component=='server') { - include(DIR_FSROOT.'/view/backend/v_server.php'); - } else if ($component=='role') { - include(DIR_FSROOT.'/view/backend/v_role.php'); - } else if ($component=='environment') { - include(DIR_FSROOT.'/view/backend/v_environment.php'); - } else if ($component=='plugin') { - include(DIR_FSROOT.'/view/backend/v_plugin_filter.php'); - } else if ($component=='dynamic_dashboard') { - include(DIR_FSROOT.'/view/backend/v_dynamic_dashboard.php'); - } - } else if ($module=='auth') { - if ($component=='user') { - include(DIR_FSROOT.'/view/backend/v_user.php'); - } else if ($component=='group') { - include(DIR_FSROOT.'/view/backend/v_group.php'); - } - } else if ($module=='perm') { - if ($component=='module') { - include(DIR_FSROOT.'/view/backend/v_module.php'); - } - } else if ($module=='dashboard') { - if ($component=='view') { - if (isset($_GET['f_id_config_server'])) { - include(DIR_FSROOT.'/modules/preg_find.php'); - include(DIR_FSROOT.'/html/config/server/r_server_wh_id.php'); - include(DIR_FSROOT.'/html/dashboard/server_plugins/d_server_plugins.php'); - } - } else if ($component == 'dynamic') { - include(DIR_FSROOT.'/modules/preg_find.php'); - include(DIR_FSROOT.'/html/dashboard/dynamic/r_dynamic.php'); - } else if ($component == 'light') { - include(DIR_FSROOT.'/modules/preg_find.php'); - include(DIR_FSROOT.'/html/dashboard/dashboard_light/d_dashboard_light.php'); - } - } else if ($module=='small_admin') { - if ($component=='mygroup') { - echo '

'.MANAGE_MYGROUP.'

'; - include(DIR_FSROOT.'/html/small_admin/mygroup/w_group.php'); - include(DIR_FSROOT.'/html/small_admin/mygroup/r_group_wh_id.php'); - include(DIR_FSROOT.'/html/small_admin/mygroup/r_group.php'); - include(DIR_FSROOT.'/html/small_admin/mygroup/d_group.php'); - echo '
'; - - if (isset($_GET['f_id_auth_group'])) { - echo ''; - } - echo '
'; - $perm_grp = new PERMS(); - $f_id_auth_group=intval(GET('f_id_auth_group')); - if (($f_id_auth_group && $perm_grp->auth_user_group($f_id_auth_group,true)) || !$f_id_auth_group) { - echo '
'; - if (isset($cur_group)) { - echo ''.$cur_group->group.''; - } - echo '
'; - if (isset($_GET['f_id_auth_group'])) { - echo ''.EDIT.''; - } - else { - echo ''.ADD.''; - } - - include(DIR_FSROOT.'/html/small_admin/mygroup/f_group.php'); - echo '
'; - - if (isset($_GET['f_id_auth_group'])) { - echo '
'; - echo ''.USERS.''; - include(DIR_FSROOT.'/html/small_admin/mygroup_user/w_group_user.php'); - include(DIR_FSROOT.'/html/small_admin/mygroup_user/e_group_user.php'); - include(DIR_FSROOT.'/html/small_admin/mygroup_user/r_group_user_wh_id.php'); - include(DIR_FSROOT.'/html/small_admin/mygroup_user/r_group_user.php'); - include(DIR_FSROOT.'/html/small_admin/mygroup_user/d_group_user.php'); - echo '
'; - - if (isset($_GET['f_id_auth_user'])) { - echo ''; - } - echo '
'; - if (isset($_GET['f_id_auth_user'])) { - echo ''.DEL.''; - } else { - echo ''.ADD.''; - } - include(DIR_FSROOT.'/html/small_admin/mygroup_user/f_group_user.php'); - echo '
'; - } - echo '
'; - } - echo '
'; - } else if ($component=='myaccount') { - echo '

'.MY_ACCOUNT.'

'; - echo '
'; - echo ''.EDIT.''; - include(DIR_FSROOT.'/html/small_admin/myaccount/w_myaccount.php'); - include(DIR_FSROOT.'/html/small_admin/myaccount/r_myaccount_wh_id.php'); - include(DIR_FSROOT.'/html/small_admin/myaccount/f_myaccount.php'); - echo '
'; - } else if ($component=='newuser') { - echo '

'.ADD_USER.'

'; - echo '
'; - echo ''.EDIT.''; - include(DIR_FSROOT.'/html/small_admin/newuser/w_user.php'); - include(DIR_FSROOT.'/html/small_admin/newuser/f_user.php'); - echo '
'; - } else if ($component=='mydashboard') { - include(DIR_FSROOT.'/view/backend/v_small_admin_mydashboard.php'); - } - } else { - echo $CONFIG['welcome_text']; - } -} else { - if ($component && $module) { - echo '
'.NO_ACCESS.'
'; - } + +if(preg_match("/^[0-9a-z_]*$/", $module) && preg_match("/^[0-9a-z_]*$/", $component)){ + if ($perm_mod->perm_module($module, $component)) { // DEBUT PERM MODULE + if(file_exists(DIR_FSROOT.'/component/'.$module.'/'.$component.'.php')){ + include(DIR_FSROOT.'/component/'.$module.'/'.$component.'.php'); + }else{ + echo $CONFIG['welcome_text']; + } + } else { + if ($component && $module) { + echo '
'.NO_ACCESS.'
'; + } + } +}else{ + echo '
'.NO_ACCESS.'
'; + die(); } ?> diff --git a/graph.php b/graph.php index 3c6a6e02..e929fe99 100644 --- a/graph.php +++ b/graph.php @@ -65,6 +65,12 @@ $json = file_get_contents('plugin/'.$plugin.'-'.$plugininstance.'.json'); $plugin_json = json_decode($json, true); + if (is_null($plugin_json)) + $log->write('CGP Error: invalid json in plugin/'.$plugin.'.json'); +} else if (function_exists('json_decode') && file_exists('plugin/'.$plugin.'-'.$plugincategory.'.json')) { + $json = file_get_contents('plugin/'.$plugin.'-'.$plugincategory.'.json'); + $plugin_json = json_decode($json, true); + if (is_null($plugin_json)) $log->write('CGP Error: invalid json in plugin/'.$plugin.'.json'); } else if (function_exists('json_decode') && file_exists('plugin/'.$plugin.'-'.$plugincategory.'-'.$plugininstance.'.json')) { @@ -114,6 +120,10 @@ require_once 'type/GenericAggregation.class.php'; $obj = new Type_GenericAggregation($CONFIG, $_GET); break; + case 'varnish': + require_once 'type/VarnishStacked.class.php'; + $obj = new Type_VarnishStacked($CONFIG, $_GET); + break; default: require_once 'type/Default.class.php'; $obj = new Type_Default($CONFIG, $_GET); @@ -137,16 +147,20 @@ } } -if (isset($plugin_json[$type]['title'])) { - $obj->rrd_title = $plugin_json[$type]['title']; - $replacements = array( - '{{PI}}' => GET('pi'), - '{{PC}}' => GET('pc'), - '{{TI}}' => GET('ti'), - '{{TC}}' => GET('tc'), - '{{HOST}}' => GET('h') - ); - $obj->rrd_title = str_replace(array_keys($replacements), array_values($replacements), $obj->rrd_title); +if (GRAPH_TITLE=='rrd') { + if (isset($plugin_json[$type]['title'])) { + $obj->rrd_title = $plugin_json[$type]['title']; + $replacements = array( + '{{PI}}' => GET('pi'), + '{{PC}}' => GET('pc'), + '{{TI}}' => GET('ti'), + '{{TC}}' => GET('tc'), + '{{HOST}}' => GET('h') + ); + $obj->rrd_title = str_replace(array_keys($replacements), array_values($replacements), $obj->rrd_title); + } +} else { + $obj->rrd_title=''; } if (isset($plugin_json[$type]['vertical'])) { diff --git a/html/dashboard/dashboard_light/d_dashboard_light.php b/html/dashboard/dashboard_light/d_dashboard_light.php index e67e13d7..5b9bcb32 100644 --- a/html/dashboard/dashboard_light/d_dashboard_light.php +++ b/html/dashboard/dashboard_light/d_dashboard_light.php @@ -133,9 +133,6 @@ $tc=$tmp[0]; //$ti=implode('-', array_slice($tmp,1)); $ti=null; - } else if (preg_match($CONFIG['plugin_tcategory'], $p)) { - $tc=$ti; - $ti=null; } } else { $tc=null; @@ -184,7 +181,9 @@ if (!preg_match('/^(df|interface|oracle|snmp)$/', $p) || (((preg_replace('/[^0-9\.]/','',$cur_server->collectd_version) >= 5) && !preg_match('/^(oracle|snmp)$/', $p) && $t!='df')) + || ($p == 'snmp' && $t == 'memory') ) { + if ($p == 'varnish3') { $t='all'; } $ti=''; if ($old_t!=$t or $old_pi!=$pi or $old_pc!=$pc or $old_tc!=$tc) { if ($CONFIG['graph_type'] == 'canvas') { @@ -199,11 +198,15 @@ chdir(DIR_FSROOT); include DIR_FSROOT.'/plugin/'.$p.'.php'; } else { + $graph_title=gen_title($cur_server->server_name,$p,$pc,$pi,$t,$tc,$ti); + if (GRAPH_TITLE=='text') { echo '
'.$graph_title.'
'; } + if ($time_range!='') { - echo 'rrd'."\n"; + echo ''.$graph_title.''."\n"; } else { - echo 'rrd'."\n"; + echo ''.$graph_title.''."\n"; } + if(GRAPH_TITLE=='text') { echo '
'; } } } } else { @@ -219,11 +222,14 @@ chdir(DIR_FSROOT); include DIR_FSROOT.'/plugin/'.$p.'.php'; } else { + $graph_title=gen_title($cur_server->server_name,$p,$pc,$pi,$t,$tc,$ti); + if (GRAPH_TITLE=='text') { echo '
'.$graph_title.'
'; } if ($time_range!='') { - echo 'rrd'."\n"; + echo ''.$graph_title.''."\n"; } else { - echo 'rrd'."\n"; + echo ''.$graph_title.''."\n"; } + if(GRAPH_TITLE=='text') { echo '
'; } } } } else if (DEBUG==true){ @@ -287,7 +293,10 @@ if ($t!=$old_t) echo '

'.ucfirst(str_replace('_', ' ',$t)).'

'; $old_t=$t; - echo 'rrd'; + $graph_title=gen_title($cur_server->server_name,$p,$pc,$pi,$t,$tc,$ti); + if (GRAPH_TITLE=='text') { echo '
'.$graph_title.'
'; } + echo ''.$graph_title.''; + if (GRAPH_TITLE=='text') { echo '
'; } } } } diff --git a/html/dashboard/dynamic/r_dynamic.php b/html/dashboard/dynamic/r_dynamic.php index 2d4bd5fa..d6fcb255 100644 --- a/html/dashboard/dynamic/r_dynamic.php +++ b/html/dashboard/dynamic/r_dynamic.php @@ -219,6 +219,7 @@ && $p!='oracle' && $t!='df')) ) { $plugin['ti']=null; + if ($plugin['p'] == 'varnish3') { $plugin['t']='all'; } if ($old_t!=$plugin['t'] or $old_pi!=$plugin['pi'] or $old_pc!=$plugin['pc'] or $plugin['servername']!=$old_servername or $old_tc!=$plugin['tc']) { if ($CONFIG['graph_type'] == 'canvas') { $_GET['h'] = $plugin['servername']; diff --git a/html/dashboard/server_plugins/d_server_plugins.php b/html/dashboard/server_plugins/d_server_plugins.php index f654a592..1787ed20 100644 --- a/html/dashboard/server_plugins/d_server_plugins.php +++ b/html/dashboard/server_plugins/d_server_plugins.php @@ -159,6 +159,7 @@ || ($p == 'snmp' && $t == 'memory') ) ) { + if ($p == 'varnish3') { $t='all'; } $ti=''; if ($old_t!=$t or $old_pi!=$pi or $old_pc!=$pc or $old_tc!=$tc) { if ($CONFIG['graph_type'] == 'canvas') { diff --git a/html/dashboard/zoom/d_zoom.php b/html/dashboard/zoom/d_zoom.php index 3e3aaa74..f6b33084 100644 --- a/html/dashboard/zoom/d_zoom.php +++ b/html/dashboard/zoom/d_zoom.php @@ -41,11 +41,10 @@ collectd_version; diff --git a/lib/common.js b/lib/common.js index 1c446b97..e268991c 100644 --- a/lib/common.js +++ b/lib/common.js @@ -3,16 +3,3 @@ $(document).ajaxStart(function () { }).ajaxComplete(function () { $('body').removeClass('wait'); }); - -function resizedScreen() { - $.post('ajax/screen_res.php', { width: $('#dashboard').width(), height: $(window).height() }, function(json) { - if(json.outcome == 'success') { - // do something with the knowledge possibly? - } else { - alert('Unable to let PHP know what the screen resolution is!'); - } - },'json'); -} -$(document).ready(resizedScreen); -$(window).resize(resizedScreen); - diff --git a/lib/func.js b/lib/func.js index 17d181be..142ea804 100644 --- a/lib/func.js +++ b/lib/func.js @@ -24,7 +24,7 @@ function refresh_graph(id,time_range,time_start,time_end) { var timer1 = new Date(); var timer2 = timer1.getTime(); - $('#'+id+'> .imggraph').each(function(image) { + $('#'+id+'>> .imggraph').each(function(image) { // On vire le timer qui sert a forcer le refesh imgsrc=removeqsvar(this.src,'timer'); if (time_range!='') { @@ -44,11 +44,11 @@ function refresh_graph(id,time_range,time_start,time_end) { if (time_range!='') { var attrjs="Show_Popup($(this).attr('src').split('?')[1],'"+time_range+"','','')"; - $('#dashboard'+'> .imggraph').attr('onClick',attrjs); + $('#dashboard'+'>> .imggraph').attr('onClick',attrjs); } else if (time_start!='' && time_end!='') { var attrjs="Show_Popup($(this).attr('src').split('?')[1],'','"+time_start+"','"+time_end+"')"; - $('#dashboard'+'> .imggraph').attr('onClick',attrjs); + $('#dashboard'+'>> .imggraph').attr('onClick',attrjs); } if (time_start!='' && time_end!='') { @@ -125,7 +125,7 @@ function Show_Popup(url,time_range,time_start,time_end) { var currentHours = currentTime.getHours(); var currentMinutes = currentTime.getMinutes(); - $('#popup').load('html/dashboard/zoom/d_zoom.php?'+url+'&graph_type=canvas', function() { + $('#popup').load('html/dashboard/zoom/d_zoom.php?'+url+'&graph_type=canvas&detail-width='+$('#dashboard').width()+'&detail-height='+$(window).height(), function() { $('#popup').fadeIn('fast'); $('#popupModal').draggable({ cancel: 'canvas', scroll: true}); diff --git a/modules/functions.inc.php b/modules/functions.inc.php index b3dc4bc5..50e731d5 100644 --- a/modules/functions.inc.php +++ b/modules/functions.inc.php @@ -108,4 +108,84 @@ function sort_plugins($hostpath, $plugins, $filters) { asort($plugins_ordered); return $plugins_ordered; } + +function gen_title($h, $p, $pc, $pi, $t, $tc, $ti) { + global $CONFIG; + + $auth = new AUTH_USER(); + $log = new LOG(); + + if (!$auth->verif_auth()) { + echo 'Error auth'; + die(); + } + + if (strpos($h,':')!=FALSE) { + $tmp=explode(':',$h); + $h=$tmp[0]; + } + + if (!$authorized=$auth->check_access_right($h)) { + $log->write('CGRAPHZ ERROR: Permission denied for host : '.$h); + echo 'Error host'; + die(); + } + + if (validate_get($h, 'host') === NULL) { + $log->write('CGRAPHZ ERROR: host contains unknown characters'); + echo 'Error char'; + die(); + } + + if ($p == 'aggregation') { + $p = $pc; + } + + # plugin json + if (function_exists('json_decode') && file_exists('plugin/'.$p.'-'.$pi.'.json')) { + $json = file_get_contents('plugin/'.$p.'-'.$pi.'.json'); + $plugin_json = json_decode($json, true); + + if (is_null($plugin_json)) + $log->write('CGP Error: invalid json in plugin/'.$p.'.json'); + } else if (function_exists('json_decode') && file_exists('plugin/'.$p.'-'.$pc.'.json')) { + $json = file_get_contents('plugin/'.$p.'-'.$pc.'.json'); + $plugin_json = json_decode($json, true); + + if (is_null($plugin_json)) + $log->write('CGP Error: invalid json in plugin/'.$p.'.json'); + } else if (function_exists('json_decode') && file_exists('plugin/'.$p.'-'.$pc.'-'.$pi.'.json')) { + $json = file_get_contents('plugin/'.$p.'-'.$pc.'-'.$pi.'.json'); + $plugin_json = json_decode($json, true); + + if (is_null($plugin_json)) + $log->write('CGP Error: invalid json in plugin/'.$p.'.json'); + } else { + if (function_exists('json_decode') && file_exists('plugin/'.$p.'.json')) { + $json = file_get_contents('plugin/'.$p.'.json'); + $plugin_json = json_decode($json, true); + + if (is_null($plugin_json)) + $log->write('CGP Error: invalid json in plugin/'.$p.'.json'); + } else { + $log->write(sprintf('CGRAPHZ ERROR: plugin "%s" is not available', $p)); + echo 'Error plugin not available'; + } + } + if (isset($plugin_json[$t]['title'])) { + $rrd_title = $plugin_json[$t]['title']; + $replacements = array( + '{{PI}}' => $pi, + '{{PC}}' => $pc, + '{{TI}}' => $ti, + '{{TC}}' => $tc, + '{{HOST}}' => $h + ); + $rrd_title = str_replace(array_keys($replacements), array_values($replacements), $rrd_title); + } else if ($plugin_json[$t]['type']=='iowpm') { + $ItemName=file_get_contents($CONFIG['datadir'].'/'.$h.'/'.$p.'-'.$pi.'/ItemName.txt'); + $rrd_title="$ItemName on $h"; + } + return $rrd_title; +} ?> diff --git a/plugin/IIS.json b/plugin/IIS.json index 0967ef42..b0445f1b 100644 --- a/plugin/IIS.json +++ b/plugin/IIS.json @@ -1 +1,111 @@ -{} +{ + "iis_currents": { + "title": "IIS Currrent Connections {{PI}}", + "vertical": "Nb", + "type": "stacked", + "legend": { + "current_connections" : { + "name" : "Current Connections" + } + } + + }, + "iis_attemps": { + "title": "IIS Connection Attemps/sec {{PI}}", + "vertical": "Nb", + "type": "stacked", + "legend" : { + "Connection_Attemps" : { + "name" : "Connection Attemps" + } + } + }, + "iis_anonymous": { + "title": "IIS Anonymous User Connection {{PI}}", + "vertical": "Nb", + "type": "stacked", + "legend" : { + "Current_Anonymous_Users" : { + "name" : "Current Anonymous Users" + }, + "Current_Non_Anonymous_Users" : { + "name" : "Current Non Anonymous Users" + } + } + }, + "iis_trafic": { + "title": "IIS Traffic {{PI}}", + "vertical": "Bytes", + "type": "stacked", + "legend": { + "Bytes_Received_Sec" : { + "name" : "Bytes Received/sec" + }, + "Bytes_Sent_Sec" : { + "name" : "Bytes Sent/sec" + }, + "Bytes_Total_Sec" : { + "name" : "Bytes Total/sec" + } + } + }, + "iis_requests": { + "title": "IIS Requests {{PI}}", + "vertical": "Nb", + "type": "stacked", + "legend": { + "Copy_Request" : { + "name" : "Copy" + }, + "Delete_Requests" : { + "name" : "Delete" + }, + "Get_Request" : { + "name" : "Get" + }, + "Head_Request" : { + "name" : "Head" + }, + "Lock_Request" : { + "name" : "Lock" + }, + "Mkcol_Request" : { + "name" : "Mkcol" + }, + "Move_Request" : { + "name" : "Move" + }, + "Options_Request" : { + "name" : "Options" + }, + "Other_Request" : { + "name" : "Other" + }, + "Post_Request" : { + "name" : "Post" + }, + "Propfind_Request" : { + "name" : "Propfind" + }, + "Proppatch_Request" : { + "name" : "Proppatch" + }, + "Put_Request" : { + "name" : "Put" + }, + "Search_Request" : { + "name" : "Delete" + }, + "Total_Method_Requests" : { + "name" : "Total Method" + }, + "Trace_Request" : { + "name" : "Trace" + }, + "Unlock_Request" : { + "name" : "Unlock" + } + } + }, + "legend_format": "%5.1lf%s" +} diff --git a/plugin/MSSQL.json b/plugin/MSSQL.json index 2c63c085..ee9e4307 100644 --- a/plugin/MSSQL.json +++ b/plugin/MSSQL.json @@ -1,2 +1,147 @@ { + "sqlserver_filesize": { + "title": "MSSQL Files Size {{PI}}", + "vertical": "bytes", + "type": "stacked", + "legend": { + "Databases_Data_File_Size": { + "name" : "DataFiles Size" + }, + "Databases_Log_File_Size": { + "name" : "DataLogs Size" + } + } + }, + "sqlserver_locks": { + "title": "MSSQL Lock {{PI}}", + "vertical": "Nb", + "type": "stacked", + "legend" : { + "Locks_Locks_Wait" : { + "name" : "Lock Wait" + }, + "Locks_Nb_Deadlock" : { + "name" : "Nb DeadLock" + } + } + }, + "sqlserver_mem": { + "title": "MSSQL Memory {{PI}}", + "vertical": "bytes", + "type": "stacked", + "legend": { + "Memory_Target_Memory" : { + "name" : "Target Memory" + }, + "Memory_Total_Memory" : { + "name" : "Total Memory" + } + } + }, + "sqlserver_access": { + "title": "MSSQL Access Methods Full Scans {{PI}}", + "vertical": "Nb", + "type": "stacked", + "legend" : { + "Access_Methods_Full_Scans" : { + "name" : "Full Scans/sec" + } + } + }, + "sqlserver_connections": { + "title": "MSSQL Connections {{PI}}", + "vertical": "Nb", + "type": "stacked", + "legend" : { + "General_Statistics_Logical_connections" : { + "name" : "Logical Connections" + } + } + }, + "sqlserver_buffercachehit" : { + "title": "MSSQL Buffer Cache Hit Ratio {{PI}}", + "vertical": "Nb", + "type" : "stacked", + "legend" : { + "Buffer_Manager_Cache_Hit_Ratio" : { + "name" : "Buffer Cache Hit Ratio" + } + } + }, + "sqlserver_bufferpage" : { + "title": "MSSQL Buffer Page Life Expectancy {{PI}}", + "vertical": "Nb", + "type" : "stacked", + "legend" : { + "Buffer_Manager_Page_Life_Expectancy" : { + "name" : "Page Life Expectancy" + } + } + }, + "sqlserver_jobs" : { + "title": "MSSQL Failed Jobs {{PI}}", + "vertical": "Nb", + "type" : "stacked", + "legend" : { + "Jobs_Failed_Jobs" : { + "name" : "Failed Jobs" + } + } + }, + "sqlserver_processblocked" : { + "title": "MSSQL Processes Blocked {{PI}}", + "vertical": "Nb", + "type" : "stacked", + "legend" : { + "General_Statistics_Processes_blocked" : { + "name" : "Processes Blocked" + } + } + }, + "sqlserver_stats" : { + "title": "MSSQL Compilations and ReCompilations {{PI}}", + "vertical": "Nb", + "type" : "stacked", + "legend" : { + "SQL_Statistics_SQL_Compilations" : { + "name" : "SQL Compilations" + }, + "SQL_Statistics_SQL_Recompilations" : { + "name" : "SQL Recompilations" + } + } + }, + "sqlserver_stats_requests" : { + "title": "MSSQL Batch Requests/sec {{PI}}", + "vertical": "Nb", + "type" : "stacked", + "legend" : { + "SQL_Statistics_Batch_Requests" : { + "name" : "Batch Request/sec" + } + } + }, + "sqlserver_transaction_count" : { + "title": "MSSQL Transactions {{PI}}", + "vertical": "Nb", + "type" : "stacked", + "legend" : { + "Transactions_Transactions" : { + "name" : "Transactions" + } + } + }, + "sqlserver_transaction_longuest" : { + "title": "MSSQL Longuest Transaction {{PI}}", + "vertical": "time in sec", + "type" : "stacked", + "legend" : { + "Transactions_Longuest_Transaction" : { + "name" : "Longuest Transactions" + } + } + }, + "legend_format": "%5.1lf%s" } + + diff --git a/plugin/apache.json b/plugin/apache.json index 3f8b65f1..076a0ccd 100644 --- a/plugin/apache.json +++ b/plugin/apache.json @@ -1,7 +1,7 @@ { "apache_bytes": { "title": "Webserver Traffic ({{PI}}) on {{HOST}}", - "vertical": "{{ND}}/s", + "vertical": "Bytes/s", "legend": { "value": { "name": "Traffic", diff --git a/plugin/ceph.json b/plugin/ceph.json new file mode 100644 index 00000000..5239721e --- /dev/null +++ b/plugin/ceph.json @@ -0,0 +1,161 @@ +{ + "ceph_capacity": { + "title": "Capacity ({{PI}})", + "vertical": "Size", + "type": "stacked", + "legend": { + "total_avail": { + "name": "Total Available", + "color": "00ff00" + }, + "total_space": { + "name": "Total Free", + "color": "0000ff" + }, + "total_used": { + "name": "Total Used", + "color": "ff0000" + } + }, + "legend_format": "%5.1lf%s" + }, + "ceph_latency": { + "title": "Latency ({{PI}})", + "type": "stacked", + "legend": { + "avg_latency": { + "name": "Average Latency" + }, + "max_latency": { + "name": "Maximum Latency" + }, + "min_latency": { + "name": "Minimum Latency" + }, + "stddev_latency": { + "name": "Stddev Latency", + "color": "ffff00" + } + }, + "legend_format": "%5.1lf%s" + }, + "ceph_osd": { + "title": "OSD ({{PI}})", + "type": "stacked", + "legend": { + "down": { + "name": "Down" + }, + "in": { + "name": "In" + }, + "out": { + "name": "Out" + }, + "up": { + "name": "Up", + "color": "ffff00" + } + }, + "legend_format": "%5.1lf%s" + }, + "ceph_pg": { + "title": "PG ({{PI}})", + "type": "stacked", + "legend": { + "active": { + "name": "Active" + }, + "clean": { + "name": "Clean" + }, + "scrubbing": { + "name": "Scrubbing", + "color": "ffff00" + } + }, + "legend_format": "%5.1lf%s" + }, + "gauge": { + "title": " ({{PI}})", + "type": "stacked", + "legend": { + "backfilling": { + "name": "Back Filling" + }, + "deep": { + "name": "Deep" + }, + "inactive": { + "name": "Inactive" + }, + "peering": { + "name": "Peering" + }, + "wait_backfill": { + "name": "Wait Back Fill" + }, + "remapped": { + "name": "Remapped", + "color": "ffff00" + } + }, + "legend_format": "%5.1lf%s" + }, + "ceph_bsec": { + "title": "Bytes/s for pool ({{PI}})", + "type": "stacked", + "legend": { + "read_bytes_sec": { + "name": "Read Bytes Sec", + "color": "0000ff" + }, + "write_bytes_sec": { + "name": "Write Bytes Sec", + "color": "00b000" + } + }, + "legend_format": "%5.1lf%s" + }, + "ceph_bused": { + "title": "Bytes Used for pool ({{PI}})", + "type": "stacked", + "legend": { + "bytes_used": { + "name": "Bytes Used" + } + }, + "legend_format": "%5.1lf%s" + }, + "ceph_kbused": { + "title": "KBytes Used for pool ({{PI}})", + "type": "stacked", + "legend": { + "kb_used": { + "name": "KBytes Used" + } + }, + "legend_format": "%5.1lf%s" + }, + "ceph_ops": { + "title": "Operations for pool ({{PI}})", + "type": "stacked", + "legend": { + "op_per_sec": { + "name": "Operation per Second" + } + }, + "legend_format": "%5.1lf%s" + }, + "ceph_obj": { + "title": "Objects for pool ({{PI}})", + "type": "stacked", + "vertical": "Objects", + "legend": { + "objects": { + "name": "Objects" + } + }, + "legend_format": "%5.1lf%s" + } +} diff --git a/plugin/cpu.json b/plugin/cpu.json index 6f746542..70e3eaf0 100644 --- a/plugin/cpu.json +++ b/plugin/cpu.json @@ -39,5 +39,46 @@ } }, "legend_format": "%5.2lf" - } + }, + "aggregation": { + "title": "Average CPU usage", + "vertical": "Jiffies", + "rrdtool_opts": ["-u", "100"], + "type": "aggregation", + "legend": { + "idle": { + "name": "Idle", + "color": "e8e8e8" + }, + "nice": { + "name": "Nice", + "color": "00e000" + }, + "user": { + "name": "User", + "color": "0000ff" + }, + "wait": { + "name": "Wait-IO", + "color": "ffb000" + }, + "system": { + "name": "System", + "color": "ff0000" + }, + "softirq": { + "name": "SoftIRQ", + "color": "ff00ff" + }, + "interrupt": { + "name": "IRQ", + "color": "a000a0" + }, + "steal": { + "name": "Steal", + "color": "000000" + } + }, + "legend_format": "%5.2lf" + } } diff --git a/plugin/curl_json-phpfpm.json b/plugin/curl_json-phpfpm.json new file mode 100644 index 00000000..21392564 --- /dev/null +++ b/plugin/curl_json-phpfpm.json @@ -0,0 +1,52 @@ +{ + "active_processes": { + "title": "Processes on {{HOST}}", + "vertical": "Nb/s", + "type": "default", + "legend_format": "%5.1lf%s", + "legend": { + "total processes": { + "name": "Total", + "color": "00ff00" + }, + "idle processes": { + "name": "Idle", + "color": "ff00ff" + }, + "active processes": { + "name": "Active", + "color": "ff0000" + } + } + }, + "http_requests": { + "title": "HTTP Requests on {{HOST}}", + "vertical": "Nb/s", + "legend": { + "accepted conn": { + "name": "Connections", + "color": "0000ff" + } + } + }, + "listen_queue": { + "title": "Listen Queue on {{HOST}}", + "vertical": "Nb/S", + "legend": { + "listen queue len": { + "name": "Length", + "color": "0000ff" + } + } + }, + "slow_requests": { + "title": "Slow Requests on {{HOST}}", + "vertical": "Nb/s", + "legend": { + "slow requests": { + "name": "Requests", + "color": "0000ff" + } + } + } +} diff --git a/plugin/curl_json-puppetdb-average_resources_per_node.json b/plugin/curl_json-puppetdb-average_resources_per_node.json new file mode 100644 index 00000000..e6bfb85a --- /dev/null +++ b/plugin/curl_json-puppetdb-average_resources_per_node.json @@ -0,0 +1,11 @@ +{ + "gauge": { + "title": "PuppetDB Average Resources per Node", + "type": "default", + "legend": { + "Value": { + "name": "Resources" + } + } + } +} diff --git a/plugin/curl_json-puppetdb-catalog_duplication_percentage.json b/plugin/curl_json-puppetdb-catalog_duplication_percentage.json new file mode 100644 index 00000000..5b4f9634 --- /dev/null +++ b/plugin/curl_json-puppetdb-catalog_duplication_percentage.json @@ -0,0 +1,15 @@ +{ + "gauge": { + "title": "PuppetDB Catalog Duplication", + "type": "default", + "vertical": "% of catalogs encountered", + "scale": "100", + "rrdtool_opts": ["-u", "100", "-l", "95", "-r"], + "legend_format": "%5.1lf%s", + "legend": { + "Value": { + "name": "Value" + } + } + } +} diff --git a/plugin/curl_json-puppetdb-collection_queries_service_time.json b/plugin/curl_json-puppetdb-collection_queries_service_time.json new file mode 100644 index 00000000..a81bafdb --- /dev/null +++ b/plugin/curl_json-puppetdb-collection_queries_service_time.json @@ -0,0 +1,11 @@ +{ + "latency": { + "title": "PuppetDB Collection Queries Service Time", + "type": "default", + "legend": { + "99thPercentile": { + "name": "99thPercentile" + } + } + } +} diff --git a/plugin/curl_json-puppetdb-command_processing_latency.json b/plugin/curl_json-puppetdb-command_processing_latency.json new file mode 100644 index 00000000..3c08300e --- /dev/null +++ b/plugin/curl_json-puppetdb-command_processing_latency.json @@ -0,0 +1,11 @@ +{ + "latency": { + "title": "PuppetDB Command Processing Latency", + "type": "default", + "legend": { + "99thPercentile": { + "name": "99thPercentile" + } + } + } +} diff --git a/plugin/curl_json-puppetdb-command_queue_depth.json b/plugin/curl_json-puppetdb-command_queue_depth.json new file mode 100644 index 00000000..7cf8fc37 --- /dev/null +++ b/plugin/curl_json-puppetdb-command_queue_depth.json @@ -0,0 +1,11 @@ +{ + "gauge": { + "title": "PuppetDB Command Queue Depth", + "type": "default", + "legend": { + "Value": { + "name": "QueueSize" + } + } + } +} diff --git a/plugin/curl_json-puppetdb-commands_discarded.json b/plugin/curl_json-puppetdb-commands_discarded.json new file mode 100644 index 00000000..89d26d2d --- /dev/null +++ b/plugin/curl_json-puppetdb-commands_discarded.json @@ -0,0 +1,11 @@ +{ + "counter": { + "title": "PuppetDB Commands Discarded", + "type": "default", + "legend": { + "Count": { + "name": "Count" + } + } + } +} diff --git a/plugin/curl_json-puppetdb-commands_processed.json b/plugin/curl_json-puppetdb-commands_processed.json new file mode 100644 index 00000000..721ccd2c --- /dev/null +++ b/plugin/curl_json-puppetdb-commands_processed.json @@ -0,0 +1,12 @@ +{ + "counter": { + "title": "PuppetDB Commands Processed", + "type": "default", + "vertical": "Commands", + "legend": { + "Count": { + "name": "Count" + } + } + } +} diff --git a/plugin/curl_json-puppetdb-commands_processed_per_second.json b/plugin/curl_json-puppetdb-commands_processed_per_second.json new file mode 100644 index 00000000..61b67531 --- /dev/null +++ b/plugin/curl_json-puppetdb-commands_processed_per_second.json @@ -0,0 +1,12 @@ +{ + "gauge": { + "title": "PuppetDB Commands Processing per Second", + "type": "default", + "vertical": "Commands", + "legend": { + "OneMinuteRate": { + "name": "OneMinuteRate" + } + } + } +} diff --git a/plugin/curl_json-puppetdb-commands_rejected.json b/plugin/curl_json-puppetdb-commands_rejected.json new file mode 100644 index 00000000..61215f12 --- /dev/null +++ b/plugin/curl_json-puppetdb-commands_rejected.json @@ -0,0 +1,11 @@ +{ + "counter": { + "title": "PuppetDB Commands Rejected", + "type": "default", + "legend": { + "Count": { + "name": "Count" + } + } + } +} diff --git a/plugin/curl_json-puppetdb-commands_retried.json b/plugin/curl_json-puppetdb-commands_retried.json new file mode 100644 index 00000000..5159fff6 --- /dev/null +++ b/plugin/curl_json-puppetdb-commands_retried.json @@ -0,0 +1,11 @@ +{ + "counter": { + "title": "PuppetDB Commands Retried", + "type": "default", + "legend": { + "Count": { + "name": "Count" + } + } + } +} diff --git a/plugin/curl_json-puppetdb-database_compaction_round_trip_time.json b/plugin/curl_json-puppetdb-database_compaction_round_trip_time.json new file mode 100644 index 00000000..acfb9fa7 --- /dev/null +++ b/plugin/curl_json-puppetdb-database_compaction_round_trip_time.json @@ -0,0 +1,11 @@ +{ + "latency": { + "title": "PuppetDB Database Comptaction Round Trip Time Latency", + "type": "default", + "legend": { + "99thPercentile": { + "name": "99thPercentile" + } + } + } +} diff --git a/plugin/curl_json-puppetdb-discarded_messages.json b/plugin/curl_json-puppetdb-discarded_messages.json new file mode 100644 index 00000000..25b4b328 --- /dev/null +++ b/plugin/curl_json-puppetdb-discarded_messages.json @@ -0,0 +1,11 @@ +{ + "gauge": { + "title": "PuppetDB Discarded Messages", + "type": "default", + "legend": { + "Value": { + "name": "To be reviewed" + } + } + } +} diff --git a/plugin/curl_json-puppetdb-dlo_compression_round_trip_time.json b/plugin/curl_json-puppetdb-dlo_compression_round_trip_time.json new file mode 100644 index 00000000..97606466 --- /dev/null +++ b/plugin/curl_json-puppetdb-dlo_compression_round_trip_time.json @@ -0,0 +1,11 @@ +{ + "latency": { + "title": "PuppetDB DLO Compression Round Trip Time Latency", + "type": "default", + "legend": { + "99thPercentile": { + "name": "99thPercentile" + } + } + } +} diff --git a/plugin/curl_json-puppetdb-dlo_size_on_disk.json b/plugin/curl_json-puppetdb-dlo_size_on_disk.json new file mode 100644 index 00000000..13db14d6 --- /dev/null +++ b/plugin/curl_json-puppetdb-dlo_size_on_disk.json @@ -0,0 +1,11 @@ +{ + "gauge": { + "title": "PuppetDB DLO Size On Disk", + "type": "default", + "legend": { + "Value": { + "name": "Bytes" + } + } + } +} diff --git a/plugin/curl_json-puppetdb-enqueuing_service_time.json b/plugin/curl_json-puppetdb-enqueuing_service_time.json new file mode 100644 index 00000000..6686b36c --- /dev/null +++ b/plugin/curl_json-puppetdb-enqueuing_service_time.json @@ -0,0 +1,11 @@ +{ + "latency": { + "title": "PuppetDB Enqueuing Service Time", + "type": "default", + "legend": { + "99thPercentile": { + "name": "99thPercentile" + } + } + } +} diff --git a/plugin/curl_json-puppetdb-jvm_heap_memory.json b/plugin/curl_json-puppetdb-jvm_heap_memory.json new file mode 100644 index 00000000..36890fda --- /dev/null +++ b/plugin/curl_json-puppetdb-jvm_heap_memory.json @@ -0,0 +1,11 @@ +{ + "gauge": { + "title": "PuppetDB JVM Heap Memory", + "type": "default", + "legend": { + "HeapMemoryUsage-used": { + "name": "HeapMemoryUsage" + } + } + } +} diff --git a/plugin/curl_json-puppetdb-nodes_count.json b/plugin/curl_json-puppetdb-nodes_count.json new file mode 100644 index 00000000..ecf6a146 --- /dev/null +++ b/plugin/curl_json-puppetdb-nodes_count.json @@ -0,0 +1,11 @@ +{ + "gauge": { + "title": "PuppetDB Managed Nodes", + "type": "default", + "legend": { + "Value": { + "name": "Nodes" + } + } + } +} diff --git a/plugin/curl_json-puppetdb-resource_duplication_percentage.json b/plugin/curl_json-puppetdb-resource_duplication_percentage.json new file mode 100644 index 00000000..3e5c5f96 --- /dev/null +++ b/plugin/curl_json-puppetdb-resource_duplication_percentage.json @@ -0,0 +1,15 @@ +{ + "gauge": { + "title": "PuppetDB Resource Duplication", + "type": "default", + "scale": "100", + "rrdtool_opts": ["-u", "100", "-l", "80", "-r"], + "legend_format": "%5.1lf%s", + "vertical": "% of resources stored", + "legend": { + "Value": { + "name": "Value" + } + } + } +} diff --git a/plugin/curl_json-puppetdb-resources_count.json b/plugin/curl_json-puppetdb-resources_count.json new file mode 100644 index 00000000..0c3b23e3 --- /dev/null +++ b/plugin/curl_json-puppetdb-resources_count.json @@ -0,0 +1,11 @@ +{ + "gauge": { + "title": "PuppetDB Managed Resources", + "type": "default", + "legend": { + "Value": { + "name": "Resources" + } + } + } +} diff --git a/plugin/curl_json.json b/plugin/curl_json.json index d4c76e87..64c3fa09 100644 --- a/plugin/curl_json.json +++ b/plugin/curl_json.json @@ -17,24 +17,64 @@ "title": "Cache query on {{HOST}}", "vertical": "Queries", "type": "stacked", - "legend_format": "%5.1lf%s" + "legend_format": "%5.1lf%s", + "legend": { + "opcache_statistics-hits": { + "name": "Hits", + "color": "00ff00" + }, + "opcache_statistics-misses": { + "name": "Misses", + "color": "ff0000" + } + } }, "cache_size": { "title": "Cache query on {{HOST}}", "vertical": "Bytes", "type": "stacked", - "legend_format": "%5.1lf%s" + "legend_format": "%5.1lf%s", + "legend": { + "memory_usage-free_memory": { + "name": "Free", + "color": "00ff00" + }, + "memory_usage-used_memory": { + "name": "Used", + "color": "ff0000" + } + } }, "files": { "title": "Files on {{HOST}}", "vertical": "Files", - "type": "stacked", - "legend_format": "%5.1lf%s" + "type": "stackedtotal", + "legend_format": "%5.1lf%s", + "legend": { + "opcache_statistics-num_cached_keys": { + "name": "Num cached keys", + "color": "ff0000" + }, + "opcache_statistics-num_cached_scripts": { + "name": "Num cached scripts", + "color": "ff00ff" + }, + "opcache_statistics-max_cached_keys": { + "name": "Max cached keys", + "color": "00ff00" + } + } }, "cache_ratio": { "title": "Ratio on {{HOST}}", "vertical": "%", "type": "stacked", - "legend_format": "%5.1lf%s" + "legend_format": "%5.1lf%s", + "legend": { + "opcache_statistics-opcache_hit_rate": { + "name": "Hit rate", + "color": "00ff00" + } + } } } diff --git a/plugin/dbi.json b/plugin/dbi.json index 2c63c085..28ac0302 100644 --- a/plugin/dbi.json +++ b/plugin/dbi.json @@ -1,2 +1,270 @@ { + "mysql_select": { + "title": "Mysql Select {{PI}}", + "vertical": "counter", + "type": "stacked", + "legend": { + "select_range": { + "name": "Select Range" + }, + "select_range_check": { + "name": "Select Range Check" + }, + "select_full_join": { + "name": "Select Full Join" + }, + "select_full_range_join": { + "name": "Select Full Range Join" + }, + "select_scan": { + "name": "Select Scan" + } + } + }, + "mysql_slowqueries": { + "title": "Mysql Slow Queries {{PI}}", + "vertical": "counter", + "type": "stacked", + "legend": { + "slow_queries": { + "name": "Number of slow queries" + } + } + }, + "mysql_createtmp": { + "title": "Mysql Temporary Objects {{PI}}", + "vertical": "counter", + "type": "stacked", + "legend": { + "created_tmp_disk_tables": { + "name": "Created Temp Disk Tables" + }, + "created_tmp_tables": { + "name": "Created Temp Tables" + }, + "created_tmp_files": { + "name": "Created Temp Files" + } + } + }, + "mysql_open": { + "title": "Mysql Open Objects {{PI}}", + "vertical": "counter", + "type": "stacked", + "legend": { + "open_tables": { + "name": "Open Tables" + }, + "open_files": { + "name": "Open Files" + } + } + }, + "mysql_opened": { + "title": "Mysql Opened Objects {{PI}}", + "vertical": "counter", + "type": "stacked", + "legend": { + "opened_tables": { + "name": "Opened Tables" + }, + "opened_files": { + "name": "Opened Files" + } + } + }, + "mysql_qcachemem": { + "title": "Mysql Qcache Memory {{PI}}", + "vertical": "counter", + "type": "stacked", + "legend": { + "qcache_free_memory": { + "name": "Qcache Memory Free" + }, + "query_cache_size": { + "name": "Qcache Memory Total" + }, + "qcache_free_blocks": { + "name": "Qcache Blocks Free" + }, + "qcache_total_blocks": { + "name": "Qcache Total Blocks" + } + } + }, + "mysql_databasesize": { + "title": "Mysql Total BDD Size {{PI}}", + "vertical": "MB", + "type": "stacked", + "legend": { + "full_bdd_size": { + "name": "Total BDD Size" + } + } + }, + "pg_db_size": { + "title": "PostgreSQL Total BDD Size {{PI}}", + "vertical": "MB", + "type": "stacked", + "legend": { + "pg_db_size": { + "name": "Total BDD Size" + } + } + }, + "mysql_sort": { + "title": "Mysql Sort Operations {{PI}}", + "vertical": "counter", + "type": "stacked", + "legend": { + "sort_merge_passes": { + "name": "Sort Range Passes" + }, + "sort_range": { + "name": "Sort Range" + }, + "sort_rows": { + "name": "Sort Rows" + }, + "sort_scan": { + "name": "Sort Scan" + } + } + }, + "mysql_connectionsc": { + "title": "Mysql Connections {{PI}}", + "vertical": "counter", + "type": "stacked", + "legend": { + "aborted_clients": { + "name": "Aborted Clients Connections" + }, + "aborted_connects": { + "name": "Aborted Connections" + }, + "connections": { + "name": "Connections" + } + } + }, + "pg_xact": { + "title": "PostgreSQL Transactions {{PI}}", + "vertical": "counter", + "type": "stacked", + "legend": { + "pg_commit": { + "name": "Transactions abouties" + }, + "pg_rollback": { + "name": "Transactions annulees" + } + } + }, + "pg_blks": { + "title": "PostgreSQL Disk IO {{PI}}", + "vertical": "counter", + "type": "stacked", + "legend": { + "heap_hit": { + "name": "Heap Hit" + }, + "heap_read": { + "name": "Heap Read" + }, + "idx_hit": { + "name": "Index Hit" + }, + "idx_read": { + "name": "Index Read" + }, + "tidx_read": { + "name": "Toast Index Read" + }, + "tidx_hit": { + "name": "Toast Index Hit" + }, + "toast_hit": { + "name": "Toast Hit" + }, + "toast_read": { + "name": "Toast Read" + } + } + }, + "pg_n_tup_c": { + "title": "PostgreSQL Queries {{PI}}", + "vertical": "counter", + "type": "stacked", + "legend": { + "del": { + "name": "Delete Requests" + }, + "hot_upd": { + "name": "HOT Update Requests" + }, + "ins": { + "name": "Insert Requests" + }, + "upd": { + "name": "Update Requests" + } + } + }, + "pg_n_tup_g": { + "title": "PostgreSQL Tables State {{PI}}", + "vertical": "counter", + "type": "stacked", + "legend": { + "live": { + "name": "Live Requests" + }, + "dead": { + "name": "Dead Requests" + } + } + }, + "pg_scan": { + "title": "PostgreSQL Query Plans {{PI}}", + "vertical": "counter", + "type": "stacked", + "legend": { + "idx": { + "name": "Nb Index Scan Tables" + }, + "idx_tup_fetch": { + "name": "Nb Rows Index Scans Found" + }, + "seq": { + "name": "Nb Sequential Scan Tables" + }, + "seq_tup_read": { + "name": "Nb Rows Sequential Scan Found" + } + } + }, + "pg_numbackends": { + "title": "PostgreSQL Connections {{PI}}", + "vertical": "counter", + "type": "stacked", + "legend": { + "pg_connection": { + "name": "Connections actives" + } + } + }, + "mysql_connectionsg": { + "title": "Mysql Limits Connections {{PI}}", + "vertical": "counter", + "type": "stacked", + "legend": { + "max_connections": { + "name": "Maximum Connections" + }, + "max_used_connections": { + "name": "Maximum Used Connections" + } + } + }, + "legend_format": "%5.1lf%s" } + diff --git a/plugin/memory-pagefile.json b/plugin/memory-pagefile.json new file mode 100644 index 00000000..fccf8b8a --- /dev/null +++ b/plugin/memory-pagefile.json @@ -0,0 +1,19 @@ +{ + "memory": { + "title": "Virtual Memory utilization on {{HOST}}", + "vertical": "Bytes", + "type": "stacked", + "legend": { + "free": { + "name": "Free", + "color": "00e000" + }, + "used": { + "name": "Used", + "color": "ff0000" + } + }, + "base": "1024" + } +} + diff --git a/plugin/mongo.json b/plugin/mongo.json new file mode 100644 index 00000000..c465f6a6 --- /dev/null +++ b/plugin/mongo.json @@ -0,0 +1,112 @@ +{ + "file_size": { + "title": "Mongo DB size ({{PI}}) on {{HOST}}", + "vertical": "Bytes", + "type": "stacked", + "legend": { + "data": { + "name": "Data" + }, + "index": { + "name": "Index" + }, + "storage": { + "name": "Storage" + } + + }, + "legend_format": "%5.1lf%s" + }, + "total_operations": { + "title": "Mongo DB Total Operations ({{PI}}) on {{HOST}}", + "vertical": "Commandes par secondes", + "type": "stacked", + "legend": { + "command": { + "name": "Command" + }, + "delete": { + "name": "Delete" + }, + "getmore": { + "name": "Getmore" + }, + "insert": { + "name": "Insert" + }, + "query": { + "name": "Query" + }, + "update": { + "name": "Update" + } + } + }, + "memory": { + "title": "Mongo DB memory usage ({{PI}}) on {{HOST}}", + "vertical": "MB", + "type": "stacked", + + "legend": { + "mapped": { + "name": "Mapped" + }, + "resident": { + "name": "Resident" + }, + "virtual": { + "name": "Virtual" + } + } + }, + "connections": { + "title": "Mongo DB connexions ({{PI}}) on {{HOST}}", + "vertical": "Open Connections", + "type": "stacked", + "legend": { + "connections": { + "name": "Connections" + } + } + }, + "cache_ratio": { + "title": "Mongo DB cache ratio ({{PI}}) on {{HOST}}", + "vertical": "Cache misses ratio", + "type": "stacked", + "legend": { + "cache_misses": { + "name": "Cache Misses" + } + } + }, + "percent": { + "title": "Mongo DB lock ratio ({{PI}}) on {{HOST}}", + "vertical": "Locks ratio", + "type": "stacked", + "legend": { + "lock_ratio": { + "name": "Lock Ratio" + } + } + }, + "gauge": { + "title": "Mongo DB Objects Counters ({{PI}}) on {{HOST}}", + "vertical": "Number of ...", + "type": "stacked", + "legend": { + "collections": { + "name": "Collections" + }, + "indexes": { + "name": "Indexes" + }, + "num_extents": { + "name": "Extents" + }, + "object_count": { + "name": "Objects Count" + } + } + } +} + diff --git a/plugin/mysql.json b/plugin/mysql.json index 1b7dd8cd..9ea93fb4 100644 --- a/plugin/mysql.json +++ b/plugin/mysql.json @@ -28,7 +28,7 @@ "vertical": "Queries in cache", "type": "stacked", "legend": { - "value": { + "qcache": { "name": "Queries" } }, @@ -52,23 +52,33 @@ "color": "ff00e7" }, "read_first": { + "name": "read first", "color": "cc00ff" }, "read_key": { + "name": "read key", "color": "3200ff" }, "read_next": { + "name": "read next", "color": "0065ff" }, "read_prev": { + "name": "read prev", "color": "00fff3" }, "read_rnd": { + "name": "read rnd", "color": "00ff65" }, "read_rnd_next": { + "name": "read rnd next", "color": "33ff00" }, + "read_last": { + "name": "read last", + "color": "9fe855" + }, "update": { "color": "cbff00" }, @@ -130,11 +140,95 @@ }, "legend_format": "%5.1lf%s" }, + "mysql_qcache": { + "title": "MySQL Query Cache ({{PI}}) on {{HOST}}", + "vertical": "Queries", + "type": "stacked", + "legend": { + "not_cached": { + "name": "Not Cached", + "color": "f0a000" + }, + "inserts": { + "name": "Inserts", + "color": "0000ff" + }, + "hits": { + "name": "Hits", + "color": "00e000" + }, + "lowmem_prunes": { + "name": "Lowmem Prunes", + "color": "ff0000" + }, + "queries_in_cache": { + "name": "Queries in Cache", + "color": "cccccc" + } + }, + "legend_format": "%5.1lf%s" + }, + "mysql_threads": { + "title": "MySQL Threads ({{PI}}) on {{HOST}}", + "vertical": "Threads", + "type": "stacked", + "legend": { + "cached": { + "name": "Cached", + "color": "f0a000" + }, + "connected": { + "name": "Connected", + "color": "0000ff" + }, + "running": { + "name": "Running", + "color": "00e000" + }, + "created": { + "name": "Created", + "color": "ff0000" + }, + "queries_in_cache": { + "name": "Queries in Cache", + "color": "cccccc" + } + }, + "legend_format": "%5.1lf%s" + }, + "mysql_log_position": { + "title": "MySQL Log Position ({{PI}}) on {{HOST}}", + "vertical": "Position", + "type": "stacked", + "legend": { + "master-bin": { + "name": "Master Bin" + }, + "slave-exec": { + "name": "Slave Exec" + }, + "slave-read": { + "name": "Slave Read" + } + }, + "legend_format": "%5.1lf%s" + }, + "time_offset": { + "title": "MySQL Time Offset ({{PI}}) on {{HOST}}", + "vertical": "Seconds", + "type": "stacked", + "legend": { + "value": { + "name": "Second Behind Master" + } + }, + "legend_format": "%5.1lf%s" + }, "total_threads": { "title": "MySQL created threads ({{PI}}) on {{HOST}}", "vertical": "Created Threads", "legend": { - "value": { + "created": { "name": "Created" } }, diff --git a/plugin/redis_info.json b/plugin/redis_info.json new file mode 100644 index 00000000..2e11a1c8 --- /dev/null +++ b/plugin/redis_info.json @@ -0,0 +1,20 @@ +{ + + "current_connections": { + "title": "Client / slaves on {{HOST}}", + "vertical": "Number of ...", + "type": "stacked", + "legend": { + "connected_clients": { + "name": "connected_clients" + }, + "connected_slaves": { + "name": "connected_slaves" + }, + "blocked_clients": { + "name": "blocked_clients" + } + } + } + +} diff --git a/plugin/solr_info-cache.json b/plugin/solr_info-cache.json new file mode 100644 index 00000000..e189e485 --- /dev/null +++ b/plugin/solr_info-cache.json @@ -0,0 +1,22 @@ +{ + "gauge": { + "title": "Solr cache ({{PC}}) on {{HOST}}", + "vertical": "*", + "legend": { + "evictions": { + "name": "Evictions", + "color": "0000ff" + }, + "hitratio": { + "name": "Hit ratio", + "color": "00ff00" + }, + "size": { + "name": "Size", + "color": "0ff000" + } + }, + "legend_format": "%5.0lf" + } +} + diff --git a/plugin/solr_info-cache_hitratio.json b/plugin/solr_info-cache_hitratio.json new file mode 100644 index 00000000..4212722e --- /dev/null +++ b/plugin/solr_info-cache_hitratio.json @@ -0,0 +1,15 @@ +{ + "gauge": { + "title": "Solr hit cache ratio ({{PC}}) on {{HOST}}", + "vertical": "%", + "legend": { + "hitratio": { + "name": "Hit Ratio", + "color": "0000ff" + } + }, + "legend_format": "%1.2lf", + "scale": "100" + } +} + diff --git a/plugin/solr_info-index.json b/plugin/solr_info-index.json new file mode 100644 index 00000000..a2456cc0 --- /dev/null +++ b/plugin/solr_info-index.json @@ -0,0 +1,14 @@ +{ + "gauge": { + "title": "Documents in index ({{PC}}) on {{HOST}}", + "vertical": "Documents", + "legend": { + "documents": { + "name": "Documents", + "color": "0000ff" + } + }, + "legend_format": "%5.0lf" + } +} + diff --git a/plugin/solr_info-update.json b/plugin/solr_info-update.json new file mode 100644 index 00000000..09229e5e --- /dev/null +++ b/plugin/solr_info-update.json @@ -0,0 +1,43 @@ +{ + "gauge": { + "title": "Update statistics ({{PC}}) on {{HOST}}", + "vertical": "Nb", + "legend": { + "errors": { + "name": "Errors" + }, + "commits": { + "name": "Commits" + }, + "autocommits": { + "name": "Autocommits" + }, + "soft_autocommits": { + "name": "Soft autocommits" + }, + "optimizes": { + "name": "Optimizes" + }, + "expunges": { + "name": "Expunges" + }, + "rollbacks": { + "name": "Rollbacks" + }, + "pending_docs": { + "name": "Pending documents" + }, + "adds": { + "name": "Adds" + }, + "deletes_by_id": { + "name": "Deletes by ID" + }, + "deletes_by_query": { + "name": "Deletes by query" + } + }, + "legend_format": "%5.0lf" + } +} + diff --git a/plugin/solr_info.json b/plugin/solr_info.json new file mode 100644 index 00000000..0967ef42 --- /dev/null +++ b/plugin/solr_info.json @@ -0,0 +1 @@ +{} diff --git a/plugin/tail-puppet-catalog.json b/plugin/tail-puppet-catalog.json new file mode 100644 index 00000000..9f7b3fde --- /dev/null +++ b/plugin/tail-puppet-catalog.json @@ -0,0 +1,18 @@ +{ + "gauge": { + "title": "Average catalogs compilation time on {{HOST}}", + "type": "default", + "vertical": "Seconds", + "legend": { + "production": { + "name": "Production" + }, + "build": { + "name": "Build" + }, + "test": { + "name": "Test" + } + } + } +} diff --git a/plugin/varnish3-allocations.json b/plugin/varnish3-allocations.json new file mode 100644 index 00000000..b40cec7c --- /dev/null +++ b/plugin/varnish3-allocations.json @@ -0,0 +1,12 @@ +{ + "all": { + "title": "Memory allocation requests", + "type": "varnish", + "legend": { + "sms_nreq": { + "name": "SMS allocator requests" + } + }, + "legend_format": "%5.1lf" + } +} diff --git a/plugin/varnish3-backend_traffic.json b/plugin/varnish3-backend_traffic.json new file mode 100644 index 00000000..1e858f3e --- /dev/null +++ b/plugin/varnish3-backend_traffic.json @@ -0,0 +1,30 @@ +{ + "all": { + "title": "Backend traffic", + "type": "varnish", + "legend": { + "backend_unhealthy": { + "name": "Backend conn. not attempted" + }, + "backend_conn": { + "name": "Backend conn. success" + }, + "backend_busy": { + "name": "Backend conn. too many" + }, + "backend_fail": { + "name": "Backend conn. failures" + }, + "backend_reuse": { + "name": "Backend conn. reuses" + }, + "backend_req": { + "name": "Backend requests made" + }, + "backend_recycle": { + "name": "Backend conn. recycles" + } + }, + "legend_format": "%5.1lf" + } +} diff --git a/plugin/varnish3-bad.json b/plugin/varnish3-bad.json new file mode 100644 index 00000000..ae8b36b6 --- /dev/null +++ b/plugin/varnish3-bad.json @@ -0,0 +1,54 @@ +{ + "all": { + "title": "Misbehavior", + "type": "varnish", + "legend": { + "fetch_failed": { + "name": "Fetch failed" + }, + "n_wrk_drop": { + "name": "N dropped work requests" + }, + "backend_unhealthy": { + "name": "Backend conn. not attempted" + }, + "accept_fail": { + "name": "Accept failures" + }, + "n_wrk_failed": { + "name": "N worker threads not created" + }, + "client_drop_late": { + "name": "Connection dropped late" + }, + "losthdr": { + "name": "HTTP header overflows" + }, + "n_wrk_max": { + "name": "N worker threads limited" + }, + "client_drop": { + "name": "Connection dropped, no sess/wrk" + }, + "n_wrk_lqueue": { + "name": "work request queue length" + }, + "esi_warnings": { + "name": "ESI parse warnings (unlock)" + }, + "backend_busy": { + "name": "Backend conn. too many" + }, + "esi_errors": { + "name": "ESI parse errors (unlock)" + }, + "n_objoverflow": { + "name": "Objects overflowing workspace" + }, + "n_wrk_lqueue": { + "name": "work request queue length" + } + }, + "legend_format": "%5.1lf" + } +} diff --git a/plugin/varnish3-data_structures.json b/plugin/varnish3-data_structures.json new file mode 100644 index 00000000..4c8210aa --- /dev/null +++ b/plugin/varnish3-data_structures.json @@ -0,0 +1,15 @@ +{ + "all": { + "title": "Data structure sizes", + "type": "varnish", + "legend": { + "n_sess": { + "name": "N struct sess" + }, + "n_sess_mem": { + "name": "N struct sess_mem" + } + }, + "legend_format": "%5.1lf" + } +} diff --git a/plugin/varnish3-esi.json b/plugin/varnish3-esi.json new file mode 100644 index 00000000..c897884c --- /dev/null +++ b/plugin/varnish3-esi.json @@ -0,0 +1,12 @@ +{ + "all": { + "title": "ESI", + "type": "varnish", + "legend": { + "esi_errors": { + "name": "ESI parse errors (unlock)" + } + }, + "legend_format": "%5.1lf" + } +} diff --git a/plugin/varnish3-expunge.json b/plugin/varnish3-expunge.json new file mode 100644 index 00000000..b5cd8557 --- /dev/null +++ b/plugin/varnish3-expunge.json @@ -0,0 +1,15 @@ +{ + "all": { + "title": "Object expunging", + "type": "varnish", + "legend": { + "n_lru_nuked": { + "name": "N LRU nuked objects" + }, + "n_expired": { + "name": "N expired objects" + } + }, + "legend_format": "%5.1lf" + } +} diff --git a/plugin/varnish3-hcb.json b/plugin/varnish3-hcb.json new file mode 100644 index 00000000..894ff7d7 --- /dev/null +++ b/plugin/varnish3-hcb.json @@ -0,0 +1,18 @@ +{ + "all": { + "title": "Critbit data", + "type": "varnish", + "legend": { + "hcb_nolock": { + "name": "HCB Lookups without lock" + }, + "hcb_insert": { + "name": "HCB Inserts" + }, + "hcb_lock": { + "name": "HCB Lookups with lock" + } + }, + "legend_format": "%5.1lf" + } +} diff --git a/plugin/varnish3-hit_rate.json b/plugin/varnish3-hit_rate.json new file mode 100644 index 00000000..184903d7 --- /dev/null +++ b/plugin/varnish3-hit_rate.json @@ -0,0 +1,21 @@ +{ + "all": { + "title": "Hit rates", + "type": "varnish", + "legend": { + "cache_hit": { + "name": "Cache hits" + }, + "client_req": { + "name": "Client requests received" + }, + "cache_miss": { + "name": "Cache misses" + }, + "cache_hitpass": { + "name": "Cache hits for pass" + } + }, + "legend_format": "%5.1lf" + } +} diff --git a/plugin/varnish3-losthdr.json b/plugin/varnish3-losthdr.json new file mode 100644 index 00000000..bda08ecc --- /dev/null +++ b/plugin/varnish3-losthdr.json @@ -0,0 +1,12 @@ +{ + "all": { + "title": "HTTP Header overflows", + "type": "varnish", + "legend": { + "losthdr": { + "name": "HTTP header overflows" + } + }, + "legend_format": "%5.1lf" + } +} diff --git a/plugin/varnish3-lru.json b/plugin/varnish3-lru.json new file mode 100644 index 00000000..dc43e6c3 --- /dev/null +++ b/plugin/varnish3-lru.json @@ -0,0 +1,12 @@ +{ + "all": { + "title": "LRU activity", + "type": "varnish", + "legend": { + "n_lru_moved": { + "name": "N LRU moved objects" + } + }, + "legend_format": "%5.1lf" + } +} diff --git a/plugin/varnish3-memory_usage.json b/plugin/varnish3-memory_usage.json new file mode 100644 index 00000000..4b568d53 --- /dev/null +++ b/plugin/varnish3-memory_usage.json @@ -0,0 +1,15 @@ +{ + "all": { + "title": "Memory usage", + "type": "varnish", + "legend": { + "sms_balloc": { + "name": "SMS bytes allocated" + }, + "sms_nbytes": { + "name": "SMS outstanding bytes" + } + }, + "legend_format": "%5.1lf" + } +} diff --git a/plugin/varnish3-objects.json b/plugin/varnish3-objects.json new file mode 100644 index 00000000..14b63b37 --- /dev/null +++ b/plugin/varnish3-objects.json @@ -0,0 +1,18 @@ +{ + "all": { + "title": "Number of objects", + "type": "varnish", + "legend": { + "n_object": { + "name": "N struct object" + }, + "n_objectcore": { + "name": "N struct objectcore" + }, + "n_objecthead": { + "name": "N struct objecthead" + } + }, + "legend_format": "%5.1lf" + } +} diff --git a/plugin/varnish3-objects_per_objhead.json b/plugin/varnish3-objects_per_objhead.json new file mode 100644 index 00000000..68b0fa5c --- /dev/null +++ b/plugin/varnish3-objects_per_objhead.json @@ -0,0 +1,15 @@ +{ + "all": { + "title": "Objects per objecthead", + "type":"varnish", + "legend": { + "n_object": { + "name": "N struct object" + }, + "n_objecthead": { + "name": "N struct objecthead" + } + }, + "legend_format": "%5.1lf" + } +} diff --git a/plugin/varnish3-objoverflow.json b/plugin/varnish3-objoverflow.json new file mode 100644 index 00000000..db6cd699 --- /dev/null +++ b/plugin/varnish3-objoverflow.json @@ -0,0 +1,12 @@ +{ + "all": { + "title": "Objects overflowing workspace", + "type": "varnish", + "legend": { + "n_objoverflow": { + "name": "Objects overflowing workspace" + } + }, + "legend_format": "%5.1lf" + } +} diff --git a/plugin/varnish3-request_rate.json b/plugin/varnish3-request_rate.json new file mode 100644 index 00000000..12177d34 --- /dev/null +++ b/plugin/varnish3-request_rate.json @@ -0,0 +1,33 @@ +{ + "all": { + "title": "Request rates", + "type": "varnish", + "legend": { + "client_req": { + "name": "Client requests received" + }, + "cache_miss": { + "name": "Cache misses" + }, + "s_pipe": { + "name": "Total pipe" + }, + "backend_conn": { + "name": "Backend conn. success" + }, + "backend_unhealthy": { + "name": "Backend conn. not attempted" + }, + "cache_hit": { + "name": "Cache hits" + }, + "s_pass": { + "name": "Total pass" + }, + "cache_hitpass": { + "name": "Cache hits for pass" + } + }, + "legend_format": "%5.1lf" + } +} diff --git a/plugin/varnish3-session.json b/plugin/varnish3-session.json new file mode 100644 index 00000000..a470fc52 --- /dev/null +++ b/plugin/varnish3-session.json @@ -0,0 +1,21 @@ +{ + "all": { + "title": "Sessions", + "type": "varnish", + "legend": { + "sess_closed": { + "name": "Session Closed" + }, + "sess_readahead": { + "name": "Session Read Ahead" + }, + "sess_pipeline": { + "name": "Session Pipeline" + }, + "sess_linger": { + "name": "Session Linger" + } + }, + "legend_format": "%5.1lf" + } +} diff --git a/plugin/varnish3-session_herd.json b/plugin/varnish3-session_herd.json new file mode 100644 index 00000000..a45cfa79 --- /dev/null +++ b/plugin/varnish3-session_herd.json @@ -0,0 +1,12 @@ +{ + "all": { + "title": "Session herd", + "type": "varnish", + "legend": { + "sess_herd": { + "name": "Session herd" + } + }, + "legend_format": "%5.1lf" + } +} diff --git a/plugin/varnish3-shm.json b/plugin/varnish3-shm.json new file mode 100644 index 00000000..c38d8624 --- /dev/null +++ b/plugin/varnish3-shm.json @@ -0,0 +1,18 @@ +{ + "all": { + "title": "Shared memory activity", + "type": "varnish", + "legend": { + "shm_cont": { + "name": "SHM MTX contention" + }, + "shm_flushes": { + "name": "SHM flushes due to overflow" + }, + "shm_cycles": { + "name": "SHM cycles through buffer" + } + }, + "legend_format": "%5.1lf" + } +} diff --git a/plugin/varnish3-shm_writes.json b/plugin/varnish3-shm_writes.json new file mode 100644 index 00000000..8922e2fc --- /dev/null +++ b/plugin/varnish3-shm_writes.json @@ -0,0 +1,15 @@ +{ + "all": { + "title": "SHM writes and records", + "type": "varnish", + "legend": { + "shm_writes": { + "name": "SHM writes" + }, + "shm_records": { + "name": "SHM records" + } + }, + "legend_format": "%5.1lf" + } +} diff --git a/plugin/varnish3-threads.json b/plugin/varnish3-threads.json new file mode 100644 index 00000000..c976c28a --- /dev/null +++ b/plugin/varnish3-threads.json @@ -0,0 +1,24 @@ +{ + "all": { + "title": "Thread status", + "type": "varnish", + "legend": { + "n_wrk_create": { + "name": "N worker threads created" + }, + "n_wrk_failed": { + "name": "N worker threads not created" + }, + "n_wrk_max": { + "name": "N worker threads limited" + }, + "n_wrk_drop": { + "name": "N dropped work requests" + } + "n_wrk": { + "name": "N worker threads" + } + }, + "legend_format": "%5.1lf" + } +} diff --git a/plugin/varnish3-transfer_rates.json b/plugin/varnish3-transfer_rates.json new file mode 100644 index 00000000..8db870a1 --- /dev/null +++ b/plugin/varnish3-transfer_rates.json @@ -0,0 +1,15 @@ +{ + "all": { + "title": "Client response transfer rates", + "type": "varnish", + "legend": { + "s_hdrbytes": { + "name": "Total header bytes" + }, + "s_bodybytes": { + "name": "Total body bytes" + } + }, + "legend_format": "%5.1lf" + } +} diff --git a/plugin/varnish3-uptime.json b/plugin/varnish3-uptime.json new file mode 100644 index 00000000..a1efc963 --- /dev/null +++ b/plugin/varnish3-uptime.json @@ -0,0 +1,12 @@ +{ + "all": { + "title": "Varnish uptime", + "type": "varnish", + "legend": { + "uptime": { + "name": "Client uptime" + } + }, + "legend_format": "%5.1lf" + } +} diff --git a/plugin/varnish3-vcl_and_bans.json b/plugin/varnish3-vcl_and_bans.json new file mode 100644 index 00000000..0c00dc2f --- /dev/null +++ b/plugin/varnish3-vcl_and_bans.json @@ -0,0 +1,45 @@ +{ + "all": { + "title": "VCL and bans", + "type": "varnish", + "legend": { + "n_vcl": { + "name": "N vcl total" + }, + "n_vcl_discard": { + "name": "N vcl discarded" + }, + "n_ban_dups": { + "name": "N duplicate bans removed" + }, + "n_backend": { + "name": "N backends" + }, + "n_ban_add": { + "name": "N new bans added" + }, + "n_ban": { + "name": "N total active bans" + }, + "n_ban_obj_test": { + "name": "N objects tested" + }, + "n_ban_retire": { + "name": "N old bans deleted" + }, + "n_ban_re_test": { + "name": "N regexps tested against" + }, + "n_vcl_avail": { + "name": "N vcl available" + }, + "n_backend": { + "name": "N backends" + }, + "n_ban": { + "name": "N total active bans" + } + }, + "legend_format": "%5.1lf" + } +} diff --git a/plugin/wpm.json b/plugin/wpm.json index 2c63c085..475bbd42 100644 --- a/plugin/wpm.json +++ b/plugin/wpm.json @@ -1,2 +1,24 @@ { + "gauge": { + "type": "iowpm", + "vertical": "Seconds", + "legend": { + "wpm_Time_namelookup": { + "name": "DNS", + "color": "ffff33" + }, + "wpm_Time_starttransfer": { + "name": "1st byte", + "color": "ff6633" + }, + "wpm_Time_connect": { + "name": "Connect", + "color": "d86887" + }, + "wpm_Time_total": { + "name": "Total", + "color": "9f30ff" + } + } + } } diff --git a/style/bootstrap_extra.css b/style/bootstrap_extra.css index 9218f990..22bd9a46 100644 --- a/style/bootstrap_extra.css +++ b/style/bootstrap_extra.css @@ -70,6 +70,22 @@ div.dataTables_wrapper { cursor: url(../img/zoom.png), pointer; } +figure { + display: inline-block; + border: 2px solid #CCCCCC; + background: #F3F3F3; + margin: 2px; +} + +figure figcaption { + text-align:center; + font-family: "DejaVu Sans Mono", Consolas, "Andale Mono WT", "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", Monaco, "Courier New", Courier, monospace; + font-weight:lighter; + font-size: 0.9em; + overflow:hidden; + white-space: nowrap; +} + form.form-inline div.form-group select.form-control { margin-top:0; } diff --git a/type/Base.class.php b/type/Base.class.php index 7a959f68..f03449a6 100644 --- a/type/Base.class.php +++ b/type/Base.class.php @@ -293,6 +293,11 @@ function rrd_options() { $rrdgraph[] = '0'; } + if (GRAPH_TITLE=='text') { + $rrdgraph[] = '--border'; + $rrdgraph[] = '0'; + } + if ($this->rrd_vertical) { $rrdgraph[] = '-v'; $rrdgraph[] = $this->rrd_vertical;