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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

517 lines
8.4 KiB
PHP
Raw Normal View History

<?php
2020-09-21 15:40:17 +02:00
$pagetitle[] = 'Apps';
$graphs['apache'] = [
'bits',
'hits',
'scoreboard',
'cpu',
];
$graphs['drbd'] = [
'disk_bits',
'network_bits',
'queue',
'unsynced',
];
$graphs['entropy'] = [
'entropy',
];
$graphs['mysql'] = [
'network_traffic',
'connections',
'command_counters',
'select_types',
];
$graphs['memcached'] = [
'bits',
'commands',
'data',
'items',
2015-01-10 07:43:25 +00:00
];
$graphs['redis'] = [
'clients',
'objects',
'fragmentation',
'usage',
'defrag',
'keyspace',
'sync',
'commands',
'connections',
'net',
];
2015-01-10 07:43:25 +00:00
$graphs['nginx'] = [
'connections',
'req',
2015-07-13 20:10:26 +02:00
];
$graphs['postfix'] = [
'messages',
'qstats',
'bytes',
'sr',
'deferral',
'rejects',
];
$graphs['powerdns-recursor'] = [
'questions',
'answers',
'cache_performance',
'outqueries',
];
$graphs['powermon'] = [
'consumption',
];
$graphs['pureftpd'] = [
'bitrate',
'connections',
'users',
];
$graphs['rrdcached'] = [
'queue_length',
'events',
'tree',
'journal',
];
$graphs['bind'] = ['queries'];
2015-01-17 19:32:55 +00:00
$graphs['tinydns'] = [
'queries',
'errors',
'dnssec',
'other',
];
$graphs['postgres'] = [
'backends',
'cr',
'rows',
'hr',
'index',
'sequential',
];
$graphs['powerdns'] = [
'latency',
'fail',
'packetcache',
'querycache',
'recursing',
'queries',
'queries_udp',
];
add Sneck support, making it very trivial to use Nagios style checks in a NRPE like manner (#13954) * code stuff done for Sneck * whoops, correct the abs value post adding it post rrd update * return a array for getting the sneck data and nicely print the raw return value * add test stuff and freeze time at 1650911765 for tests * move the freezeTime * add use Illuminate\Support\Carbon; * more test changes * rework freezeTime a bit more * more test stuff * another test * rework it a bit again * correct variable spelling for $time_diff * remove freezeTime as we are using a old version of Laravel * finalize graphs * misc * finalize sneck page * mve the sneck tests as it needs a newer version of laravel than we are using * add documents for sneck * finalize the poller * formatting cleanup * correct comment type * correct the spelling of description * more documentation * save the check returns as metrics * add some more examples * fix some of the sneck alerts and add a few more examples * turn off time to polling by default * suggest using ntp if enabled * since we are zeroing time_to_polling by default, this now works * backout some suggested changes for once we change to larval 9 * remove del_sneck_data as it is no longer used * add more docs on the metrics * php-cs-fixer to fix a few things * update and fix sneck tests * remote a metric from the test * another minor tweak to the test * one more minor change * ahh! derp! think I found it finally... hopefully hanging this for the last time... * now use app data * now logs check changes * add a missing ) * add a missing ) * some style fixes * update the sneck page use to the app data stuff * update the poller to use the new app data * misc * update sneck to log check status changes * correct alert log messages * correct a comment * fix metrics * derp, another fix * test fix * re-order to avoid warning * poller update * update sneck graphs * update sneck graphs * remove a unneeded line * test update for discovery * minor tweaks to the test and fix update the polling a bit * style fix * fix return data printing * fix the test data to include app data * attempted test fix * add config def to apps.sneck.polling_time_diff * cleanup docs a bit * minor config tweaks * minor doc cleanup
2023-06-15 09:06:28 -05:00
$graphs['sneck'] = [
'results',
'time',
];
$graphs['ntp-client'] = [
'stats',
'freq',
];
$graphs['ntp-server'] = [
'stats',
'freq',
'stratum',
'buffer',
'bits',
'packets',
'uptime',
];
$graphs['nfs-v3-stats'] = [
'stats',
'io',
'fh',
'rc',
'ra',
'net',
'rpc',
2016-08-06 19:55:40 +03:00
];
$graphs['nfs-server'] = [
'io',
'net_tcp_conns',
'rpc',
];
2016-08-07 06:24:34 +03:00
$graphs['os-updates'] = [
'packages',
];
add Opensearch\Elasticsearch monitoring (#14053) * add new poller * add a missing ; * formatting cleanup * graph stuff and metrics move * add rrd name * clean up metrics/rrd def * more metric/rrd def cleanup * cleanup * add basic opensearch graphs * add opensearch to apps.inc.php * begin work on opensearch app page * formatting cleanup * add translog graphs * add a missing graph * fix pending tasks * add the ability to fetch the saved cluster name * add fetching the cluster name * correct the opensearch comment * add combined shard stats * add indexing graphs * correct graph name * correct some units as being per second * add more graphs * add more items for graph sets * cleanup of units and naming... also more graphs * more graph stuff * change the RRD def again and define a few more graphs * finish basic graph sets * more graph stuff * another rrd def change * add more graphs * add some more graph sets * correct unit for c_task_max_in_time * more graph stuff * more graph stuff * correct the unit * add missing tw_time and another rrd def change * another unit change * add trc graphs * more graph stuff * add tseg graphs * add all shards graph to both cluster items * more graph stuff * update opensearch app page * add Opensearch\Elasticsearch app * add opensearch tests * run php-cs-fixer on two files * add alert examples for checking cluster status * remove an item that was accidentally added as a metric in the test but is not * derp! thanks jellyfrog * make it come up as Elisticsearch\Opensearch in the webui * no longer use components, but app_data, for cluster name change * update the web side for opensearch for using app_data * style fix * update opensearch for new app data stuff * update to the new Application model * update poller and device app page for ES/OS * style cleanup * update graphs * test fix * more test cleanup * Update alert_rules.json * begin work on breaking out the RRDs * update all non-multi rrd graphs for opensearch * update time_all * add a unass shards graph * correct rrd name * should all be good now * add missing tm stats * Un Assigned -> Unassigned * style cleanup * another style fix * remove cluster_name from saved metrics as it is not a metric Co-authored-by: Tony Murray <murraytony@gmail.com> Co-authored-by: Jellyfrog <Jellyfrog@users.noreply.github.com>
2022-08-15 14:44:20 -05:00
$graphs['opensearch'] = [
'status',
'c_nodes',
'c_data_nodes',
'c_pending_tasks',
'c_in_fl_fetch',
'c_task_max_in_time',
'c_act_shards_perc',
'mem_all',
'time_all',
];
2016-08-07 06:24:34 +03:00
$graphs['dhcp-stats'] = [
'stats',
2020-05-22 23:02:19 +02:00
'pools_percent',
'pools_current',
'pools_max',
'networks_percent',
'networks_current',
'networks_max',
2016-08-07 06:24:34 +03:00
];
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
$graphs['fail2ban'] = [
'banned',
];
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
$graphs['freeswitch'] = [
'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',
];
$graphs['ups-nut'] = [
'remaining',
'load',
'voltage_battery',
'charge',
'voltage_input',
];
2016-09-24 23:49:35 +03:00
$graphs['ups-apcups'] = [
'remaining',
'load',
'voltage_battery',
'charge',
'voltage_input',
];
2016-10-08 15:25:50 -05:00
$graphs['gpsd'] = [
'satellites',
'dop',
'mode',
];
$graphs['exim-stats'] = [
'frozen',
'queue',
];
$graphs['php-fpm'] = [
'stats',
];
$graphs['nvidia'] = [
'sm',
'mem',
'enc',
'dec',
'rxpci',
'txpci',
'fb',
'bar1',
'mclk',
'pclk',
'pwr',
'temp',
'pviol',
'tviol',
'sbecc',
'dbecc',
];
$graphs['seafile'] = [
'connected',
'enabled',
'libraries',
'trashed_libraries',
'size_consumption',
'groups',
'version',
'platform',
];
$graphs['squid'] = [
'memory',
'clients',
'cpuusage',
'objcount',
'filedescr',
'httpbw',
'http',
'server',
'serverbw',
'reqhit',
'bytehit',
'sysnumread',
'pagefaults',
'cputime',
];
$graphs['opengridscheduler'] = [
'ogs',
];
$graphs['fbsd-nfs-server'] = [
'stats',
'cache',
'gathering',
];
$graphs['fbsd-nfs-client'] = [
'stats',
'cache',
'rpc',
];
2017-03-11 07:09:51 -06:00
$graphs['unbound'] = [
'queries',
'cache',
'operations',
2017-03-11 07:09:51 -06: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',
];
$graphs['smart'] = [
'id5',
'id9',
'id10',
'id173',
'id183',
'id184',
'id187',
'id188',
'id190',
'id194',
'id196',
'id197',
'id198',
'id199',
'id231',
'id233',
];
$graphs['certificate'] = [
'age',
'remaining_days',
];
$graphs['puppet-agent'] = [
'last_run',
'changes',
'events',
'resources',
'time',
];
$graphs['mdadm'] = [
'level',
'size',
'disc_count',
'hotspare_count',
'degraded',
'sync_speed',
'sync_completed',
];
$graphs['sdfsinfo'] = [
'volume',
'blocks',
'rates',
];
$graphs['pi-hole'] = [
'query_types',
'destinations',
'query_results',
'block_percent',
'blocklist',
];
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
$graphs['freeradius'] = [
'access',
'auth',
'acct',
'proxy_access',
'proxy_auth',
'proxy_acct',
'queue',
];
$graphs['suricata'] = [
'alert',
'packets',
'nasty_delta',
'nasty_percent',
'dec_proto',
'flow_proto',
'app_flows',
'app_tx',
'bytes',
'mem_use',
];
$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',
];
$graphs['powerdns-dnsdist'] = [
'cache',
'downstream',
'dynamic_blocks',
'latency',
'queries_latency',
'queries_stats',
'rules_stats',
'queries_drop',
];
$graphs['asterisk'] = [
'calls',
'channels',
'sip',
'iax2',
];
$graphs['mailcow-postfix'] = [
'emails',
'traffic',
'domains',
];
$graphs['backupninja'] = [
'backupninja',
];
$graphs['icecast'] = [
'cpuload',
'memoryusage',
'openfiles',
];
$graphs['opensips'] = [
'load',
'memory',
'openfiles',
];
$graphs['voip-monitor'] = [
'cpuload',
'memoryusage',
'openfiles',
];
$graphs['docker'] = [
'cpu_usage',
'pids',
'mem_limit',
'mem_used',
'mem_perc',
];
2022-01-13 18:19:27 +01:00
$graphs['supervisord'] = [
'totals',
'uptime',
];
$graphs['chronyd'] = [
'time',
'frequency',
'root',
];
$graphs['cape'] = [
'status',
'pending',
'run_stats',
'lines',
'malscore_stats',
'pkg_tasks_all',
];
$graphs['sagan'] = [
'after',
'bytes_ignored',
'bytes',
'drop_percent',
'drop',
'eps',
'f_drop_percent',
'f_dropped',
'f_total',
'ignore',
'match',
'max_bytes_log_line',
'threshold',
'total',
'uptime',
'alert',
];
$graphs['hv-monitor'] = [
'status',
'memory',
'pmem',
'time',
'pcpu',
'flt',
'csw',
'cow',
'etimes',
'snaps',
'snaps_size',
];
$graphs['pwrstatd'] = [
'wattage',
'voltage',
'percentage',
'minutes',
];
2022-10-30 12:18:02 -07:00
$graphs['systemd'] = [
'sub',
'active',
'load',
];
$graphs['wireguard'] = [
'traffic',
'time',
];
$graphs['linux_config_files'] = [
'number_of_confs',
];
$graphs['linux_softnet_stat'] = [
'packets',
'time_squeeze',
'backlog_length',
'packet_dropped',
'cpu_collision',
'flow_limit',
'received_rps',
'budget',
];
echo '<div class="panel panel-default">';
echo '<div class="panel-heading">';
echo "<span style='font-weight: bold;'>Apps</span> &#187; ";
unset($sep);
$link_array = [
'page' => 'device',
'device' => $device['device_id'],
'tab' => 'apps',
];
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);
if (! empty($app_state['icon'])) {
$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>';
} else {
$app_state_info = '';
}
echo $sep;
if ($vars['app'] == $app->app_type) {
echo "<span class='pagemenu-selected'>";
}
2020-05-20 02:21:02 +02:00
echo $app_state_info;
echo generate_link($app->displayName(), ['page' => 'apps', 'app' => $app->app_type]);
if ($vars['app'] == $app->app_type) {
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>';