Files
librenms-librenms/includes/html/pages/apps.inc.php

404 lines
6.7 KiB
PHP
Raw Normal View History

<?php
2020-09-21 15:40:17 +02:00
$pagetitle[] = 'Apps';
2020-09-21 15:40:17 +02:00
$graphs['apache'] = [
2015-07-13 20:10:26 +02:00
'bits',
'hits',
'scoreboard',
'cpu',
2020-09-21 15:40:17 +02:00
];
$graphs['drbd'] = [
2015-07-13 20:10:26 +02:00
'disk_bits',
'network_bits',
'queue',
'unsynced',
2020-09-21 15:40:17 +02:00
];
$graphs['entropy'] = [
'entropy',
2020-09-21 15:40:17 +02:00
];
$graphs['mysql'] = [
2015-07-13 20:10:26 +02:00
'network_traffic',
'connections',
'command_counters',
'select_types',
2020-09-21 15:40:17 +02:00
];
$graphs['memcached'] = [
2015-07-13 20:10:26 +02:00
'bits',
'commands',
'data',
'items',
2020-09-21 15:40:17 +02:00
];
$graphs['redis'] = [
'clients',
'objects',
'fragmentation',
'usage',
'defrag',
'keyspace',
'sync',
'commands',
'connections',
'net',
2020-09-21 15:40:17 +02:00
];
$graphs['nginx'] = [
2015-07-13 20:10:26 +02:00
'connections',
'req',
2020-09-21 15:40:17 +02:00
];
$graphs['postfix'] = [
'messages',
'qstats',
'bytes',
'sr',
'deferral',
'rejects',
2020-09-21 15:40:17 +02:00
];
$graphs['powerdns-recursor'] = [
'questions',
'answers',
'cache_performance',
2020-09-21 15:40:17 +02:00
'outqueries',
];
$graphs['pureftpd'] = [
'bitrate',
'connections',
2020-09-21 15:40:17 +02:00
'users',
];
$graphs['rrdcached'] = [
'queue_length',
'events',
'tree',
2020-09-21 15:40:17 +02:00
'journal',
];
$graphs['bind'] = ['queries'];
$graphs['tinydns'] = [
2015-07-13 20:10:26 +02:00
'queries',
'errors',
'dnssec',
'other',
2020-09-21 15:40:17 +02:00
];
$graphs['postgres'] = [
'backends',
'cr',
'rows',
'hr',
'index',
2020-09-21 15:40:17 +02:00
'sequential',
];
$graphs['powerdns'] = [
'latency',
'fail',
'packetcache',
'querycache',
'recursing',
'queries',
'queries_udp',
2020-09-21 15:40:17 +02:00
];
$graphs['ntp-client'] = [
'stats',
'freq',
2020-09-21 15:40:17 +02:00
];
$graphs['ntp-server'] = [
'stats',
'freq',
'stratum',
'buffer',
'bits',
'packets',
'uptime',
2020-09-21 15:40:17 +02:00
];
$graphs['nfs-v3-stats'] = [
'stats',
'io',
'fh',
'rc',
'ra',
'net',
'rpc',
2020-09-21 15:40:17 +02:00
];
$graphs['nfs-server'] = [
'io',
'net_tcp_conns',
'rpc',
2020-09-21 15:40:17 +02:00
];
$graphs['os-updates'] = [
2016-08-07 06:24:34 +03:00
'packages',
2020-09-21 15:40:17 +02:00
];
$graphs['dhcp-stats'] = [
'stats',
'pools_percent',
'pools_current',
'pools_max',
'networks_percent',
'networks_current',
'networks_max',
];
$graphs['fail2ban'] = [
feature: add fail2ban application support (#5924) * add single pool based poller for php-fpm * add the page for php-fpm * add graph for php-fpm * I agree to the conditions of the Contributor Agreement contained in doc/General/Contributing.md. * use named OID as suggest by @laf * document PHP-FPM monitoring * link it in the index * clean up the named oid * add how to grab the script in question * add f2b poller * add f2b app page * add f2b graph * add fail2ban notes * minor formatting cleanup * ...more formatting cleanup * rename it so it can be called via the app page * Revert "rename it so it can be called via the app page" This reverts commit 0bde88a03840138fa28b75606e3cd269ce023f67. * *rename it so it can be called via the apps page *setup the apps page to call it * renamed the graph * now include fail2ban in the apps properly * correct the wget command so it does not stomp on phpfpm-sp * update the fail2ban poller for the newest fail2ban script and now build multiple RRDs * update for now graphing firewalled and banned * update fail2ban docs to match the newest snmpd extend method * search automatically for jails and graph them * graphs the currently banned for a fail2ban jail * change the tital of the graph for the total banned to make it more descriptive * Add a explanation of the two variables in the total graph. * misc. white space cleans ups * misc. white space cleanup * minor white space cleanup * correct descr lenght * correct descr lenght * Update fail2ban.inc.php * Use rrd_name properly * note the cache file bits * make caching optional and note why * Update to new RrdDefinition class * And the use statement ;/ * Messed the second rrd_def * correct two minor errors that did not seem to be causing issues * don't use $vars as per pull #5994 * don't use $vars as per pull #5994 * fix jails graphs * Remove loops and temp variables * whitespace * Change graph so we don't get fractions
2017-02-24 11:50:33 -06:00
'banned',
2020-09-21 15:40:17 +02:00
];
$graphs['freeswitch'] = [
Freeswitch support (#4203) * Added support for freeswitch via unix_agent * Fixed display of graphs on apps overview * Removed tab indents * Fixed not sending port_descr_type (#4188) * Removed / Updated version info to just be LibreNMS (#4193) * Remove requirement for ['enable_printers'] (#4192) * ricoh devices returning garbage as toner level (#4180) * ricoh devices returning garbage as toner level * ricoh toner extra check * more ricoh rules * Fix remote rrdtool_check_rrd_exists() calls (#4196) It was comparing with the full name when rrdcached only printed out the relative name. Thanks mikmak on irc for lots of troubleshooting. * check for no motd line (#4200) Fixes #4199 * Only push the toc down, not the content the toc is on top when the header switches to two lines, so we only need to push that down. * IRC bot - detect lost communication Force reconnect if no data received from server for config['irc_conn_timeout'] seconds (that may happen when network/VPN goes down - in such case IRC bot won't get immediately notification that connection was lost, at least till it tries to send anything). * Update irc.php * Update irc.php * Update irc.php * Update irc.php * fix ifName randomly defined, breaking influxdb updates (#4202) * IRC bot - allow to disable ssl check In PHP 5.6.x stream wrappers verify peer certificates and host names by default when using SSL. That fix allows to turn off that verification with config option $config['irc_disable_ssl_check'] = true; It is useful when you want to use self generated certificate for your own IRC server. * Update irc.php * More more docs (#4197) * Updated docs + some small code changes * Added validating code doc for developers * Doc updates * Updates and improvements * Add ntpd to the list of agentapps (#4194) * Fix deprecated constructors This small change should't prevent easy updates to libraries and fixes the lint check on php7 * Don't allow php7 failures anymore * Fix defunct process issues: create Proc class (#4210) * Proc class Encapsulate processes in a class, when they go out of scope, we can use the __destruct() process to make sure the process terminates. * Fix rrdtool_last checks failing * Don't close rrdtool in rrd_graph Try to start rrdtool process if they haven't been started yet Remove some extra debug output * phpdocs added several cleanups should still be functioning the same Only open one rrdtool process for graph.php * include common.php in definitions.inc.php (#4198) definitions.inc.php makes a call to dbFetchRow, which uses c_echo() It is safe to include common.php here as it only has function definitions. * Use pre-commit.php in for travis-ci tests (#4212)
2016-08-26 12:08:48 +01:00
'peak',
'calls',
'channels',
Freeswitch support (#4203) * Added support for freeswitch via unix_agent * Fixed display of graphs on apps overview * Removed tab indents * Fixed not sending port_descr_type (#4188) * Removed / Updated version info to just be LibreNMS (#4193) * Remove requirement for ['enable_printers'] (#4192) * ricoh devices returning garbage as toner level (#4180) * ricoh devices returning garbage as toner level * ricoh toner extra check * more ricoh rules * Fix remote rrdtool_check_rrd_exists() calls (#4196) It was comparing with the full name when rrdcached only printed out the relative name. Thanks mikmak on irc for lots of troubleshooting. * check for no motd line (#4200) Fixes #4199 * Only push the toc down, not the content the toc is on top when the header switches to two lines, so we only need to push that down. * IRC bot - detect lost communication Force reconnect if no data received from server for config['irc_conn_timeout'] seconds (that may happen when network/VPN goes down - in such case IRC bot won't get immediately notification that connection was lost, at least till it tries to send anything). * Update irc.php * Update irc.php * Update irc.php * Update irc.php * fix ifName randomly defined, breaking influxdb updates (#4202) * IRC bot - allow to disable ssl check In PHP 5.6.x stream wrappers verify peer certificates and host names by default when using SSL. That fix allows to turn off that verification with config option $config['irc_disable_ssl_check'] = true; It is useful when you want to use self generated certificate for your own IRC server. * Update irc.php * More more docs (#4197) * Updated docs + some small code changes * Added validating code doc for developers * Doc updates * Updates and improvements * Add ntpd to the list of agentapps (#4194) * Fix deprecated constructors This small change should't prevent easy updates to libraries and fixes the lint check on php7 * Don't allow php7 failures anymore * Fix defunct process issues: create Proc class (#4210) * Proc class Encapsulate processes in a class, when they go out of scope, we can use the __destruct() process to make sure the process terminates. * Fix rrdtool_last checks failing * Don't close rrdtool in rrd_graph Try to start rrdtool process if they haven't been started yet Remove some extra debug output * phpdocs added several cleanups should still be functioning the same Only open one rrdtool process for graph.php * include common.php in definitions.inc.php (#4198) definitions.inc.php makes a call to dbFetchRow, which uses c_echo() It is safe to include common.php here as it only has function definitions. * Use pre-commit.php in for travis-ci tests (#4212)
2016-08-26 12:08:48 +01:00
'callsIn',
'callsOut',
2020-09-21 15:40:17 +02:00
];
$graphs['ups-nut'] = [
'remaining',
'load',
'voltage_battery',
'charge',
'voltage_input',
2020-09-21 15:40:17 +02:00
];
$graphs['ups-apcups'] = [
2016-09-24 23:49:35 +03:00
'remaining',
'load',
'voltage_battery',
'charge',
'voltage_input',
2020-09-21 15:40:17 +02:00
];
$graphs['gpsd'] = [
2016-10-08 15:25:50 -05:00
'satellites',
'dop',
'mode',
2020-09-21 15:40:17 +02:00
];
$graphs['exim-stats'] = [
'frozen',
2020-09-21 15:40:17 +02:00
'queue',
];
$graphs['php-fpm'] = [
'stats',
];
$graphs['nvidia'] = [
'sm',
'mem',
'enc',
'dec',
'rxpci',
'txpci',
'fb',
'bar1',
'mclk',
'pclk',
'pwr',
'temp',
'pviol',
'tviol',
'sbecc',
'dbecc',
2020-09-21 15:40:17 +02:00
];
$graphs['seafile'] = [
'connected',
'enabled',
'libraries',
'trashed_libraries',
'size_consumption',
'groups',
'version',
'platform',
2020-09-21 15:40:17 +02:00
];
$graphs['squid'] = [
'memory',
'clients',
'cpuusage',
'objcount',
'filedescr',
'httpbw',
'http',
'server',
'serverbw',
'reqhit',
'bytehit',
'sysnumread',
'pagefaults',
'cputime',
2020-09-21 15:40:17 +02:00
];
$graphs['opengridscheduler'] = [
'ogs',
];
$graphs['fbsd-nfs-server'] = [
'stats',
'cache',
'gathering',
2020-09-21 15:40:17 +02:00
];
$graphs['fbsd-nfs-client'] = [
'stats',
'cache',
'rpc',
2020-09-21 15:40:17 +02:00
];
$graphs['unbound'] = [
2017-03-11 07:09:51 -06:00
'queries',
'cache',
'operations',
2020-09-21 15:40:17 +02:00
];
$graphs['bind'] = [
'incoming',
'outgoing',
'rr_positive',
'rr_negative',
'rtt',
'resolver_failure',
'resolver_qrs',
'resolver_naf',
'server_received',
'server_results',
'server_issues',
'cache_hm',
'adb_in',
'sockets_active',
'sockets_errors',
2020-09-21 15:40:17 +02:00
];
$graphs['smart'] = [
'id5',
'id9',
'id10',
'id173',
'id183',
'id184',
'id187',
'id188',
'id190',
'id194',
'id196',
'id197',
'id198',
'id199',
'id231',
'id233',
2020-09-21 15:40:17 +02:00
];
$graphs['certificate'] = [
'age',
'remaining_days',
2020-09-21 15:40:17 +02:00
];
$graphs['puppet-agent'] = [
'last_run',
'changes',
'events',
'resources',
'time',
2020-09-21 15:40:17 +02:00
];
$graphs['mdadm'] = [
'level',
'size',
'disc_count',
'hotspare_count',
'degraded',
'sync_speed',
'sync_completed',
2020-09-21 15:40:17 +02:00
];
$graphs['sdfsinfo'] = [
'volume',
'blocks',
'rates',
2020-09-21 15:40:17 +02:00
];
$graphs['pi-hole'] = [
'query_types',
'destinations',
'query_results',
'block_percent',
'blocklist',
2020-09-21 15:40:17 +02:00
];
$graphs['freeradius'] = [
feature: FreeRADIUS application monitoring (#7818) * Update unbound.inc.php * Update unbound.inc.php * Create unbound_cache.inc.php * Update AUTHORS.md * Update apps.inc.php * Update bind.inc.php * Update bind.inc.php * Update bind.inc.php * Update bind.inc.php * Update tiles.php * Update Applications.md * Update Applications.md * Update Applications.md * Update Applications.md * Update Applications.md * Update Applications.md * Update apps.inc.php * Create freeradius_access.inc.php * Update functions.inc.php * Create freeradius_auth.inc.php * Create freeradius_accounting.inc.php * Create freeradius_proxy_access.inc.php * Create freeradius_proxy_auth.inc.php * Create freeradius_proxy_acct.inc.php * Create freeradius_queue.inc.php * Update and rename freeradius_accounting.inc.php to freeradius_acct.inc.php * Update apps.inc.php * Create freeradius.inc.php * Create freeradius.inc.php * Update freeradius.inc.php * Update freeradius.inc.php * Update freeradius.inc.php * Update freeradius.inc.php * Update freeradius.inc.php * Update Applications.md * Update Applications.md * Update freeradius_access.inc.php * Update freeradius_acct.inc.php * Update freeradius_access.inc.php * Update freeradius_auth.inc.php * Update freeradius_access.inc.php * Update freeradius_acct.inc.php * Update freeradius_proxy_access.inc.php * Update freeradius_proxy_acct.inc.php * Update freeradius_proxy_auth.inc.php * Update freeradius_queue.inc.php * Update freeradius_queue.inc.php * Update freeradius.inc.php * Update freeradius.inc.php * Update freeradius.inc.php * Update freeradius_acct.inc.php * Update freeradius_acct.inc.php * Update freeradius_access.inc.php * Update freeradius_access.inc.php * Update freeradius_auth.inc.php * Update freeradius_proxy_access.inc.php * Update freeradius_proxy_acct.inc.php * Update freeradius_proxy_auth.inc.php * Update freeradius_queue.inc.php
2017-12-13 16:13:24 +13:00
'access',
'auth',
'acct',
'proxy_access',
'proxy_auth',
'proxy_acct',
'queue',
2020-09-21 15:40:17 +02:00
];
$graphs['zfs'] = [
'arc_misc',
'arc_size',
'arc_size_per',
'arc_size_breakdown',
'arc_efficiency',
'arc_cache_hits_by_list',
'arc_cache_hits_by_type',
'arc_cache_misses_by_type',
'arc_cache_hits',
'arc_cache_miss',
2020-09-21 15:40:17 +02:00
];
$graphs['powerdns-dnsdist'] = [
'cache',
'downstream',
'dynamic_blocks',
'latency',
'queries_latency',
'queries_stats',
'rules_stats',
'queries_drop',
2020-09-21 15:40:17 +02:00
];
$graphs['asterisk'] = [
'calls',
'channels',
'sip',
'iax2',
2020-09-21 15:40:17 +02:00
];
$graphs['mailcow-postfix'] = [
'emails',
'traffic',
'domains',
2020-09-21 15:40:17 +02:00
];
$graphs['backupninja'] = [
'backupninja',
2020-09-21 15:40:17 +02:00
];
$graphs['icecast'] = [
'cpuload',
'memoryusage',
2020-09-21 15:40:17 +02:00
'openfiles',
];
$graphs['opensips'] = [
'load',
'memory',
'openfiles',
2020-09-21 15:40:17 +02:00
];
$graphs['voip-monitor'] = [
'cpuload',
'memoryusage',
2020-09-21 15:40:17 +02:00
'openfiles',
];
echo '<div class="panel panel-default">';
echo '<div class="panel-heading">';
2015-07-13 20:10:26 +02:00
echo "<span style='font-weight: bold;'>Apps</span> &#187; ";
unset($sep);
2020-09-21 15:40:17 +02:00
$link_array = [
2015-07-13 20:10:26 +02:00
'page' => 'device',
'device' => $device['device_id'],
'tab' => 'apps',
2020-09-21 15:40:17 +02:00
];
2020-05-20 02:21:02 +02:00
$apps = \LibreNMS\Util\ObjectCache::applications()->flatten();
foreach ($apps as $app) {
2020-05-20 02:21:02 +02:00
$app_state = \LibreNMS\Util\Html::appStateIcon($app->app_state);
2020-09-21 15:40:17 +02:00
if (! empty($app_state['icon'])) {
2020-09-21 15:59:34 +02:00
$app_state_info = '<font color="' . $app_state['color'] . '"><i title="' . $app_state['hover_text'] . '" class="fa ' . $app_state['icon'] . ' fa-fw fa-lg" aria-hidden="true"></i></font>';
2020-05-20 02:21:02 +02:00
} else {
$app_state_info = '';
}
2015-07-13 20:10:26 +02:00
echo $sep;
if ($vars['app'] == $app->app_type) {
2015-07-13 20:10:26 +02:00
echo "<span class='pagemenu-selected'>";
}
2020-05-20 02:21:02 +02:00
echo $app_state_info;
2020-09-21 15:40:17 +02:00
echo generate_link($app->displayName(), ['page' => 'apps', 'app' => $app->app_type]);
if ($vars['app'] == $app->app_type) {
2015-07-13 20:10:26 +02:00
echo '</span>';
}
$sep = ' | ';
}
echo '</div>';
echo '<div class="panel-body">';
if (isset($vars['app'])) {
$app = basename($vars['app']);
if (is_file("includes/html/pages/apps/$app.inc.php")) {
include "includes/html/pages/apps/$app.inc.php";
} else {
include 'includes/html/pages/apps/default.inc.php';
2015-07-13 20:10:26 +02:00
}
} else {
include 'includes/html/pages/apps/overview.inc.php';
}
echo '</div>';