From 071ca9bc2a00ab2d53ac20db4328a17ddc556478 Mon Sep 17 00:00:00 2001 From: Jellyfrog Date: Fri, 5 Jan 2024 05:39:12 +0100 Subject: [PATCH] Apply fixes from StyleCI (#15698) Co-authored-by: StyleCI Bot --- LibreNMS/Alert/AlertRules.php | 2 +- LibreNMS/Alert/Transport.php | 8 +- LibreNMS/Alert/Transport/Clickatell.php | 10 +- LibreNMS/Alert/Transport/Gitlab.php | 2 +- LibreNMS/Alert/Transport/Hue.php | 8 +- LibreNMS/Alert/Transport/Irc.php | 2 +- LibreNMS/Alert/Transport/Mail.php | 6 +- LibreNMS/Alert/Transport/Pagerduty.php | 18 +- LibreNMS/Alert/Transport/Playsms.php | 6 +- LibreNMS/Alert/Transport/Pushover.php | 12 +- LibreNMS/Alert/Transport/Smseagle.php | 8 +- LibreNMS/Alert/Transport/Smsfeedback.php | 6 +- LibreNMS/Alert/Transport/Twilio.php | 4 +- LibreNMS/Alert/Transport/Ukfastpss.php | 2 +- .../LdapAuthorizationAuthorizer.php | 4 +- LibreNMS/Authentication/SSOAuthorizer.php | 2 + LibreNMS/Exceptions/ApiException.php | 2 +- LibreNMS/IRCBot.php | 26 +- LibreNMS/Modules/Isis.php | 1 + LibreNMS/Modules/PrinterSupplies.php | 6 +- LibreNMS/OS/Allied.php | 6 +- LibreNMS/OS/Ciscowlc.php | 2 +- LibreNMS/OS/Comware.php | 2 +- LibreNMS/OS/Riverbed.php | 6 +- LibreNMS/OS/Traits/YamlMempoolsDiscovery.php | 2 +- LibreNMS/Polling/ConnectivityHelper.php | 2 +- LibreNMS/RRDRecursiveFilterIterator.php | 1 + LibreNMS/Util/Rewrite.php | 420 +++++++++--------- LibreNMS/Util/Stats.php | 92 ++-- app/ApiClients/NominatimApi.php | 2 +- app/Console/Commands/DeviceAdd.php | 8 +- app/Http/Controllers/AboutController.php | 30 +- .../Controllers/Ajax/BgpSearchController.php | 14 +- .../Controllers/Ajax/PortSearchController.php | 10 +- .../Controllers/Auth/SocialiteController.php | 2 +- .../Maps/DeviceDependencyController.php | 6 +- .../Controllers/Table/CustomersController.php | 20 +- .../Controllers/Table/EditPortsController.php | 20 +- .../Controllers/Table/GraylogController.php | 14 +- .../Controllers/Table/InventoryController.php | 2 +- .../Controllers/Table/MempoolsController.php | 16 +- .../Controllers/Widgets/NotesController.php | 4 +- app/Models/Device.php | 1 + app/Models/Eventlog.php | 2 +- app/Models/PortGroup.php | 1 + app/Models/Sensor.php | 58 +-- app/Plugins/Hooks/DeviceOverviewHook.php | 2 +- app/Plugins/Hooks/PortTabHook.php | 2 +- billing-calculate.php | 84 ++-- config/database.php | 4 +- config/debugbar.php | 54 +-- config/purifier.php | 32 +- database/factories/DeviceGroupFactory.php | 2 +- html/bandwidth-graph.php | 10 +- html/billing-graph.php | 8 +- includes/caches/alerts.inc.php | 2 +- includes/caches/devices.inc.php | 10 +- includes/caches/notifications.inc.php | 10 +- includes/caches/ports.inc.php | 12 +- includes/caches/services.inc.php | 10 +- includes/caches/toner.inc.php | 2 +- includes/common.php | 5 +- includes/discovery/arp-table.inc.php | 6 +- includes/discovery/cisco-cbqos.inc.php | 2 +- includes/discovery/cisco-otv.inc.php | 2 +- includes/discovery/cisco-pw.inc.php | 16 +- includes/discovery/cisco-qfp.inc.php | 2 +- .../discovery/entity-physical/axos.inc.php | 22 +- .../entity-physical/ciena-sds.inc.php | 156 +++---- .../discovery/entity-physical/cimc.inc.php | 10 +- .../entity-physical/eltex-mes23xx.inc.php | 20 +- .../entity-physical/entity-physical.inc.php | 34 +- .../entity-physical/eurostor.inc.php | 44 +- .../discovery/entity-physical/linux.inc.php | 64 +-- .../discovery/entity-physical/mrv-od.inc.php | 248 +++++------ .../entity-physical/tait-infra93.inc.php | 134 +++--- includes/discovery/functions.inc.php | 70 +-- includes/discovery/hr-device.inc.php | 4 +- includes/discovery/ntp/awplus.inc.php | 2 +- includes/discovery/ntp/cisco.inc.php | 2 +- includes/discovery/ports/cnmatrix.inc.php | 2 +- .../sensors/cisco-entity-sensor.inc.php | 2 +- .../sensors/count/dhcpatriot.inc.php | 20 +- .../discovery/sensors/current/tpdin.inc.php | 24 +- .../discovery/sensors/entity-sensor.inc.php | 16 +- .../discovery/sensors/humidity/pcoweb.inc.php | 30 +- includes/discovery/sensors/load/apc.inc.php | 12 +- .../sensors/pre-cache/ifotec.inc.php | 14 +- .../sensors/rittal-cmc-iii-sensors.inc.php | 12 +- includes/discovery/sensors/state/ctm.inc.php | 40 +- .../sensors/state/dhcpatriot.inc.php | 20 +- .../sensors/temperature/pcoweb.inc.php | 108 ++--- .../sensors/temperature/tpdin.inc.php | 12 +- .../discovery/sensors/voltage/tpdin.inc.php | 24 +- includes/discovery/services.inc.php | 8 +- includes/discovery/vlans.inc.php | 4 +- includes/functions.php | 32 +- includes/html/api_functions.inc.php | 10 +- includes/html/collectd/config.php | 36 +- includes/html/collectd/definitions.local.php | 2 +- includes/html/collectd/definitions.php | 118 ++--- includes/html/forms/alert-details.inc.php | 4 +- includes/html/forms/alert-notes.inc.php | 4 +- includes/html/forms/alert-rules.inc.php | 18 +- includes/html/forms/alert-transports.inc.php | 4 +- includes/html/forms/component.inc.php | 6 +- includes/html/forms/create-alert-item.inc.php | 8 +- includes/html/forms/create-service.inc.php | 8 +- includes/html/forms/customoid.inc.php | 56 +-- .../html/forms/delete-alert-transport.inc.php | 2 +- .../html/forms/delete-cluster-poller.inc.php | 4 +- includes/html/forms/delete-customoid.inc.php | 2 +- includes/html/forms/delete-poller.inc.php | 4 +- includes/html/forms/delete-service.inc.php | 8 +- .../html/forms/delete-transport-group.inc.php | 2 +- includes/html/forms/mempool-update.inc.php | 10 +- includes/html/forms/notifications.inc.php | 10 +- includes/html/forms/override-config.inc.php | 6 +- includes/html/forms/parse-alert-rule.inc.php | 16 +- .../html/forms/parse-alert-template.inc.php | 18 +- includes/html/forms/parse-customoid.inc.php | 28 +- .../html/forms/parse-poller-groups.inc.php | 2 +- includes/html/forms/parse-service.inc.php | 14 +- includes/html/forms/processor-update.inc.php | 10 +- includes/html/forms/rediscover-device.inc.php | 4 +- .../html/forms/refresh-oxidized-node.inc.php | 2 +- .../forms/reload-oxidized-nodes-list.inc.php | 2 +- includes/html/forms/reset-port-state.inc.php | 4 +- includes/html/forms/routing-update.inc.php | 10 +- .../html/forms/schedule-maintenance.inc.php | 4 +- .../html/forms/sensor-alert-reset.inc.php | 6 +- .../html/forms/sensor-alert-update.inc.php | 6 +- includes/html/forms/sensor-update.inc.php | 6 +- includes/html/forms/storage-update.inc.php | 10 +- includes/html/forms/transport-groups.inc.php | 4 +- includes/html/forms/update-ifalias.inc.php | 4 +- includes/html/forms/update-ifspeed.inc.php | 2 +- includes/html/forms/update-port-notes.inc.php | 8 +- includes/html/forms/update-ports.inc.php | 6 +- .../application/apache_scoreboard.inc.php | 38 +- .../graphs/application/asterisk_iax2.inc.php | 2 +- .../graphs/application/asterisk_sip.inc.php | 8 +- .../backupninja_backupninja.inc.php | 10 +- .../graphs/application/bind_adb_in.inc.php | 8 +- .../graphs/application/bind_adb_size.inc.php | 8 +- .../application/bind_cache_deleted.inc.php | 8 +- .../application/bind_cache_heap.inc.php | 12 +- .../graphs/application/bind_cache_hm.inc.php | 16 +- .../application/bind_cache_tree.inc.php | 12 +- .../application/bind_resolver_failure.inc.php | 36 +- .../application/bind_resolver_naf.inc.php | 16 +- .../application/bind_resolver_qrs.inc.php | 16 +- .../html/graphs/application/bind_rtt.inc.php | 24 +- .../application/bind_server_issues.inc.php | 20 +- .../application/bind_server_received.inc.php | 32 +- .../application/bind_server_results.inc.php | 32 +- .../application/bind_sockets_accepted.inc.php | 8 +- .../application/bind_sockets_active.inc.php | 16 +- .../application/bind_sockets_bf.inc.php | 16 +- .../application/bind_sockets_cf.inc.php | 16 +- .../application/bind_sockets_closed.inc.php | 16 +- .../application/bind_sockets_errors.inc.php | 32 +- .../bind_sockets_established.inc.php | 16 +- .../application/bind_sockets_opened.inc.php | 20 +- .../application/cape_anti_issues.inc.php | 28 +- .../application/cape_anti_issues_pkg.inc.php | 4 +- .../graphs/application/cape_api_calls.inc.php | 28 +- .../application/cape_api_calls_pkg.inc.php | 4 +- .../application/cape_crash_issues.inc.php | 28 +- .../application/cape_crash_issues_pkg.inc.php | 4 +- .../graphs/application/cape_domains.inc.php | 28 +- .../application/cape_domains_pkg.inc.php | 4 +- .../application/cape_dropped_files.inc.php | 28 +- .../cape_dropped_files_pkg.inc.php | 4 +- .../application/cape_files_written.inc.php | 28 +- .../cape_files_written_pkg.inc.php | 4 +- .../graphs/application/cape_lines.inc.php | 20 +- .../graphs/application/cape_malscore.inc.php | 28 +- .../graphs/application/cape_pkg_stats.inc.php | 40 +- .../application/cape_pkg_tasks_all.inc.php | 4 +- .../cape_registry_keys_modified.inc.php | 28 +- .../cape_registry_keys_modified_pkg.inc.php | 4 +- .../graphs/application/cape_run_stats.inc.php | 40 +- .../cape_running_processes.inc.php | 28 +- .../cape_running_processes_pkg.inc.php | 4 +- .../application/cape_signatures_alert.inc.php | 28 +- .../cape_signatures_alert_pkg.inc.php | 4 +- .../application/cape_signatures_total.inc.php | 28 +- .../cape_signatures_total_pkg.inc.php | 4 +- .../graphs/application/cape_status.inc.php | 36 +- .../application/certificate-common.inc.php | 4 +- .../application/chronyd_frequency.inc.php | 6 +- .../graphs/application/chronyd_root.inc.php | 4 +- .../chronyd_source_frequency.inc.php | 4 +- .../chronyd_source_polling.inc.php | 10 +- .../chronyd_source_sampling.inc.php | 10 +- .../application/chronyd_stratum.inc.php | 2 +- .../graphs/application/chronyd_time.inc.php | 6 +- .../dhcp-stats_networks_current.inc.php | 4 +- .../dhcp-stats_networks_max.inc.php | 4 +- .../dhcp-stats_networks_percent.inc.php | 4 +- .../dhcp-stats_pools_current.inc.php | 4 +- .../application/dhcp-stats_pools_max.inc.php | 4 +- .../dhcp-stats_pools_percent.inc.php | 4 +- .../graphs/application/docker-common.inc.php | 4 +- .../application/fbsd-nfs-client_cache.inc.php | 96 ++-- .../application/fbsd-nfs-client_rpc.inc.php | 30 +- .../application/fbsd-nfs-client_stats.inc.php | 126 +++--- .../application/fbsd-nfs-server_cache.inc.php | 24 +- .../fbsd-nfs-server_gathering.inc.php | 18 +- .../application/fbsd-nfs-server_stats.inc.php | 126 +++--- .../application/freeradius_access.inc.php | 2 +- .../freeradius_proxy_access.inc.php | 2 +- .../application/freeswitch_callsIn.inc.php | 6 +- .../application/freeswitch_callsOut.inc.php | 6 +- .../graphs/application/hv-monitor_csw.inc.php | 8 +- .../hv-monitor_disk-rw-blocks.inc.php | 10 +- .../hv-monitor_disk-rw-bytes.inc.php | 10 +- .../hv-monitor_disk-rw-reqs.inc.php | 10 +- .../hv-monitor_disk-rw-time.inc.php | 10 +- .../application/hv-monitor_disk-size.inc.php | 12 +- .../application/hv-monitor_disk-size2.inc.php | 12 +- .../graphs/application/hv-monitor_flt.inc.php | 8 +- .../application/hv-monitor_memory.inc.php | 8 +- .../application/hv-monitor_net-bytes.inc.php | 10 +- .../application/hv-monitor_net-drops.inc.php | 10 +- .../application/hv-monitor_net-errs.inc.php | 10 +- .../application/hv-monitor_net-pkts.inc.php | 10 +- .../application/hv-monitor_pmem.inc.php | 4 +- .../application/hv-monitor_status-int.inc.php | 4 +- .../application/hv-monitor_status.inc.php | 40 +- .../application/hv-monitor_time.inc.php | 8 +- ...linux_config_files_number_of_confs.inc.php | 12 +- .../linux_softnet_stat_budget.inc.php | 8 +- .../logsize_combined_stats.inc.php | 20 +- .../application/logsize_log_sizes.inc.php | 4 +- .../application/logsize_set_sizes.inc.php | 4 +- .../application/mailscanner_reject.inc.php | 4 +- .../application/mailscanner_spam.inc.php | 6 +- .../graphs/application/mdadm-common.inc.php | 4 +- .../graphs/application/memcached_data.inc.php | 8 +- .../application/memcached_hitmiss.inc.php | 6 +- .../application/memcached_items.inc.php | 2 +- .../mojo_cape_submit-size_stats.inc.php | 20 +- .../mojo_cape_submit-subs_top12.inc.php | 4 +- .../mysql_command_counters.inc.php | 30 +- .../application/mysql_connections.inc.php | 18 +- .../application/mysql_files_tables.inc.php | 6 +- .../mysql_innodb_buffer_pool.inc.php | 4 +- .../mysql_innodb_insert_buffer.inc.php | 4 +- .../mysql_innodb_io_pending.inc.php | 8 +- .../application/mysql_myisam_indexes.inc.php | 6 +- .../mysql_query_cache_memory.inc.php | 2 +- .../application/mysql_select_types.inc.php | 8 +- .../graphs/application/mysql_sorts.inc.php | 6 +- .../graphs/application/mysql_status.inc.php | 30 +- .../mysql_temporary_objects.inc.php | 4 +- .../html/graphs/application/nfs-stats.inc.php | 30 +- .../application/nginx_connections.inc.php | 10 +- .../application/ntp-client_stats.inc.php | 6 +- .../application/ntp-server_packets.inc.php | 6 +- .../application/ntp-server_stats.inc.php | 6 +- .../graphs/application/nvidia-common.inc.php | 4 +- .../opensearch_c_act_pri_shards.inc.php | 4 +- .../opensearch_c_act_shards.inc.php | 4 +- .../opensearch_c_act_shards_perc.inc.php | 4 +- .../opensearch_c_all_shards.inc.php | 24 +- .../opensearch_c_data_nodes.inc.php | 4 +- .../opensearch_c_delayed_shards.inc.php | 4 +- .../opensearch_c_in_fl_fetch.inc.php | 4 +- .../opensearch_c_init_shards.inc.php | 4 +- .../application/opensearch_c_nodes.inc.php | 4 +- .../opensearch_c_pending_tasks.inc.php | 4 +- .../opensearch_c_rel_shards.inc.php | 4 +- .../opensearch_c_task_max_in_time.inc.php | 4 +- .../opensearch_c_unass_shards.inc.php | 4 +- .../application/opensearch_mem_all.inc.php | 52 +-- .../application/opensearch_status.inc.php | 4 +- .../opensearch_tf_periodic.inc.php | 4 +- .../application/opensearch_tf_time.inc.php | 4 +- .../application/opensearch_tf_total.inc.php | 4 +- .../opensearch_tfd_evictions.inc.php | 4 +- .../application/opensearch_tfd_size.inc.php | 4 +- .../opensearch_tg_exists_time.inc.php | 4 +- .../opensearch_tg_exists_total.inc.php | 4 +- .../opensearch_tg_missing_time.inc.php | 4 +- .../opensearch_tg_missing_total.inc.php | 4 +- .../application/opensearch_tg_time.inc.php | 4 +- .../application/opensearch_tg_total.inc.php | 4 +- .../opensearch_ti_del_time.inc.php | 4 +- .../opensearch_ti_del_total.inc.php | 4 +- .../application/opensearch_ti_failed.inc.php | 4 +- .../opensearch_ti_noop_up_total.inc.php | 4 +- .../opensearch_ti_throttled.inc.php | 4 +- .../opensearch_ti_throttled_time.inc.php | 4 +- .../application/opensearch_ti_time.inc.php | 4 +- .../application/opensearch_ti_total.inc.php | 4 +- .../application/opensearch_time_all.inc.php | 56 +-- .../application/opensearch_tm_docs.inc.php | 4 +- .../application/opensearch_tm_size.inc.php | 4 +- .../opensearch_tm_throttled_size.inc.php | 4 +- .../opensearch_tm_throttled_time.inc.php | 4 +- .../application/opensearch_tm_time.inc.php | 4 +- .../application/opensearch_tm_total.inc.php | 4 +- .../opensearch_tqc_cache_count.inc.php | 4 +- .../opensearch_tqc_cache_size.inc.php | 4 +- .../opensearch_tqc_evictions.inc.php | 4 +- .../application/opensearch_tqc_hit.inc.php | 4 +- .../application/opensearch_tqc_miss.inc.php | 4 +- .../application/opensearch_tqc_size.inc.php | 4 +- .../application/opensearch_tqc_total.inc.php | 4 +- .../opensearch_tr_ext_time.inc.php | 4 +- .../opensearch_tr_ext_total.inc.php | 4 +- .../application/opensearch_tr_time.inc.php | 4 +- .../application/opensearch_tr_total.inc.php | 4 +- .../opensearch_trc_evictions.inc.php | 4 +- .../application/opensearch_trc_hits.inc.php | 4 +- .../application/opensearch_trc_misses.inc.php | 4 +- .../application/opensearch_trc_size.inc.php | 4 +- .../application/opensearch_ts_f_time.inc.php | 4 +- .../application/opensearch_ts_f_total.inc.php | 4 +- .../application/opensearch_ts_q_time.inc.php | 4 +- .../application/opensearch_ts_q_total.inc.php | 4 +- .../application/opensearch_ts_sc_time.inc.php | 4 +- .../opensearch_ts_sc_total.inc.php | 4 +- .../application/opensearch_ts_su_time.inc.php | 4 +- .../opensearch_ts_su_total.inc.php | 4 +- .../application/opensearch_tseg_count.inc.php | 4 +- .../opensearch_tseg_docval_size.inc.php | 4 +- .../opensearch_tseg_fbs_size.inc.php | 4 +- .../opensearch_tseg_fields_size.inc.php | 4 +- .../opensearch_tseg_indwrt_size.inc.php | 4 +- .../opensearch_tseg_norms_size.inc.php | 4 +- .../opensearch_tseg_points_size.inc.php | 4 +- .../application/opensearch_tseg_size.inc.php | 4 +- .../opensearch_tseg_terms_size.inc.php | 4 +- .../opensearch_tseg_tvector_size.inc.php | 4 +- .../opensearch_tseg_vermap_size.inc.php | 4 +- .../opensearch_tst_res_size.inc.php | 4 +- .../application/opensearch_tst_size.inc.php | 4 +- .../opensearch_ttl_last_mod_age.inc.php | 4 +- .../application/opensearch_ttl_ops.inc.php | 4 +- .../application/opensearch_ttl_size.inc.php | 4 +- .../opensearch_ttl_uncom_ops.inc.php | 4 +- .../opensearch_ttl_uncom_size.inc.php | 4 +- .../application/opensearch_tw_time.inc.php | 4 +- .../application/opensearch_tw_total.inc.php | 4 +- .../application/opensips_memory.inc.php | 4 +- .../application/pi-hole_destinations.inc.php | 2 +- .../application/portactivity_from.inc.php | 48 +- .../application/portactivity_to.inc.php | 48 +- .../portactivity_total_details.inc.php | 48 +- .../application/portactivity_totals.inc.php | 12 +- .../graphs/application/postfix_bytes.inc.php | 12 +- .../application/postfix_deferral.inc.php | 12 +- .../application/postfix_messages.inc.php | 48 +- .../graphs/application/postfix_qstats.inc.php | 24 +- .../application/postfix_rejects.inc.php | 84 ++-- .../graphs/application/postfix_sr.inc.php | 24 +- .../application/postgres_backends.inc.php | 6 +- .../graphs/application/postgres_cr.inc.php | 12 +- .../graphs/application/postgres_hr.inc.php | 12 +- .../graphs/application/postgres_index.inc.php | 30 +- .../graphs/application/postgres_rows.inc.php | 30 +- .../application/postgres_sequential.inc.php | 12 +- .../graphs/application/powerdns_fail.inc.php | 10 +- .../application/powerdns_packetcache.inc.php | 8 +- .../application/powerdns_queries.inc.php | 8 +- .../application/powerdns_queries_udp.inc.php | 8 +- .../application/powerdns_querycache.inc.php | 6 +- .../application/powerdns_recursing.inc.php | 6 +- .../graphs/application/privoxy_req.inc.php | 36 +- .../application/privoxy_resp_xxx.inc.php | 20 +- .../graphs/application/privoxy_ver.inc.php | 16 +- .../application/pureftpd_bitrate.inc.php | 2 +- .../application/pureftpd_connections.inc.php | 4 +- .../application/pwrstatd_minutes.inc.php | 2 +- .../application/pwrstatd_percentage.inc.php | 4 +- .../application/pwrstatd_voltage.inc.php | 6 +- .../application/pwrstatd_wattage.inc.php | 4 +- .../graphs/application/redis_clients.inc.php | 2 +- .../graphs/application/redis_defrag.inc.php | 6 +- .../application/redis_fragmentation.inc.php | 2 +- .../graphs/application/redis_keyspace.inc.php | 2 +- .../graphs/application/redis_memory.inc.php | 8 +- .../html/graphs/application/redis_net.inc.php | 2 +- .../graphs/application/redis_sync.inc.php | 4 +- .../graphs/application/redis_usage.inc.php | 14 +- .../graphs/application/sagan_after.inc.php | 4 +- .../graphs/application/sagan_alert.inc.php | 4 +- .../graphs/application/sagan_bytes.inc.php | 4 +- .../application/sagan_bytes_ignored.inc.php | 4 +- .../graphs/application/sagan_drop.inc.php | 4 +- .../application/sagan_drop_percent.inc.php | 4 +- .../html/graphs/application/sagan_eps.inc.php | 4 +- .../application/sagan_f_drop_percent.inc.php | 4 +- .../application/sagan_f_dropped.inc.php | 4 +- .../graphs/application/sagan_f_total.inc.php | 4 +- .../graphs/application/sagan_ignore.inc.php | 4 +- .../graphs/application/sagan_match.inc.php | 4 +- .../sagan_max_bytes_log_line.inc.php | 4 +- .../application/sagan_threshold.inc.php | 4 +- .../graphs/application/sagan_total.inc.php | 4 +- .../graphs/application/sagan_uptime.inc.php | 4 +- .../graphs/application/seafile-common.inc.php | 4 +- .../application/shoutcast_multi_bits.inc.php | 6 +- .../application/shoutcast_multi_stats.inc.php | 2 +- .../graphs/application/smart-common.inc.php | 4 +- .../graphs/application/smart_big5.inc.php | 20 +- .../graphs/application/smart_other.inc.php | 20 +- .../graphs/application/smart_runtime.inc.php | 4 +- .../html/graphs/application/smart_ssd.inc.php | 20 +- .../graphs/application/smart_temp.inc.php | 8 +- .../application/smart_tests_ran.inc.php | 16 +- .../application/smart_tests_status.inc.php | 16 +- .../graphs/application/sneck_results.inc.php | 20 +- .../graphs/application/sneck_time.inc.php | 8 +- .../graphs/application/squid_bytehit.inc.php | 18 +- .../graphs/application/squid_clients.inc.php | 6 +- .../graphs/application/squid_cputime.inc.php | 6 +- .../graphs/application/squid_cpuusage.inc.php | 6 +- .../application/squid_filedescr.inc.php | 12 +- .../graphs/application/squid_http.inc.php | 18 +- .../graphs/application/squid_httpbw.inc.php | 12 +- .../graphs/application/squid_memory.inc.php | 36 +- .../graphs/application/squid_objcount.inc.php | 6 +- .../application/squid_pagefaults.inc.php | 6 +- .../graphs/application/squid_reqhit.inc.php | 18 +- .../graphs/application/squid_server.inc.php | 12 +- .../graphs/application/squid_serverbw.inc.php | 12 +- .../application/squid_sysnumread.inc.php | 6 +- .../application/supervisord_uptime.inc.php | 4 +- .../graphs/application/suricata_alert.inc.php | 4 +- .../application/suricata_app_flows.inc.php | 104 ++--- .../application/suricata_app_tx.inc.php | 96 ++-- .../graphs/application/suricata_bytes.inc.php | 4 +- .../application/suricata_dec_proto.inc.php | 72 +-- .../application/suricata_flow_proto.inc.php | 16 +- .../application/suricata_mem_use.inc.php | 20 +- .../application/suricata_nasty_delta.inc.php | 20 +- .../suricata_nasty_percent.inc.php | 12 +- .../application/suricata_packets.inc.php | 16 +- .../application/suricata_uptime.inc.php | 4 +- .../graphs/application/wireguard_time.inc.php | 4 +- .../application/zfs_arc_cache_hits.inc.php | 40 +- .../zfs_arc_cache_hits_by_list.inc.php | 20 +- .../zfs_arc_cache_hits_by_type.inc.php | 16 +- .../application/zfs_arc_cache_miss.inc.php | 20 +- .../zfs_arc_cache_misses_by_type.inc.php | 16 +- .../application/zfs_arc_efficiency.inc.php | 16 +- .../graphs/application/zfs_arc_misc.inc.php | 16 +- .../graphs/application/zfs_arc_size.inc.php | 16 +- .../zfs_arc_size_breakdown.inc.php | 8 +- .../application/zfs_arc_size_per.inc.php | 12 +- .../application/zfs_l2_rw_bytes.inc.php | 8 +- .../graphs/application/zfs_l2_sizes.inc.php | 40 +- .../graphs/application/zfs_pool_cap.inc.php | 4 +- .../graphs/application/zfs_pool_frag.inc.php | 4 +- .../graphs/application/zfs_pool_space.inc.php | 16 +- includes/html/graphs/customer/bits.inc.php | 6 +- .../device/gaia_firewall_packets.inc.php | 8 +- .../graphs/device/ib_dhcp_messages.inc.php | 18 +- .../graphs/device/ib_dns_dyn_updates.inc.php | 8 +- .../graphs/device/ib_dns_performance.inc.php | 4 +- .../ib_dns_request_return_codes.inc.php | 8 +- .../html/graphs/device/netstat_icmp.inc.php | 14 +- .../graphs/device/netstat_icmp_info.inc.php | 14 +- .../html/graphs/device/netstat_ip.inc.php | 12 +- .../graphs/device/xirrus_stations.inc.php | 18 +- .../generic_multi_simplex_seperated.inc.php | 2 +- includes/html/pages/apps.inc.php | 4 +- includes/html/pages/apps/proxmox/vm.inc.php | 2 +- includes/html/pages/bill/actions.inc.php | 16 +- includes/html/pages/device/apps.inc.php | 4 +- .../html/pages/device/apps/apache.inc.php | 6 +- .../pages/device/apps/backupninja.inc.php | 2 +- includes/html/pages/device/apps/cape.inc.php | 46 +- includes/html/pages/device/apps/ceph.inc.php | 6 +- .../pages/device/apps/certificate.inc.php | 8 +- .../html/pages/device/apps/chronyd.inc.php | 12 +- .../html/pages/device/apps/dhcp-stats.inc.php | 4 +- includes/html/pages/device/apps/drbd.inc.php | 6 +- .../html/pages/device/apps/freeradius.inc.php | 12 +- .../html/pages/device/apps/hv-monitor.inc.php | 28 +- .../html/pages/device/apps/icecast.inc.php | 4 +- .../html/pages/device/apps/logsize.inc.php | 8 +- .../pages/device/apps/mailscanner.inc.php | 4 +- includes/html/pages/device/apps/mdadm.inc.php | 16 +- .../html/pages/device/apps/memcached.inc.php | 12 +- .../device/apps/mojo_cape_submit.inc.php | 6 +- includes/html/pages/device/apps/mysql.inc.php | 40 +- .../html/pages/device/apps/nfs-server.inc.php | 8 +- includes/html/pages/device/apps/nginx.inc.php | 2 +- .../html/pages/device/apps/ntp-client.inc.php | 2 +- .../html/pages/device/apps/ntp-server.inc.php | 10 +- .../html/pages/device/apps/opensearch.inc.php | 64 +-- .../html/pages/device/apps/opensips.inc.php | 4 +- .../pages/device/apps/portactivity.inc.php | 14 +- .../html/pages/device/apps/postgres.inc.php | 6 +- .../html/pages/device/apps/powerdns.inc.php | 10 +- .../html/pages/device/apps/powermon.inc.php | 2 +- .../html/pages/device/apps/privoxy.inc.php | 24 +- .../html/pages/device/apps/proxmox.inc.php | 2 +- .../html/pages/device/apps/pureftpd.inc.php | 4 +- .../html/pages/device/apps/pwrstatd.inc.php | 12 +- includes/html/pages/device/apps/redis.inc.php | 20 +- .../html/pages/device/apps/rrdcached.inc.php | 6 +- includes/html/pages/device/apps/sagan.inc.php | 36 +- .../html/pages/device/apps/seafile.inc.php | 14 +- .../html/pages/device/apps/shoutcast.inc.php | 4 +- includes/html/pages/device/apps/smart.inc.php | 22 +- includes/html/pages/device/apps/sneck.inc.php | 16 +- .../html/pages/device/apps/suricata.inc.php | 28 +- .../device/apps/suricata_extract.inc.php | 28 +- .../html/pages/device/apps/tinydns.inc.php | 6 +- .../html/pages/device/apps/unbound.inc.php | 8 +- .../pages/device/apps/voip-monitor.inc.php | 6 +- includes/html/pages/device/apps/zfs.inc.php | 14 +- includes/html/pages/device/collectd.inc.php | 4 +- includes/html/pages/device/edit.inc.php | 6 +- includes/html/pages/device/graphs.inc.php | 4 +- includes/html/pages/device/health.inc.php | 6 +- .../html/pages/device/loadbalancer.inc.php | 4 +- .../device/loadbalancer/ace_rservers.inc.php | 4 +- .../device/loadbalancer/ace_vservers.inc.php | 4 +- .../loadbalancer/netscaler_vsvr.inc.php | 16 +- includes/html/pages/device/munin.inc.php | 4 +- includes/html/pages/device/nfsen.inc.php | 4 +- .../html/pages/device/nfsen/channel.inc.php | 2 +- .../html/pages/device/nfsen/general.inc.php | 2 +- .../html/pages/device/nfsen/stats.inc.php | 38 +- includes/html/pages/device/port.inc.php | 6 +- includes/html/pages/device/processes.inc.php | 8 +- includes/html/pages/device/routing.inc.php | 4 +- .../html/pages/device/routing/cef.inc.php | 6 +- .../html/pages/device/routing/mpls.inc.php | 6 +- .../html/pages/device/routing/vrf.inc.php | 14 +- includes/html/pages/device/wireless.inc.php | 4 +- includes/html/pages/health.inc.php | 6 +- includes/html/pages/routing/bgp.inc.php | 2 +- includes/html/pages/routing/isis.inc.php | 2 +- includes/html/pages/routing/mpls.inc.php | 4 +- includes/html/pages/routing/vrf.inc.php | 10 +- includes/html/pages/search.inc.php | 6 +- includes/html/pages/wireless.inc.php | 6 +- includes/html/table/address-search.inc.php | 12 +- includes/html/table/app_ntp.inc.php | 22 +- includes/html/table/arp-search.inc.php | 18 +- includes/html/table/as-selection.inc.php | 8 +- includes/html/table/bills.inc.php | 24 +- includes/html/table/component.inc.php | 6 +- includes/html/table/ix-list.inc.php | 10 +- includes/html/table/ix-peers.inc.php | 14 +- includes/html/table/mempool-edit.inc.php | 2 +- includes/html/table/poll-log.inc.php | 14 +- includes/html/table/processor-edit.inc.php | 2 +- includes/html/table/processor.inc.php | 14 +- includes/html/table/routing-edit.inc.php | 2 +- includes/html/table/sensors-common.php | 28 +- includes/html/table/storage-edit.inc.php | 2 +- includes/html/table/storage.inc.php | 22 +- includes/html/table/toner.inc.php | 14 +- includes/polling/applications/apache.inc.php | 38 +- .../polling/applications/backupninja.inc.php | 8 +- includes/polling/applications/bind.inc.php | 74 +-- .../polling/applications/certificate.inc.php | 2 +- includes/polling/applications/chronyd.inc.php | 48 +- .../polling/applications/dhcp-stats.inc.php | 20 +- includes/polling/applications/drbd.inc.php | 20 +- includes/polling/applications/logsize.inc.php | 2 +- .../polling/applications/mailscanner.inc.php | 12 +- includes/polling/applications/mdadm.inc.php | 10 +- .../polling/applications/memcached.inc.php | 34 +- includes/polling/applications/mysql.inc.php | 186 ++++---- includes/polling/applications/nginx.inc.php | 8 +- .../polling/applications/ntp-server.inc.php | 26 +- includes/polling/applications/postfix.inc.php | 2 +- .../polling/applications/powermon.inc.php | 6 +- .../polling/applications/pwrstatd.inc.php | 14 +- includes/polling/applications/redis.inc.php | 18 +- includes/polling/applications/sagan.inc.php | 2 +- includes/polling/applications/seafile.inc.php | 6 +- .../polling/applications/shoutcast.inc.php | 14 +- .../polling/applications/suricata.inc.php | 2 +- includes/polling/applications/tinydns.inc.php | 38 +- includes/polling/aruba-controller.inc.php | 62 +-- includes/polling/bgp-peers.inc.php | 24 +- includes/polling/cisco-cef.inc.php | 6 +- .../polling/cisco-ipsec-flow-monitor.inc.php | 40 +- .../cisco-remote-access-monitor.inc.php | 12 +- .../polling/cisco-voice/cisco-iosmtp.inc.php | 2 +- .../cisco-voice/cisco-iosxcode.inc.php | 2 +- includes/polling/cisco-vpdn.inc.php | 6 +- includes/polling/entity-physical/cimc.inc.php | 2 +- includes/polling/entity-physical/ios.inc.php | 10 +- includes/polling/functions.inc.php | 54 +-- includes/polling/junose-atm-vp.inc.php | 12 +- includes/polling/netscaler-vsvr.inc.php | 12 +- includes/polling/ports/os/cnmatrix.inc.php | 2 +- .../polling/ports/os/infinera-groove.inc.php | 26 +- includes/polling/ports/os/procera.inc.php | 2 +- includes/polling/ports/os/timos.inc.php | 20 +- includes/polling/ports/port-poe.inc.php | 32 +- includes/polling/storage.inc.php | 4 +- includes/polling/ucd-diskio.inc.php | 12 +- includes/polling/ucd-mib.inc.php | 6 +- .../polling/unix-agent/munin-plugins.inc.php | 48 +- includes/rewrites.php | 56 +-- includes/services.inc.php | 2 +- includes/syslog.php | 12 +- scripts/manage_bills.php | 2 +- scripts/removespikes.php | 1 + tests/BasicApiTest.php | 2 +- tests/CommonFunctionsTest.php | 4 +- tests/SyslogTest.php | 64 +-- 615 files changed, 4562 insertions(+), 4554 deletions(-) diff --git a/LibreNMS/Alert/AlertRules.php b/LibreNMS/Alert/AlertRules.php index fc4f385efe..7d21ebafd6 100644 --- a/LibreNMS/Alert/AlertRules.php +++ b/LibreNMS/Alert/AlertRules.php @@ -121,7 +121,7 @@ class AlertRules $details = gzcompress(json_encode($details), 9); dbUpdate(['details' => $details], 'alert_log', 'id = ?', [$alert_log['id']]); } else { - $extra = gzcompress(json_encode(['contacts' => AlertUtil::getContacts($qry), 'rule'=>$qry]), 9); + $extra = gzcompress(json_encode(['contacts' => AlertUtil::getContacts($qry), 'rule' => $qry]), 9); if (dbInsert(['state' => AlertState::ACTIVE, 'device_id' => $device_id, 'rule_id' => $rule['id'], 'details' => $extra], 'alert_log')) { if (is_null($current_state)) { dbInsert(['state' => AlertState::ACTIVE, 'device_id' => $device_id, 'rule_id' => $rule['id'], 'open' => 1, 'alerted' => 0], 'alerts'); diff --git a/LibreNMS/Alert/Transport.php b/LibreNMS/Alert/Transport.php index 9f242fcaf1..8bb440707c 100644 --- a/LibreNMS/Alert/Transport.php +++ b/LibreNMS/Alert/Transport.php @@ -87,11 +87,11 @@ abstract class Transport implements TransportInterface public static function getColorForState($state) { $colors = [ - AlertState::CLEAR => Config::get('alert_colour.ok'), - AlertState::ACTIVE => Config::get('alert_colour.bad'), + AlertState::CLEAR => Config::get('alert_colour.ok'), + AlertState::ACTIVE => Config::get('alert_colour.bad'), AlertState::ACKNOWLEDGED => Config::get('alert_colour.acknowledged'), - AlertState::WORSE => Config::get('alert_colour.worse'), - AlertState::BETTER => Config::get('alert_colour.better'), + AlertState::WORSE => Config::get('alert_colour.worse'), + AlertState::BETTER => Config::get('alert_colour.better'), ]; return isset($colors[$state]) ? $colors[$state] : '#337AB7'; diff --git a/LibreNMS/Alert/Transport/Clickatell.php b/LibreNMS/Alert/Transport/Clickatell.php index 3493651174..fc58b17a74 100644 --- a/LibreNMS/Alert/Transport/Clickatell.php +++ b/LibreNMS/Alert/Transport/Clickatell.php @@ -53,19 +53,19 @@ class Clickatell extends Transport 'config' => [ [ 'title' => 'Token', - 'name' => 'clickatell-token', + 'name' => 'clickatell-token', 'descr' => 'Clickatell Token', - 'type' => 'password', + 'type' => 'password', ], [ 'title' => 'Mobile Numbers', - 'name' => 'clickatell-numbers', + 'name' => 'clickatell-numbers', 'descr' => 'Enter mobile numbers, can be new line or comma separated', - 'type' => 'textarea', + 'type' => 'textarea', ], ], 'validation' => [ - 'clickatell-token' => 'required|string', + 'clickatell-token' => 'required|string', 'clickatell-numbers' => 'required|string', ], ]; diff --git a/LibreNMS/Alert/Transport/Gitlab.php b/LibreNMS/Alert/Transport/Gitlab.php index b8f9e79467..79566deae9 100644 --- a/LibreNMS/Alert/Transport/Gitlab.php +++ b/LibreNMS/Alert/Transport/Gitlab.php @@ -72,7 +72,7 @@ class Gitlab extends Transport 'title' => 'Project ID', 'name' => 'gitlab-id', 'descr' => 'GitLab Project ID', - 'type'=> 'text', + 'type' => 'text', ], [ 'title' => 'Personal Access Token', diff --git a/LibreNMS/Alert/Transport/Hue.php b/LibreNMS/Alert/Transport/Hue.php index e431d6a74d..24bab10288 100644 --- a/LibreNMS/Alert/Transport/Hue.php +++ b/LibreNMS/Alert/Transport/Hue.php @@ -62,21 +62,21 @@ class Hue extends Transport public static function configTemplate(): array { return [ - 'config'=>[ + 'config' => [ [ - 'title'=> 'Host', + 'title' => 'Host', 'name' => 'hue-host', 'descr' => 'Hue Host', 'type' => 'text', ], [ - 'title'=> 'Hue User', + 'title' => 'Hue User', 'name' => 'hue-user', 'descr' => 'Phillips Hue Host', 'type' => 'text', ], [ - 'title'=> 'Duration', + 'title' => 'Duration', 'name' => 'hue-duration', 'descr' => 'Phillips Hue Duration', 'type' => 'select', diff --git a/LibreNMS/Alert/Transport/Irc.php b/LibreNMS/Alert/Transport/Irc.php index e06c4256d5..32906bdb5d 100644 --- a/LibreNMS/Alert/Transport/Irc.php +++ b/LibreNMS/Alert/Transport/Irc.php @@ -62,7 +62,7 @@ class Irc extends Transport 'title' => 'IRC', 'name' => 'irc', 'descr' => 'Enable IRC alerts', - 'type' => 'checkbox', + 'type' => 'checkbox', 'default' => true, ], ], diff --git a/LibreNMS/Alert/Transport/Mail.php b/LibreNMS/Alert/Transport/Mail.php index 2cd4ff868e..2d82d2cc3b 100644 --- a/LibreNMS/Alert/Transport/Mail.php +++ b/LibreNMS/Alert/Transport/Mail.php @@ -61,7 +61,7 @@ class Mail extends Transport 'title' => 'Contact Type', 'name' => 'mail-contact', 'descr' => 'Method for selecting contacts', - 'type' => 'select', + 'type' => 'select', 'options' => [ 'Specified Email' => 'email', 'Device sysContact' => 'sysContact', @@ -74,13 +74,13 @@ class Mail extends Transport 'title' => 'Email', 'name' => 'email', 'descr' => 'Email address of contact', - 'type' => 'text', + 'type' => 'text', ], [ 'title' => 'Role', 'name' => 'role', 'descr' => 'Role of users to mail', - 'type' => 'select', + 'type' => 'select', 'options' => $roles, ], [ diff --git a/LibreNMS/Alert/Transport/Pagerduty.php b/LibreNMS/Alert/Transport/Pagerduty.php index d7263463c3..20dfc22e55 100644 --- a/LibreNMS/Alert/Transport/Pagerduty.php +++ b/LibreNMS/Alert/Transport/Pagerduty.php @@ -43,15 +43,15 @@ class Pagerduty extends Transport $safe_message = strip_tags($alert_data['msg']) ?: 'Test'; $message = array_filter(explode("\n", $safe_message), 'strlen'); $data = [ - 'routing_key' => $this->config['service_key'], + 'routing_key' => $this->config['service_key'], 'event_action' => $event_action, - 'dedup_key' => (string) $alert_data['alert_id'], - 'payload' => [ - 'custom_details' => ['message' => $message], - 'group' => (string) \DeviceCache::get($alert_data['device_id'])->groups->pluck('name'), - 'source' => $alert_data['hostname'], + 'dedup_key' => (string) $alert_data['alert_id'], + 'payload' => [ + 'custom_details' => ['message' => $message], + 'group' => (string) \DeviceCache::get($alert_data['device_id'])->groups->pluck('name'), + 'source' => $alert_data['hostname'], 'severity' => $alert_data['severity'], - 'summary' => ($alert_data['name'] ? $alert_data['name'] . ' on ' . $alert_data['hostname'] : $alert_data['title']), + 'summary' => ($alert_data['name'] ? $alert_data['name'] . ' on ' . $alert_data['hostname'] : $alert_data['title']), ], ]; @@ -88,8 +88,8 @@ class Pagerduty extends Transport ], [ 'title' => 'Routing Key', - 'type' => 'text', - 'name' => 'service_key', + 'type' => 'text', + 'name' => 'service_key', ], [ 'title' => 'Custom API URL', diff --git a/LibreNMS/Alert/Transport/Playsms.php b/LibreNMS/Alert/Transport/Playsms.php index 487e86c441..6b3c3267e9 100644 --- a/LibreNMS/Alert/Transport/Playsms.php +++ b/LibreNMS/Alert/Transport/Playsms.php @@ -93,9 +93,9 @@ class Playsms extends Transport ], ], 'validation' => [ - 'playsms-url' => 'required|url', - 'playsms-user' => 'required|string', - 'playsms-token' => 'required|string', + 'playsms-url' => 'required|url', + 'playsms-user' => 'required|string', + 'playsms-token' => 'required|string', 'playsms-mobiles' => 'required', ], ]; diff --git a/LibreNMS/Alert/Transport/Pushover.php b/LibreNMS/Alert/Transport/Pushover.php index 0363ecdc0f..4543bd8774 100644 --- a/LibreNMS/Alert/Transport/Pushover.php +++ b/LibreNMS/Alert/Transport/Pushover.php @@ -97,21 +97,21 @@ class Pushover extends Transport 'config' => [ [ 'title' => 'Api Key', - 'name' => 'appkey', + 'name' => 'appkey', 'descr' => 'Api Key', - 'type' => 'password', + 'type' => 'password', ], [ 'title' => 'User Key', - 'name' => 'userkey', + 'name' => 'userkey', 'descr' => 'User Key', - 'type' => 'password', + 'type' => 'password', ], [ 'title' => 'Pushover Options', - 'name' => 'options', + 'name' => 'options', 'descr' => 'Pushover options', - 'type' => 'textarea', + 'type' => 'textarea', ], ], 'validation' => [ diff --git a/LibreNMS/Alert/Transport/Smseagle.php b/LibreNMS/Alert/Transport/Smseagle.php index 974086427d..31efda470b 100644 --- a/LibreNMS/Alert/Transport/Smseagle.php +++ b/LibreNMS/Alert/Transport/Smseagle.php @@ -96,10 +96,10 @@ class Smseagle extends Transport ], ], 'validation' => [ - 'smseagle-url' => 'required|url', - 'smseagle-token' => 'required_without:smseagle-user,smseagle-pass|string', - 'smseagle-user' => 'required_without:smseagle-token|string', - 'smseagle-pass' => 'required_without:smseagle-token|string', + 'smseagle-url' => 'required|url', + 'smseagle-token' => 'required_without:smseagle-user,smseagle-pass|string', + 'smseagle-user' => 'required_without:smseagle-token|string', + 'smseagle-pass' => 'required_without:smseagle-token|string', 'smseagle-mobiles' => 'required', ], ]; diff --git a/LibreNMS/Alert/Transport/Smsfeedback.php b/LibreNMS/Alert/Transport/Smsfeedback.php index 0ada9c58fe..b83d1649c6 100644 --- a/LibreNMS/Alert/Transport/Smsfeedback.php +++ b/LibreNMS/Alert/Transport/Smsfeedback.php @@ -81,10 +81,10 @@ class Smsfeedback extends Transport ], ], 'validation' => [ - 'smsfeedback-user' => 'required|string', - 'smsfeedback-pass' => 'required|string', + 'smsfeedback-user' => 'required|string', + 'smsfeedback-pass' => 'required|string', 'smsfeedback-mobiles' => 'required', - 'smsfeedback-sender' => 'required|string', + 'smsfeedback-sender' => 'required|string', ], ]; } diff --git a/LibreNMS/Alert/Transport/Twilio.php b/LibreNMS/Alert/Transport/Twilio.php index f9563574fb..fed867e944 100644 --- a/LibreNMS/Alert/Transport/Twilio.php +++ b/LibreNMS/Alert/Transport/Twilio.php @@ -72,8 +72,8 @@ class Twilio extends Transport ], ], 'validation' => [ - 'twilio-sid' => 'required|string', - 'twilio-token' => 'required|string', + 'twilio-sid' => 'required|string', + 'twilio-token' => 'required|string', 'twilio-to' => 'required', 'twilio-sender' => 'required', ], diff --git a/LibreNMS/Alert/Transport/Ukfastpss.php b/LibreNMS/Alert/Transport/Ukfastpss.php index 5f15382344..7d133ffee5 100644 --- a/LibreNMS/Alert/Transport/Ukfastpss.php +++ b/LibreNMS/Alert/Transport/Ukfastpss.php @@ -95,7 +95,7 @@ class Ukfastpss extends Transport 'title' => 'Secure', 'name' => 'secure', 'descr' => 'Specifies whether created request should be secure', - 'type' => 'checkbox', + 'type' => 'checkbox', 'default' => true, ], ], diff --git a/LibreNMS/Authentication/LdapAuthorizationAuthorizer.php b/LibreNMS/Authentication/LdapAuthorizationAuthorizer.php index 5566d1d0f2..6e69b370d9 100644 --- a/LibreNMS/Authentication/LdapAuthorizationAuthorizer.php +++ b/LibreNMS/Authentication/LdapAuthorizationAuthorizer.php @@ -207,8 +207,8 @@ class LdapAuthorizationAuthorizer extends AuthorizerBase return [ 'username' => $username, 'realname' => $realname, - 'user_id' => $user_id, - 'email' => $email, + 'user_id' => $user_id, + 'email' => $email, ]; } } diff --git a/LibreNMS/Authentication/SSOAuthorizer.php b/LibreNMS/Authentication/SSOAuthorizer.php index eda79a6f87..4c6120d2ac 100644 --- a/LibreNMS/Authentication/SSOAuthorizer.php +++ b/LibreNMS/Authentication/SSOAuthorizer.php @@ -138,6 +138,7 @@ class SSOAuthorizer extends MysqlAuthorizer } } } + // No match, proxy is untrusted return false; } catch (InvalidIpException $e) { @@ -145,6 +146,7 @@ class SSOAuthorizer extends MysqlAuthorizer return false; } } + // Not enabled, trust everything return true; } diff --git a/LibreNMS/Exceptions/ApiException.php b/LibreNMS/Exceptions/ApiException.php index 73b393eb15..aa5686f444 100644 --- a/LibreNMS/Exceptions/ApiException.php +++ b/LibreNMS/Exceptions/ApiException.php @@ -47,7 +47,7 @@ class ApiException extends \Exception public function render($request): JsonResponse { return response()->json([ - 'status' => 'error', + 'status' => 'error', 'message' => $this->getMessage(), ], $this->getCode(), [], JSON_PRETTY_PRINT); } diff --git a/LibreNMS/IRCBot.php b/LibreNMS/IRCBot.php index 890ea5ebbe..467937d99a 100644 --- a/LibreNMS/IRCBot.php +++ b/LibreNMS/IRCBot.php @@ -554,7 +554,7 @@ class IRCBot } if ($this->ssl && $this->config['irc_disable_ssl_check']) { - $ssl_context_params = ['ssl'=>['allow_self_signed'=> true, 'verify_peer' => false, 'verify_peer_name' => false]]; + $ssl_context_params = ['ssl' => ['allow_self_signed' => true, 'verify_peer' => false, 'verify_peer_name' => false]]; $ssl_context = stream_context_create($ssl_context_params); $this->socket['irc'] = stream_socket_client($server . ':' . $this->port, $errno, $errstr, 30, STREAM_CLIENT_CONNECT, $ssl_context); } else { @@ -1058,21 +1058,21 @@ class IRCBot $string = preg_replace('##i', chr(31), $string); $colors = [ - 'white' => '00', - 'black' => '01', - 'blue' => '02', - 'green' => '03', - 'red' => '04', - 'brown' => '05', - 'purple' => '06', - 'orange' => '07', - 'yellow' => '08', + 'white' => '00', + 'black' => '01', + 'blue' => '02', + 'green' => '03', + 'red' => '04', + 'brown' => '05', + 'purple' => '06', + 'orange' => '07', + 'yellow' => '08', 'lightgreen' => '09', - 'cyan' => '10', + 'cyan' => '10', 'lightcyan' => '11', 'lightblue' => '12', - 'pink' => '13', - 'grey' => '14', + 'pink' => '13', + 'grey' => '14', 'lightgrey' => '15', ]; diff --git a/LibreNMS/Modules/Isis.php b/LibreNMS/Modules/Isis.php index b1377154c8..b048bf216e 100644 --- a/LibreNMS/Modules/Isis.php +++ b/LibreNMS/Modules/Isis.php @@ -173,6 +173,7 @@ class Isis implements Module if (count($data) !== $adjacencies->where('isisISAdjState', 'up')->count()) { echo 'New Adjacencies, running discovery'; + // don't enable, might be a bad heuristic return $this->fillNew($adjacencies, $this->discoverIsIsMib($os)); } diff --git a/LibreNMS/Modules/PrinterSupplies.php b/LibreNMS/Modules/PrinterSupplies.php index 556cbbbe1b..3de5b69d03 100644 --- a/LibreNMS/Modules/PrinterSupplies.php +++ b/LibreNMS/Modules/PrinterSupplies.php @@ -101,10 +101,10 @@ class PrinterSupplies implements Module echo $tonerperc . " %\n"; $tags = [ - 'rrd_def' => RrdDefinition::make()->addDataset('toner', 'GAUGE', 0, 20000), - 'rrd_name' => ['toner', $toner['supply_type'], $toner['supply_index']], + 'rrd_def' => RrdDefinition::make()->addDataset('toner', 'GAUGE', 0, 20000), + 'rrd_name' => ['toner', $toner['supply_type'], $toner['supply_index']], 'rrd_oldname' => ['toner', $toner['supply_descr']], - 'index' => $toner['supply_index'], + 'index' => $toner['supply_index'], ]; $datastore->put($device, 'toner', $tags, $tonerperc); diff --git a/LibreNMS/OS/Allied.php b/LibreNMS/OS/Allied.php index c153a97a7f..33b14e4c28 100644 --- a/LibreNMS/OS/Allied.php +++ b/LibreNMS/OS/Allied.php @@ -81,15 +81,15 @@ class Allied extends OS implements OSDiscovery $hardware = $c; $serial = snmp_get($this->getDeviceArray(), 'arBoardSerialNumber.1', '-OsvQU', 'AT-INTERFACES-MIB'); - // sysDescr.0 = STRING: "CentreCOM 9924Ts, version 3.2.1-04, built 08-Sep-2009" + // sysDescr.0 = STRING: "CentreCOM 9924Ts, version 3.2.1-04, built 08-Sep-2009" } elseif ($a == 'CentreCOM' && $c == 'version') { $version = $d; $features = $f; $hardware = snmp_get($this->getDeviceArray(), 'arBoardName.1', '-OsvQU', 'AT-INTERFACES-MIB'); $serial = snmp_get($this->getDeviceArray(), 'arBoardSerialNumber.1', '-OsvQU', 'AT-INTERFACES-MIB'); - //AT-GS950/24 Gigabit Ethernet WebSmart Switch - //Also requires system description as no OIDs provide $hardware + //AT-GS950/24 Gigabit Ethernet WebSmart Switch + //Also requires system description as no OIDs provide $hardware } elseif ($d == 'WebSmart' && $e == 'Switch') { $version = snmp_get($this->getDeviceArray(), 'swhub.167.81.1.3.0', '-OsvQU', 'AtiL2-MIB'); $version = $d . ' ' . $version; diff --git a/LibreNMS/OS/Ciscowlc.php b/LibreNMS/OS/Ciscowlc.php index b3ccaac3e8..717707d002 100644 --- a/LibreNMS/OS/Ciscowlc.php +++ b/LibreNMS/OS/Ciscowlc.php @@ -61,7 +61,7 @@ class Ciscowlc extends Cisco implements ->addDataset('NUMCLIENTS', 'GAUGE', 0, 12500000000); $fields = [ - 'NUMAPS' => $numAccessPoints, + 'NUMAPS' => $numAccessPoints, 'NUMCLIENTS' => $numClients, ]; diff --git a/LibreNMS/OS/Comware.php b/LibreNMS/OS/Comware.php index 5264d493ee..a318ce5dea 100644 --- a/LibreNMS/OS/Comware.php +++ b/LibreNMS/OS/Comware.php @@ -97,7 +97,7 @@ class Comware extends OS implements MempoolsDiscovery, ProcessorDiscovery $mempools->push((new Mempool([ 'mempool_index' => $index, 'mempool_type' => 'comware', - 'mempool_class' =>'system', + 'mempool_class' => 'system', 'mempool_descr' => $entity_name[$index], 'mempool_precision' => 1, 'mempool_perc_oid' => ".1.3.6.1.4.1.25506.2.6.1.1.1.1.8.$index", diff --git a/LibreNMS/OS/Riverbed.php b/LibreNMS/OS/Riverbed.php index f391e842b6..609ddd2e2d 100644 --- a/LibreNMS/OS/Riverbed.php +++ b/LibreNMS/OS/Riverbed.php @@ -68,11 +68,11 @@ class Riverbed extends OS implements OSPolling ->addDataset('total', 'GAUGE', 0); $fields = [ - 'half_open' => $conn_half_open, + 'half_open' => $conn_half_open, 'half_closed' => $conn_half_closed, 'established' => $conn_established, - 'active' => $conn_active, - 'total' => $conn_total, + 'active' => $conn_active, + 'total' => $conn_total, ]; $tags = compact('rrd_def'); diff --git a/LibreNMS/OS/Traits/YamlMempoolsDiscovery.php b/LibreNMS/OS/Traits/YamlMempoolsDiscovery.php index 41e0837c53..f2e8d32168 100644 --- a/LibreNMS/OS/Traits/YamlMempoolsDiscovery.php +++ b/LibreNMS/OS/Traits/YamlMempoolsDiscovery.php @@ -68,7 +68,7 @@ trait YamlMempoolsDiscovery $mempool = (new Mempool([ 'mempool_index' => isset($yaml['index']) ? YamlDiscovery::replaceValues('index', $index, $count, $yaml, $snmp_data) : $index, 'mempool_type' => $yaml['type'] ?? $this->getName(), - 'mempool_class' =>$yaml['class'] ?? 'system', + 'mempool_class' => $yaml['class'] ?? 'system', 'mempool_precision' => $yaml['precision'] ?? 1, 'mempool_descr' => isset($yaml['descr']) ? ucwords(YamlDiscovery::replaceValues('descr', $index, $count, $yaml, $snmp_data)) : 'Memory', 'mempool_used_oid' => $this->getOid('used', $index, $yaml), diff --git a/LibreNMS/Polling/ConnectivityHelper.php b/LibreNMS/Polling/ConnectivityHelper.php index 9db4080e86..43a3203bc6 100644 --- a/LibreNMS/Polling/ConnectivityHelper.php +++ b/LibreNMS/Polling/ConnectivityHelper.php @@ -203,7 +203,7 @@ class ConnectivityHelper private function savePingStats(FpingResponse $ping_response): void { $perf = $ping_response->toModel(); - $perf->debug = ['poller_name'=>Config::get('distributed_poller_name')]; + $perf->debug = ['poller_name' => Config::get('distributed_poller_name')]; if (! $ping_response->success() && Config::get('debug.run_trace', false)) { $perf->debug = array_merge($perf->debug, $this->traceroute()); } diff --git a/LibreNMS/RRDRecursiveFilterIterator.php b/LibreNMS/RRDRecursiveFilterIterator.php index 3d13399078..3a9a3e3410 100644 --- a/LibreNMS/RRDRecursiveFilterIterator.php +++ b/LibreNMS/RRDRecursiveFilterIterator.php @@ -44,6 +44,7 @@ class RRDRecursiveFilterIterator extends \RecursiveFilterIterator // We want to search into directories return true; } + // Matches files with .rrd in the filename. // We are only searching rrd folder, but there could be other files and we don't want to cause a stink. return strpos($filename, '.rrd') !== false; diff --git a/LibreNMS/Util/Rewrite.php b/LibreNMS/Util/Rewrite.php index 0816c49944..27d1fb64ec 100644 --- a/LibreNMS/Util/Rewrite.php +++ b/LibreNMS/Util/Rewrite.php @@ -33,21 +33,21 @@ class Rewrite public static function normalizeIfType($type) { $rewrite_iftype = [ - 'frameRelay' => 'Frame Relay', - 'ethernetCsmacd' => 'Ethernet', - 'softwareLoopback' => 'Loopback', - 'tunnel' => 'Tunnel', - 'propVirtual' => 'Virtual Int', - 'ppp' => 'PPP', - 'ds1' => 'DS1', - 'pos' => 'POS', - 'sonet' => 'SONET', - 'slip' => 'SLIP', - 'mpls' => 'MPLS Layer', - 'l2vlan' => 'VLAN Subif', - 'atm' => 'ATM', - 'aal5' => 'ATM AAL5', - 'atmSubInterface' => 'ATM Subif', + 'frameRelay' => 'Frame Relay', + 'ethernetCsmacd' => 'Ethernet', + 'softwareLoopback' => 'Loopback', + 'tunnel' => 'Tunnel', + 'propVirtual' => 'Virtual Int', + 'ppp' => 'PPP', + 'ds1' => 'DS1', + 'pos' => 'POS', + 'sonet' => 'SONET', + 'slip' => 'SLIP', + 'mpls' => 'MPLS Layer', + 'l2vlan' => 'VLAN Subif', + 'atm' => 'ATM', + 'aal5' => 'ATM AAL5', + 'atmSubInterface' => 'ATM Subif', 'propPointToPointSerial' => 'PtP Serial', ]; @@ -84,25 +84,25 @@ class Rewrite public static function normalizeIfName($name) { $rewrite_ifname = [ - 'ether' => 'Ether', - 'gig' => 'Gig', - 'fast' => 'Fast', - 'ten' => 'Ten', - '-802.1q vlan subif' => '', - '-802.1q' => '', - 'bvi' => 'BVI', - 'vlan' => 'Vlan', - 'tunnel' => 'Tunnel', - 'serial' => 'Serial', - '-aal5 layer' => ' aal5', - 'null' => 'Null', - 'atm' => 'ATM', - 'port-channel' => 'Port-Channel', - 'dial' => 'Dial', + 'ether' => 'Ether', + 'gig' => 'Gig', + 'fast' => 'Fast', + 'ten' => 'Ten', + '-802.1q vlan subif' => '', + '-802.1q' => '', + 'bvi' => 'BVI', + 'vlan' => 'Vlan', + 'tunnel' => 'Tunnel', + 'serial' => 'Serial', + '-aal5 layer' => ' aal5', + 'null' => 'Null', + 'atm' => 'ATM', + 'port-channel' => 'Port-Channel', + 'dial' => 'Dial', 'hp procurve switch software loopback interface' => 'Loopback Interface', - 'control plane interface' => 'Control Plane', - 'loop' => 'Loop', - 'bundle-ether' => 'Bundle-Ether', + 'control plane interface' => 'Control Plane', + 'loop' => 'Loop', + 'bundle-ether' => 'Bundle-Ether', ]; return str_ireplace(array_keys($rewrite_ifname), array_values($rewrite_ifname), $name); @@ -111,25 +111,25 @@ class Rewrite public static function shortenIfName($name) { $rewrite_shortif = [ - 'tengigabitethernet' => 'Te', + 'tengigabitethernet' => 'Te', 'ten-gigabitethernet' => 'Te', - 'tengige' => 'Te', - 'gigabitethernet' => 'Gi', - 'fastethernet' => 'Fa', - 'ethernet' => 'Et', - 'serial' => 'Se', - 'pos' => 'Pos', - 'port-channel' => 'Po', - 'atm' => 'Atm', - 'null' => 'Null', - 'loopback' => 'Lo', - 'dialer' => 'Di', - 'vlan' => 'Vlan', - 'tunnel' => 'Tunnel', - 'serviceinstance' => 'SI', - 'dwdm' => 'DWDM', - 'bundle-ether' => 'BE', - 'bridge-aggregation' => 'BA', + 'tengige' => 'Te', + 'gigabitethernet' => 'Gi', + 'fastethernet' => 'Fa', + 'ethernet' => 'Et', + 'serial' => 'Se', + 'pos' => 'Pos', + 'port-channel' => 'Po', + 'atm' => 'Atm', + 'null' => 'Null', + 'loopback' => 'Lo', + 'dialer' => 'Di', + 'vlan' => 'Vlan', + 'tunnel' => 'Tunnel', + 'serviceinstance' => 'SI', + 'dwdm' => 'DWDM', + 'bundle-ether' => 'BE', + 'bridge-aggregation' => 'BA', ]; return str_ireplace(array_keys($rewrite_shortif), array_values($rewrite_shortif), $name); @@ -213,167 +213,167 @@ class Rewrite public static function vmwareGuest($guest_id) { $guests = [ - 'asianux3_64Guest' => 'Asianux Server 3 (64 bit)', - 'asianux3Guest' => 'Asianux Server 3', - 'asianux4_64Guest' => 'Asianux Server 4 (64 bit)', - 'asianux4Guest' => 'Asianux Server 4', - 'asianux5_64Guest' => 'Asianux Server 5 (64 bit)', - 'asianux7_64Guest' => 'Asianux Server 7 (64 bit)', - 'asianux8_64Guest' => 'Asianux Server 8 (64 bit)', - 'centos6_64Guest' => 'CentOS 6 (64-bit)', - 'centos64Guest' => 'CentOS 4/5 (64-bit)', - 'centos6Guest' => 'CentOS 6', - 'centos7_64Guest' => 'CentOS 7 (64-bit)', - 'centos7Guest' => 'CentOS 7', - 'centos8_64Guest' => 'CentOS 8 (64-bit)', - 'centosGuest' => 'CentOS 4/5', - 'coreos64Guest' => 'CoreOS Linux (64 bit)', - 'darwin10_64Guest' => 'Mac OS 10.6 (64 bit)', - 'darwin10Guest' => 'Mac OS 10.6', - 'darwin11_64Guest' => 'Mac OS 10.7 (64 bit)', - 'darwin11Guest' => 'Mac OS 10.7', - 'darwin12_64Guest' => 'Mac OS 10.8 (64 bit)', - 'darwin13_64Guest' => 'Mac OS 10.9 (64 bit)', - 'darwin14_64Guest' => 'Mac OS 10.10 (64 bit)', - 'darwin15_64Guest' => 'Mac OS 10.11 (64 bit)', - 'darwin16_64Guest' => 'Mac OS 10.12 (64 bit)', - 'darwin17_64Guest' => 'macOS 10.13 (64 bit)', - 'darwin18_64Guest' => 'macOS 10.14 (64 bit)', - 'darwin64Guest' => 'Mac OS 10.5 (64 bit)', - 'darwinGuest' => 'Mac OS 10.5', - 'debian10_64Guest' => 'Debian GNU/Linux 10 (64 bit)', - 'debian10Guest' => 'Debian GNU/Linux 10', - 'debian4_64Guest' => 'Debian GNU/Linux 4 (64 bit)', - 'debian4Guest' => 'Debian GNU/Linux 4', - 'debian5_64Guest' => 'Debian GNU/Linux 5 (64 bit)', - 'debian5Guest' => 'Debian GNU/Linux 5', - 'debian6_64Guest' => 'Debian GNU/Linux 6 (64 bit)', - 'debian6Guest' => 'Debian GNU/Linux 6', - 'debian7_64Guest' => 'Debian GNU/Linux 7 (64 bit)', - 'debian7Guest' => 'Debian GNU/Linux 7', - 'debian8_64Guest' => 'Debian GNU/Linux 8 (64 bit)', - 'debian8Guest' => 'Debian GNU/Linux 8', - 'debian9_64Guest' => 'Debian GNU/Linux 9 (64 bit)', - 'debian9Guest' => 'Debian GNU/Linux 9', - 'dosGuest' => 'MS-DOS.', - 'eComStation2Guest' => 'eComStation 2.0', - 'eComStationGuest' => 'eComStation 1.x', - 'fedora64Guest' => 'Fedora Linux (64 bit)', - 'fedoraGuest' => 'Fedora Linux', - 'freebsd11_64Guest' => 'FreeBSD 11 x64', - 'freebsd11Guest' => 'FreeBSD 11', - 'freebsd12_64Guest' => 'FreeBSD 12 x64', - 'freebsd12Guest' => 'FreeBSD 12', - 'freebsd64Guest' => 'FreeBSD x64', - 'freebsdGuest' => 'FreeBSD', - 'genericLinuxGuest' => 'Other Linux', - 'mandrakeGuest' => 'Mandrake Linux', - 'mandriva64Guest' => 'Mandriva Linux (64 bit)', - 'mandrivaGuest' => 'Mandriva Linux', - 'netware4Guest' => 'Novell NetWare 4', - 'netware5Guest' => 'Novell NetWare 5.1', - 'netware6Guest' => 'Novell NetWare 6.x', - 'nld9Guest' => 'Novell Linux Desktop 9', - 'oesGuest' => 'Open Enterprise Server', - 'openServer5Guest' => 'SCO OpenServer 5', - 'openServer6Guest' => 'SCO OpenServer 6', - 'opensuse64Guest' => 'OpenSUSE Linux (64 bit)', - 'opensuseGuest' => 'OpenSUSE Linux', - 'oracleLinux6_64Guest' => 'Oracle 6 (64-bit)', - 'oracleLinux64Guest' => 'Oracle Linux 4/5 (64-bit)', - 'oracleLinux6Guest' => 'Oracle 6', - 'oracleLinux7_64Guest' => 'Oracle 7 (64-bit)', - 'oracleLinux7Guest' => 'Oracle 7', - 'oracleLinux8_64Guest' => 'Oracle 8 (64-bit)', - 'oracleLinuxGuest' => 'Oracle Linux 4/5', - 'os2Guest' => 'OS/2', - 'other24xLinux64Guest' => 'Linux 2.4x Kernel (64 bit) (experimental)', - 'other24xLinuxGuest' => 'Linux 2.4x Kernel', - 'other26xLinux64Guest' => 'Linux 2.6x Kernel (64 bit) (experimental)', - 'other26xLinuxGuest' => 'Linux 2.6x Kernel', - 'other3xLinux64Guest' => 'Linux 3.x Kernel (64 bit)', - 'other3xLinuxGuest' => 'Linux 3.x Kernel', - 'other4xLinux64Guest' => 'Linux 4.x Kernel (64 bit)', - 'other4xLinuxGuest' => 'Linux 4.x Kernel', - 'otherGuest' => 'Other Operating System', - 'otherGuest64' => 'Other Operating System (64 bit) (experimental)', - 'otherLinux64Guest' => 'Linux (64 bit) (experimental)', - 'otherLinuxGuest' => 'Linux 2.2x Kernel', - 'redhatGuest' => 'Red Hat Linux 2.1', - 'rhel2Guest' => 'Red Hat Enterprise Linux 2', - 'rhel3_64Guest' => 'Red Hat Enterprise Linux 3 (64 bit)', - 'rhel3Guest' => 'Red Hat Enterprise Linux 3', - 'rhel4_64Guest' => 'Red Hat Enterprise Linux 4 (64 bit)', - 'rhel4Guest' => 'Red Hat Enterprise Linux 4', - 'rhel5_64Guest' => 'Red Hat Enterprise Linux 5 (64 bit) (experimental)', - 'rhel5Guest' => 'Red Hat Enterprise Linux 5', - 'rhel6_64Guest' => 'Red Hat Enterprise Linux 6 (64 bit)', - 'rhel6Guest' => 'Red Hat Enterprise Linux 6', - 'rhel7_64Guest' => 'Red Hat Enterprise Linux 7 (64 bit)', - 'rhel7Guest' => 'Red Hat Enterprise Linux 7', - 'rhel8_64Guest' => 'Red Hat Enterprise Linux 8 (64 bit)', - 'sjdsGuest' => 'Sun Java Desktop System', - 'sles10_64Guest' => 'Suse Linux Enterprise Server 10 (64 bit) (experimental)', - 'sles10Guest' => 'Suse linux Enterprise Server 10', - 'sles11_64Guest' => 'Suse Linux Enterprise Server 11 (64 bit)', - 'sles11Guest' => 'Suse linux Enterprise Server 11', - 'sles12_64Guest' => 'Suse Linux Enterprise Server 12 (64 bit)', - 'sles12Guest' => 'Suse linux Enterprise Server 12', - 'sles15_64Guest' => 'Suse Linux Enterprise Server 15 (64 bit)', - 'sles64Guest' => 'Suse Linux Enterprise Server 9 (64 bit)', - 'slesGuest' => 'Suse Linux Enterprise Server 9', - 'solaris10_64Guest' => 'Solaris 10 (64 bit) (experimental)', - 'solaris10Guest' => 'Solaris 10 (32 bit) (experimental)', - 'solaris11_64Guest' => 'Solaris 11 (64 bit)', - 'solaris6Guest' => 'Solaris 6', - 'solaris7Guest' => 'Solaris 7', - 'solaris8Guest' => 'Solaris 8', - 'solaris9Guest' => 'Solaris 9', - 'suse64Guest' => 'Suse Linux (64 bit)', - 'suseGuest' => 'Suse Linux', - 'turboLinux64Guest' => 'Turbolinux (64 bit)', - 'turboLinuxGuest' => 'Turbolinux', - 'ubuntu64Guest' => 'Ubuntu Linux (64 bit)', - 'ubuntuGuest' => 'Ubuntu Linux', - 'unixWare7Guest' => 'SCO UnixWare 7', - 'vmkernel5Guest' => 'VMware ESX 5', - 'vmkernel65Guest' => 'VMware ESX 6.5', - 'vmkernel6Guest' => 'VMware ESX 6', - 'vmkernelGuest' => 'VMware ESX 4', - 'vmwarePhoton64Guest' => 'VMware Photon (64 bit)', - 'win2000AdvServGuest' => 'Windows 2000 Advanced Server', - 'win2000ProGuest' => 'Windows 2000 Professional', - 'win2000ServGuest' => 'Windows 2000 Server', - 'win31Guest' => 'Windows 3.1', - 'win95Guest' => 'Windows 95', - 'win98Guest' => 'Windows 98', - 'windows7_64Guest' => 'Windows 7 (64 bit)', - 'windows7Guest' => 'Windows 7', - 'windows7Server64Guest' => 'Windows Server 2008 R2 (64 bit)', - 'windows8_64Guest' => 'Windows 8 (64 bit)', - 'windows8Guest' => 'Windows 8', - 'windows8Server64Guest' => 'Windows 8 Server (64 bit)', - 'windows9_64Guest' => 'Windows 10 (64 bit)', - 'windows9Guest' => 'Windows 10', - 'windows9Server64Guest' => 'Windows 10 Server (64 bit)', - 'windowsHyperVGuest' => 'Windows Hyper-V', - 'winLonghorn64Guest' => 'Windows Longhorn (64 bit) (experimental)', - 'winLonghornGuest' => 'Windows Longhorn (experimental)', - 'winMeGuest' => 'Windows Millenium Edition', - 'winNetBusinessGuest' => 'Windows Small Business Server 2003', + 'asianux3_64Guest' => 'Asianux Server 3 (64 bit)', + 'asianux3Guest' => 'Asianux Server 3', + 'asianux4_64Guest' => 'Asianux Server 4 (64 bit)', + 'asianux4Guest' => 'Asianux Server 4', + 'asianux5_64Guest' => 'Asianux Server 5 (64 bit)', + 'asianux7_64Guest' => 'Asianux Server 7 (64 bit)', + 'asianux8_64Guest' => 'Asianux Server 8 (64 bit)', + 'centos6_64Guest' => 'CentOS 6 (64-bit)', + 'centos64Guest' => 'CentOS 4/5 (64-bit)', + 'centos6Guest' => 'CentOS 6', + 'centos7_64Guest' => 'CentOS 7 (64-bit)', + 'centos7Guest' => 'CentOS 7', + 'centos8_64Guest' => 'CentOS 8 (64-bit)', + 'centosGuest' => 'CentOS 4/5', + 'coreos64Guest' => 'CoreOS Linux (64 bit)', + 'darwin10_64Guest' => 'Mac OS 10.6 (64 bit)', + 'darwin10Guest' => 'Mac OS 10.6', + 'darwin11_64Guest' => 'Mac OS 10.7 (64 bit)', + 'darwin11Guest' => 'Mac OS 10.7', + 'darwin12_64Guest' => 'Mac OS 10.8 (64 bit)', + 'darwin13_64Guest' => 'Mac OS 10.9 (64 bit)', + 'darwin14_64Guest' => 'Mac OS 10.10 (64 bit)', + 'darwin15_64Guest' => 'Mac OS 10.11 (64 bit)', + 'darwin16_64Guest' => 'Mac OS 10.12 (64 bit)', + 'darwin17_64Guest' => 'macOS 10.13 (64 bit)', + 'darwin18_64Guest' => 'macOS 10.14 (64 bit)', + 'darwin64Guest' => 'Mac OS 10.5 (64 bit)', + 'darwinGuest' => 'Mac OS 10.5', + 'debian10_64Guest' => 'Debian GNU/Linux 10 (64 bit)', + 'debian10Guest' => 'Debian GNU/Linux 10', + 'debian4_64Guest' => 'Debian GNU/Linux 4 (64 bit)', + 'debian4Guest' => 'Debian GNU/Linux 4', + 'debian5_64Guest' => 'Debian GNU/Linux 5 (64 bit)', + 'debian5Guest' => 'Debian GNU/Linux 5', + 'debian6_64Guest' => 'Debian GNU/Linux 6 (64 bit)', + 'debian6Guest' => 'Debian GNU/Linux 6', + 'debian7_64Guest' => 'Debian GNU/Linux 7 (64 bit)', + 'debian7Guest' => 'Debian GNU/Linux 7', + 'debian8_64Guest' => 'Debian GNU/Linux 8 (64 bit)', + 'debian8Guest' => 'Debian GNU/Linux 8', + 'debian9_64Guest' => 'Debian GNU/Linux 9 (64 bit)', + 'debian9Guest' => 'Debian GNU/Linux 9', + 'dosGuest' => 'MS-DOS.', + 'eComStation2Guest' => 'eComStation 2.0', + 'eComStationGuest' => 'eComStation 1.x', + 'fedora64Guest' => 'Fedora Linux (64 bit)', + 'fedoraGuest' => 'Fedora Linux', + 'freebsd11_64Guest' => 'FreeBSD 11 x64', + 'freebsd11Guest' => 'FreeBSD 11', + 'freebsd12_64Guest' => 'FreeBSD 12 x64', + 'freebsd12Guest' => 'FreeBSD 12', + 'freebsd64Guest' => 'FreeBSD x64', + 'freebsdGuest' => 'FreeBSD', + 'genericLinuxGuest' => 'Other Linux', + 'mandrakeGuest' => 'Mandrake Linux', + 'mandriva64Guest' => 'Mandriva Linux (64 bit)', + 'mandrivaGuest' => 'Mandriva Linux', + 'netware4Guest' => 'Novell NetWare 4', + 'netware5Guest' => 'Novell NetWare 5.1', + 'netware6Guest' => 'Novell NetWare 6.x', + 'nld9Guest' => 'Novell Linux Desktop 9', + 'oesGuest' => 'Open Enterprise Server', + 'openServer5Guest' => 'SCO OpenServer 5', + 'openServer6Guest' => 'SCO OpenServer 6', + 'opensuse64Guest' => 'OpenSUSE Linux (64 bit)', + 'opensuseGuest' => 'OpenSUSE Linux', + 'oracleLinux6_64Guest' => 'Oracle 6 (64-bit)', + 'oracleLinux64Guest' => 'Oracle Linux 4/5 (64-bit)', + 'oracleLinux6Guest' => 'Oracle 6', + 'oracleLinux7_64Guest' => 'Oracle 7 (64-bit)', + 'oracleLinux7Guest' => 'Oracle 7', + 'oracleLinux8_64Guest' => 'Oracle 8 (64-bit)', + 'oracleLinuxGuest' => 'Oracle Linux 4/5', + 'os2Guest' => 'OS/2', + 'other24xLinux64Guest' => 'Linux 2.4x Kernel (64 bit) (experimental)', + 'other24xLinuxGuest' => 'Linux 2.4x Kernel', + 'other26xLinux64Guest' => 'Linux 2.6x Kernel (64 bit) (experimental)', + 'other26xLinuxGuest' => 'Linux 2.6x Kernel', + 'other3xLinux64Guest' => 'Linux 3.x Kernel (64 bit)', + 'other3xLinuxGuest' => 'Linux 3.x Kernel', + 'other4xLinux64Guest' => 'Linux 4.x Kernel (64 bit)', + 'other4xLinuxGuest' => 'Linux 4.x Kernel', + 'otherGuest' => 'Other Operating System', + 'otherGuest64' => 'Other Operating System (64 bit) (experimental)', + 'otherLinux64Guest' => 'Linux (64 bit) (experimental)', + 'otherLinuxGuest' => 'Linux 2.2x Kernel', + 'redhatGuest' => 'Red Hat Linux 2.1', + 'rhel2Guest' => 'Red Hat Enterprise Linux 2', + 'rhel3_64Guest' => 'Red Hat Enterprise Linux 3 (64 bit)', + 'rhel3Guest' => 'Red Hat Enterprise Linux 3', + 'rhel4_64Guest' => 'Red Hat Enterprise Linux 4 (64 bit)', + 'rhel4Guest' => 'Red Hat Enterprise Linux 4', + 'rhel5_64Guest' => 'Red Hat Enterprise Linux 5 (64 bit) (experimental)', + 'rhel5Guest' => 'Red Hat Enterprise Linux 5', + 'rhel6_64Guest' => 'Red Hat Enterprise Linux 6 (64 bit)', + 'rhel6Guest' => 'Red Hat Enterprise Linux 6', + 'rhel7_64Guest' => 'Red Hat Enterprise Linux 7 (64 bit)', + 'rhel7Guest' => 'Red Hat Enterprise Linux 7', + 'rhel8_64Guest' => 'Red Hat Enterprise Linux 8 (64 bit)', + 'sjdsGuest' => 'Sun Java Desktop System', + 'sles10_64Guest' => 'Suse Linux Enterprise Server 10 (64 bit) (experimental)', + 'sles10Guest' => 'Suse linux Enterprise Server 10', + 'sles11_64Guest' => 'Suse Linux Enterprise Server 11 (64 bit)', + 'sles11Guest' => 'Suse linux Enterprise Server 11', + 'sles12_64Guest' => 'Suse Linux Enterprise Server 12 (64 bit)', + 'sles12Guest' => 'Suse linux Enterprise Server 12', + 'sles15_64Guest' => 'Suse Linux Enterprise Server 15 (64 bit)', + 'sles64Guest' => 'Suse Linux Enterprise Server 9 (64 bit)', + 'slesGuest' => 'Suse Linux Enterprise Server 9', + 'solaris10_64Guest' => 'Solaris 10 (64 bit) (experimental)', + 'solaris10Guest' => 'Solaris 10 (32 bit) (experimental)', + 'solaris11_64Guest' => 'Solaris 11 (64 bit)', + 'solaris6Guest' => 'Solaris 6', + 'solaris7Guest' => 'Solaris 7', + 'solaris8Guest' => 'Solaris 8', + 'solaris9Guest' => 'Solaris 9', + 'suse64Guest' => 'Suse Linux (64 bit)', + 'suseGuest' => 'Suse Linux', + 'turboLinux64Guest' => 'Turbolinux (64 bit)', + 'turboLinuxGuest' => 'Turbolinux', + 'ubuntu64Guest' => 'Ubuntu Linux (64 bit)', + 'ubuntuGuest' => 'Ubuntu Linux', + 'unixWare7Guest' => 'SCO UnixWare 7', + 'vmkernel5Guest' => 'VMware ESX 5', + 'vmkernel65Guest' => 'VMware ESX 6.5', + 'vmkernel6Guest' => 'VMware ESX 6', + 'vmkernelGuest' => 'VMware ESX 4', + 'vmwarePhoton64Guest' => 'VMware Photon (64 bit)', + 'win2000AdvServGuest' => 'Windows 2000 Advanced Server', + 'win2000ProGuest' => 'Windows 2000 Professional', + 'win2000ServGuest' => 'Windows 2000 Server', + 'win31Guest' => 'Windows 3.1', + 'win95Guest' => 'Windows 95', + 'win98Guest' => 'Windows 98', + 'windows7_64Guest' => 'Windows 7 (64 bit)', + 'windows7Guest' => 'Windows 7', + 'windows7Server64Guest' => 'Windows Server 2008 R2 (64 bit)', + 'windows8_64Guest' => 'Windows 8 (64 bit)', + 'windows8Guest' => 'Windows 8', + 'windows8Server64Guest' => 'Windows 8 Server (64 bit)', + 'windows9_64Guest' => 'Windows 10 (64 bit)', + 'windows9Guest' => 'Windows 10', + 'windows9Server64Guest' => 'Windows 10 Server (64 bit)', + 'windowsHyperVGuest' => 'Windows Hyper-V', + 'winLonghorn64Guest' => 'Windows Longhorn (64 bit) (experimental)', + 'winLonghornGuest' => 'Windows Longhorn (experimental)', + 'winMeGuest' => 'Windows Millenium Edition', + 'winNetBusinessGuest' => 'Windows Small Business Server 2003', 'winNetDatacenter64Guest' => 'Windows Server 2003, Datacenter Edition (64 bit) (experimental)', - 'winNetDatacenterGuest' => 'Windows Server 2003, Datacenter Edition', + 'winNetDatacenterGuest' => 'Windows Server 2003, Datacenter Edition', 'winNetEnterprise64Guest' => 'Windows Server 2003, Enterprise Edition (64 bit)', - 'winNetEnterpriseGuest' => 'Windows Server 2003, Enterprise Edition', - 'winNetStandard64Guest' => 'Windows Server 2003, Standard Edition (64 bit)', - 'winNetStandardGuest' => 'Windows Server 2003, Standard Edition', - 'winNetWebGuest' => 'Windows Server 2003, Web Edition', - 'winNTGuest' => 'Windows NT 4', - 'winVista64Guest' => 'Windows Vista (64 bit)', - 'winVistaGuest' => 'Windows Vista', - 'winXPHomeGuest' => 'Windows XP Home Edition', - 'winXPPro64Guest' => 'Windows XP Professional Edition (64 bit)', - 'winXPProGuest' => 'Windows XP Professional', + 'winNetEnterpriseGuest' => 'Windows Server 2003, Enterprise Edition', + 'winNetStandard64Guest' => 'Windows Server 2003, Standard Edition (64 bit)', + 'winNetStandardGuest' => 'Windows Server 2003, Standard Edition', + 'winNetWebGuest' => 'Windows Server 2003, Web Edition', + 'winNTGuest' => 'Windows NT 4', + 'winVista64Guest' => 'Windows Vista (64 bit)', + 'winVistaGuest' => 'Windows Vista', + 'winXPHomeGuest' => 'Windows XP Home Edition', + 'winXPPro64Guest' => 'Windows XP Professional Edition (64 bit)', + 'winXPProGuest' => 'Windows XP Professional', ]; return $guests[$guest_id] ?? $guest_id; diff --git a/LibreNMS/Util/Stats.php b/LibreNMS/Util/Stats.php index bb028c15fc..8aeff68493 100644 --- a/LibreNMS/Util/Stats.php +++ b/LibreNMS/Util/Stats.php @@ -99,53 +99,53 @@ class Stats $version = Version::get(); return [ - 'alert_rules' => $this->selectTotal(DB::table('alert_rules')->where('disabled', 0), ['severity']), - 'alert_templates' => $this->selectTotal('alert_templates'), - 'api_tokens' => $this->selectTotal(DB::table('api_tokens')->where('disabled', 0)), - 'applications' => $this->selectTotal('applications', ['app_type']), - 'bgppeer_state' => $this->selectTotal('bgpPeers', ['bgpPeerState']), - 'bgppeer_status' => $this->selectTotal('bgpPeers', ['bgpPeerAdminStatus']), - 'bills' => $this->selectTotal('bills', ['bill_type']), - 'cef' => $this->selectTotal('cef_switching'), - 'cisco_asa' => $this->selectTotal(DB::table('ciscoASA')->where('disabled', 0), ['oid']), - 'mempool' => $this->selectTotal('mempools', ['mempool_descr']), - 'dbschema' => $this->selectStatic(DB::table('migrations')->count()), - 'snmp_version' => $this->selectTotal('devices', ['snmpver']), - 'os' => $this->selectTotal('devices', ['os']), - 'type' => $this->selectTotal('devices', ['type']), - 'hardware' => $this->selectTotal('devices', ['hardware']), - 'ipsec' => $this->selectTotal('ipsec_tunnels'), - 'ipv4_addresses' => $this->selectTotal('ipv4_addresses'), - 'ipv4_macaddress' => $this->selectTotal('ipv4_mac'), - 'ipv4_networks' => $this->selectTotal('ipv4_networks'), - 'ipv6_addresses' => $this->selectTotal('ipv6_addresses'), - 'ipv6_networks' => $this->selectTotal('ipv6_networks'), - 'xdp' => $this->selectTotal('links', ['protocol']), - 'ospf' => $this->selectTotal('ospf_instances', ['ospfVersionNumber']), - 'ospf_links' => $this->selectTotal('ospf_ports', ['ospfIfType']), - 'arch' => $this->selectTotal('packages', ['arch']), - 'pollers' => $this->selectTotal('pollers'), - 'port_type' => $this->selectTotal('ports', ['ifType']), - 'port_ifspeed' => DB::table('ports')->select([DB::raw('COUNT(*) AS `total`'), DB::raw('ROUND(`ifSpeed`/1000/1000) as ifSpeed')])->groupBy(['ifSpeed'])->get(), - 'port_vlans' => $this->selectTotal('ports_vlans', ['state']), - 'processes' => $this->selectTotal('processes'), - 'processors' => $this->selectTotal('processors', ['processor_type']), - 'pseudowires' => $this->selectTotal('pseudowires'), - 'sensors' => $this->selectTotal('sensors', ['sensor_class']), - 'sla' => $this->selectTotal('slas', ['rtt_type']), - 'wireless' => $this->selectTotal('wireless_sensors', ['sensor_class']), - 'storage' => $this->selectTotal('storage', ['storage_type']), - 'toner' => $this->selectTotal('printer_supplies', ['supply_type']), - 'vlans' => $this->selectTotal('vlans', ['vlan_type']), - 'vminfo' => $this->selectTotal('vminfo', ['vm_type']), - 'vmware' => $this->selectTotal('vminfo'), - 'vrfs' => $this->selectTotal('vrfs'), + 'alert_rules' => $this->selectTotal(DB::table('alert_rules')->where('disabled', 0), ['severity']), + 'alert_templates' => $this->selectTotal('alert_templates'), + 'api_tokens' => $this->selectTotal(DB::table('api_tokens')->where('disabled', 0)), + 'applications' => $this->selectTotal('applications', ['app_type']), + 'bgppeer_state' => $this->selectTotal('bgpPeers', ['bgpPeerState']), + 'bgppeer_status' => $this->selectTotal('bgpPeers', ['bgpPeerAdminStatus']), + 'bills' => $this->selectTotal('bills', ['bill_type']), + 'cef' => $this->selectTotal('cef_switching'), + 'cisco_asa' => $this->selectTotal(DB::table('ciscoASA')->where('disabled', 0), ['oid']), + 'mempool' => $this->selectTotal('mempools', ['mempool_descr']), + 'dbschema' => $this->selectStatic(DB::table('migrations')->count()), + 'snmp_version' => $this->selectTotal('devices', ['snmpver']), + 'os' => $this->selectTotal('devices', ['os']), + 'type' => $this->selectTotal('devices', ['type']), + 'hardware' => $this->selectTotal('devices', ['hardware']), + 'ipsec' => $this->selectTotal('ipsec_tunnels'), + 'ipv4_addresses' => $this->selectTotal('ipv4_addresses'), + 'ipv4_macaddress' => $this->selectTotal('ipv4_mac'), + 'ipv4_networks' => $this->selectTotal('ipv4_networks'), + 'ipv6_addresses' => $this->selectTotal('ipv6_addresses'), + 'ipv6_networks' => $this->selectTotal('ipv6_networks'), + 'xdp' => $this->selectTotal('links', ['protocol']), + 'ospf' => $this->selectTotal('ospf_instances', ['ospfVersionNumber']), + 'ospf_links' => $this->selectTotal('ospf_ports', ['ospfIfType']), + 'arch' => $this->selectTotal('packages', ['arch']), + 'pollers' => $this->selectTotal('pollers'), + 'port_type' => $this->selectTotal('ports', ['ifType']), + 'port_ifspeed' => DB::table('ports')->select([DB::raw('COUNT(*) AS `total`'), DB::raw('ROUND(`ifSpeed`/1000/1000) as ifSpeed')])->groupBy(['ifSpeed'])->get(), + 'port_vlans' => $this->selectTotal('ports_vlans', ['state']), + 'processes' => $this->selectTotal('processes'), + 'processors' => $this->selectTotal('processors', ['processor_type']), + 'pseudowires' => $this->selectTotal('pseudowires'), + 'sensors' => $this->selectTotal('sensors', ['sensor_class']), + 'sla' => $this->selectTotal('slas', ['rtt_type']), + 'wireless' => $this->selectTotal('wireless_sensors', ['sensor_class']), + 'storage' => $this->selectTotal('storage', ['storage_type']), + 'toner' => $this->selectTotal('printer_supplies', ['supply_type']), + 'vlans' => $this->selectTotal('vlans', ['vlan_type']), + 'vminfo' => $this->selectTotal('vminfo', ['vm_type']), + 'vmware' => $this->selectTotal('vminfo'), + 'vrfs' => $this->selectTotal('vrfs'), 'database_version' => $this->selectStatic($version->databaseServer()), - 'php_version' => $this->selectStatic(phpversion()), - 'python_version' => $this->selectStatic($version->python()), - 'rrdtool_version' => $this->selectStatic($version->rrdtool()), - 'netsnmp_version' => $this->selectStatic($version->netSnmp()), - 'os_version' => $this->selectStatic($version->os()), + 'php_version' => $this->selectStatic(phpversion()), + 'python_version' => $this->selectStatic($version->python()), + 'rrdtool_version' => $this->selectStatic($version->rrdtool()), + 'netsnmp_version' => $this->selectStatic($version->netSnmp()), + 'os_version' => $this->selectStatic($version->os()), 'librenms_release' => $this->selectStatic($version->release(), 'release'), ]; } diff --git a/app/ApiClients/NominatimApi.php b/app/ApiClients/NominatimApi.php index c72c1fd62d..da1e450c12 100644 --- a/app/ApiClients/NominatimApi.php +++ b/app/ApiClients/NominatimApi.php @@ -60,7 +60,7 @@ class NominatimApi extends BaseApi implements Geocoder ], 'headers' => [ 'User-Agent' => 'LibreNMS', - 'Accept' => 'application/json', + 'Accept' => 'application/json', ], ]; } diff --git a/app/Console/Commands/DeviceAdd.php b/app/Console/Commands/DeviceAdd.php index 2571ff39e1..c86a0948e2 100644 --- a/app/Console/Commands/DeviceAdd.php +++ b/app/Console/Commands/DeviceAdd.php @@ -105,10 +105,10 @@ class DeviceAdd extends LnmsCommand 'poller_group' => $this->option('poller-group'), 'port_association_mode' => PortAssociationMode::getId($this->option('port-association-mode')), 'community' => $this->option('community'), - 'authlevel' => ($auth ? 'auth' : 'noAuth') . (($priv && $auth) ? 'Priv' : 'NoPriv'), - 'authname' => $this->option('security-name'), - 'authpass' => $this->option('auth-password'), - 'authalgo' => $this->option('auth-protocol'), + 'authlevel' => ($auth ? 'auth' : 'noAuth') . (($priv && $auth) ? 'Priv' : 'NoPriv'), + 'authname' => $this->option('security-name'), + 'authpass' => $this->option('auth-password'), + 'authalgo' => $this->option('auth-protocol'), 'cryptopass' => $this->option('privacy-password'), 'cryptoalgo' => $this->option('privacy-protocol'), ]); diff --git a/app/Http/Controllers/AboutController.php b/app/Http/Controllers/AboutController.php index 634a7a87ec..d8e8f3549a 100644 --- a/app/Http/Controllers/AboutController.php +++ b/app/Http/Controllers/AboutController.php @@ -66,7 +66,7 @@ class AboutController extends Controller return view('about.index', [ 'usage_reporting_status' => Config::get('reporting.usage'), 'error_reporting_status' => Config::get('reporting.error'), - 'reporting_clearable' => Callback::whereIn('name', ['uuid', 'error_reporting_uuid'])->exists(), + 'reporting_clearable' => Callback::whereIn('name', ['uuid', 'error_reporting_uuid'])->exists(), 'db_schema' => $version->database(), 'git_log' => $version->git->log(), @@ -90,21 +90,21 @@ class AboutController extends Controller 'stat_hrdev' => HrDevice::count(), 'stat_ipv4_addy' => Ipv4Address::count(), 'stat_ipv4_nets' => Ipv4Network::count(), - 'stat_ipv6_addy' => Ipv6Address::count(), - 'stat_ipv6_nets' => Ipv6Network::count(), - 'stat_memory' => Mempool::count(), - 'stat_ports' => Port::count(), + 'stat_ipv6_addy' => Ipv6Address::count(), + 'stat_ipv6_nets' => Ipv6Network::count(), + 'stat_memory' => Mempool::count(), + 'stat_ports' => Port::count(), 'stat_processors' => Processor::count(), - 'stat_pw' => Pseudowire::count(), - 'stat_sensors' => Sensor::count(), - 'stat_services' => Service::count(), - 'stat_slas' => Sla::count(), - 'stat_storage' => Storage::count(), - 'stat_syslog' => Syslog::count(), - 'stat_toner' => PrinterSupply::count(), - 'stat_vlans' => Vlan::count(), - 'stat_vrf' => Vrf::count(), - 'stat_wireless' => WirelessSensor::count(), + 'stat_pw' => Pseudowire::count(), + 'stat_sensors' => Sensor::count(), + 'stat_services' => Service::count(), + 'stat_slas' => Sla::count(), + 'stat_storage' => Storage::count(), + 'stat_syslog' => Syslog::count(), + 'stat_toner' => PrinterSupply::count(), + 'stat_vlans' => Vlan::count(), + 'stat_vrf' => Vrf::count(), + 'stat_wireless' => WirelessSensor::count(), ]); } diff --git a/app/Http/Controllers/Ajax/BgpSearchController.php b/app/Http/Controllers/Ajax/BgpSearchController.php index edf32e3d27..d18ff8c176 100644 --- a/app/Http/Controllers/Ajax/BgpSearchController.php +++ b/app/Http/Controllers/Ajax/BgpSearchController.php @@ -59,14 +59,14 @@ class BgpSearchController extends SearchController : 'fa fa-external-link-square fa-lg icon-theme'; return [ - 'url' => Url::deviceUrl($peer->device, ['tab' => 'routing', 'proto' => 'bgp']), - 'name' => $peer->bgpPeerIdentifier, + 'url' => Url::deviceUrl($peer->device, ['tab' => 'routing', 'proto' => 'bgp']), + 'name' => $peer->bgpPeerIdentifier, 'description' => $peer->astext, - 'localas' => $peer->device->bgpLocalAs, - 'bgp_image' => $bgp_image, - 'remoteas' => $peer->bgpPeerRemoteAs, - 'colours' => Color::forBgpPeerStatus($peer), - 'hostname' => $peer->device->displayName(), + 'localas' => $peer->device->bgpLocalAs, + 'bgp_image' => $bgp_image, + 'remoteas' => $peer->bgpPeerRemoteAs, + 'colours' => Color::forBgpPeerStatus($peer), + 'hostname' => $peer->device->displayName(), ]; } } diff --git a/app/Http/Controllers/Ajax/PortSearchController.php b/app/Http/Controllers/Ajax/PortSearchController.php index a453846811..ef9d70355d 100644 --- a/app/Http/Controllers/Ajax/PortSearchController.php +++ b/app/Http/Controllers/Ajax/PortSearchController.php @@ -65,12 +65,12 @@ class PortSearchController extends SearchController } return [ - 'url' => Url::portUrl($port), - 'name' => $label, + 'url' => Url::portUrl($port), + 'name' => $label, 'description' => $description, - 'colours' => Color::forPortStatus($port), - 'hostname' => $port->device->displayName(), - 'port_id' => $port->port_id, + 'colours' => Color::forPortStatus($port), + 'hostname' => $port->device->displayName(), + 'port_id' => $port->port_id, ]; } } diff --git a/app/Http/Controllers/Auth/SocialiteController.php b/app/Http/Controllers/Auth/SocialiteController.php index 5afee4c94d..023a3b9edf 100644 --- a/app/Http/Controllers/Auth/SocialiteController.php +++ b/app/Http/Controllers/Auth/SocialiteController.php @@ -135,7 +135,7 @@ class SocialiteController extends Controller $user = User::firstOrNew([ 'auth_type' => "socialite_$provider", - 'auth_id' => $this->socialite_user->getId(), + 'auth_id' => $this->socialite_user->getId(), ]); if ($user->user_id) { diff --git a/app/Http/Controllers/Maps/DeviceDependencyController.php b/app/Http/Controllers/Maps/DeviceDependencyController.php index b5af24652a..01c5b33b47 100644 --- a/app/Http/Controllers/Maps/DeviceDependencyController.php +++ b/app/Http/Controllers/Maps/DeviceDependencyController.php @@ -113,7 +113,7 @@ class DeviceDependencyController extends MapController // List all Device $devices_by_id[] = array_merge( [ - 'id' => $device->device_id, + 'id' => $device->device_id, 'label' => $device->shortDisplayName(), 'title' => Url::deviceLink($device, null, [], 0, 0, 0, 0), 'shape' => 'box', @@ -131,8 +131,8 @@ class DeviceDependencyController extends MapController foreach ($parents as $parent) { $device_associations[] = $parent->device_id; $dependencies[] = [ - 'from' => $device->device_id, - 'to' => $parent->device_id, + 'from' => $device->device_id, + 'to' => $parent->device_id, 'width' => 2, ]; } diff --git a/app/Http/Controllers/Table/CustomersController.php b/app/Http/Controllers/Table/CustomersController.php index 1ba5bacd4e..5ce5b19a1c 100644 --- a/app/Http/Controllers/Table/CustomersController.php +++ b/app/Http/Controllers/Table/CustomersController.php @@ -103,12 +103,12 @@ class CustomersController extends TableController public function formatItem($port) { return [ - 'port_descr_descr' => $port->port_descr_descr, - 'hostname' => Url::deviceLink($port->device), - 'ifDescr' => Url::portLink($port), - 'port_descr_speed' => $port->port_descr_speed, + 'port_descr_descr' => $port->port_descr_descr, + 'hostname' => Url::deviceLink($port->device), + 'ifDescr' => Url::portLink($port), + 'port_descr_speed' => $port->port_descr_speed, 'port_descr_circuit' => $port->port_descr_circuit, - 'port_descr_notes' => $port->port_descr_notes, + 'port_descr_notes' => $port->port_descr_notes, ]; } @@ -124,12 +124,12 @@ class CustomersController extends TableController $graph_data = Html::graphRow($graph_array); return [ - 'port_descr_descr' => $graph_data[0], - 'hostname' => $graph_data[1], - 'ifDescr' => '', - 'port_descr_speed' => '', + 'port_descr_descr' => $graph_data[0], + 'hostname' => $graph_data[1], + 'ifDescr' => '', + 'port_descr_speed' => '', 'port_descr_circuit' => $graph_data[2], - 'port_descr_notes' => $graph_data[3], + 'port_descr_notes' => $graph_data[3], ]; } diff --git a/app/Http/Controllers/Table/EditPortsController.php b/app/Http/Controllers/Table/EditPortsController.php index dc559a35da..e14d58dd2d 100644 --- a/app/Http/Controllers/Table/EditPortsController.php +++ b/app/Http/Controllers/Table/EditPortsController.php @@ -70,18 +70,18 @@ class EditPortsController extends TableController } return [ - 'ifIndex' => $port->ifIndex, - 'ifName' => $port->getLabel(), - 'ifAdminStatus' => $port->ifAdminStatus, - 'ifOperStatus' => '' . $port->ifOperStatus . '', - 'disabled' => 'disabled ? 'checked' : '') . '> + 'ifIndex' => $port->ifIndex, + 'ifName' => $port->getLabel(), + 'ifAdminStatus' => $port->ifAdminStatus, + 'ifOperStatus' => '' . $port->ifOperStatus . '', + 'disabled' => 'disabled ? 'checked' : '') . '> ', - 'ignore' => 'ignore ? 'checked' : '') . '> + 'ignore' => 'ignore ? 'checked' : '') . '> ', - 'port_tune' => '', - 'ifAlias' => '
', - 'ifSpeed' => '
', - 'portGroup' => '
', + 'port_tune' => '', + 'ifAlias' => '
', + 'ifSpeed' => '
', + 'portGroup' => '
', ]; } } diff --git a/app/Http/Controllers/Table/GraylogController.php b/app/Http/Controllers/Table/GraylogController.php index e6c14c3518..b5af307687 100644 --- a/app/Http/Controllers/Table/GraylogController.php +++ b/app/Http/Controllers/Table/GraylogController.php @@ -117,13 +117,13 @@ class GraylogController extends SimpleTableController $facility = $message['message']['facility'] ?? ''; return [ - 'origin' => $origin ? Url::deviceLink($origin) : htmlspecialchars($message['message']['gl2_remote_ip']), - 'severity' => $this->severityLabel($level), + 'origin' => $origin ? Url::deviceLink($origin) : htmlspecialchars($message['message']['gl2_remote_ip']), + 'severity' => $this->severityLabel($level), 'timestamp' => $displayTime, - 'source' => $source ? Url::deviceLink($source) : htmlspecialchars($message['message']['source']), - 'message' => htmlspecialchars($message['message']['message'] ?? ''), - 'facility' => is_numeric($facility) ? "($facility) " . __("syslog.facility.$facility") : $facility, - 'level' => (is_numeric($level) && $level >= 0) ? "($level) " . __("syslog.severity.$level") : $level, + 'source' => $source ? Url::deviceLink($source) : htmlspecialchars($message['message']['source']), + 'message' => htmlspecialchars($message['message']['message'] ?? ''), + 'facility' => is_numeric($facility) ? "($facility) " . __("syslog.facility.$facility") : $facility, + 'level' => (is_numeric($level) && $level >= 0) ? "($level) " . __("syslog.severity.$level") : $level, ]; } @@ -138,7 +138,7 @@ class GraylogController extends SimpleTableController '5' => 'label-info', '6' => 'label-info', '7' => 'label-default', - '' => 'label-info', + '' => 'label-info', ]; $barColor = isset($map[$severity]) ? $map[$severity] : 'label-info'; diff --git a/app/Http/Controllers/Table/InventoryController.php b/app/Http/Controllers/Table/InventoryController.php index b375cb9afa..e73032521d 100644 --- a/app/Http/Controllers/Table/InventoryController.php +++ b/app/Http/Controllers/Table/InventoryController.php @@ -37,7 +37,7 @@ class InventoryController extends TableController return [ 'device' => 'nullable|int', 'descr' => 'nullable|string', - 'model'=> 'nullable|string', + 'model' => 'nullable|string', 'serial' => 'nullable|string', ]; } diff --git a/app/Http/Controllers/Table/MempoolsController.php b/app/Http/Controllers/Table/MempoolsController.php index dd95bc6a25..3850034619 100644 --- a/app/Http/Controllers/Table/MempoolsController.php +++ b/app/Http/Controllers/Table/MempoolsController.php @@ -80,21 +80,21 @@ class MempoolsController extends TableController ]); return [ - 'hostname' => Url::deviceLink($device), + 'hostname' => Url::deviceLink($device), 'mempool_descr' => $graphs[0], - 'graph' => $graphs[1], - 'mempool_used' => $graphs[2], - 'mempool_perc' => $graphs[3], + 'graph' => $graphs[1], + 'mempool_used' => $graphs[2], + 'mempool_perc' => $graphs[3], ]; } /** @var Mempool $mempool */ return [ - 'hostname' => Url::deviceLink($mempool->device), + 'hostname' => Url::deviceLink($mempool->device), 'mempool_descr' => $mempool->mempool_descr, - 'graph' => $this->miniGraph($mempool), - 'mempool_used' => $this->barLink($mempool), - 'mempool_perc' => $mempool->mempool_perc . '%', + 'graph' => $this->miniGraph($mempool), + 'mempool_used' => $this->barLink($mempool), + 'mempool_perc' => $mempool->mempool_perc . '%', ]; } diff --git a/app/Http/Controllers/Widgets/NotesController.php b/app/Http/Controllers/Widgets/NotesController.php index 25206b37da..5104ccdcc7 100644 --- a/app/Http/Controllers/Widgets/NotesController.php +++ b/app/Http/Controllers/Widgets/NotesController.php @@ -44,8 +44,8 @@ class NotesController extends WidgetController } $purifier_config = [ - 'HTML.Allowed' => 'b,iframe[frameborder|src|width|height],i,ul,ol,li,h1,h2,h3,h4,br,p,pre', - 'HTML.Trusted' => true, + 'HTML.Allowed' => 'b,iframe[frameborder|src|width|height],i,ul,ol,li,h1,h2,h3,h4,br,p,pre', + 'HTML.Trusted' => true, 'HTML.SafeIframe' => true, 'URI.SafeIframeRegexp' => '%^(https?:)?//%', ]; diff --git a/app/Models/Device.php b/app/Models/Device.php index e1c3b39d14..30815f39a6 100644 --- a/app/Models/Device.php +++ b/app/Models/Device.php @@ -466,6 +466,7 @@ class Device extends BaseModel if (empty($ip)) { return null; } + // @ suppresses warning, inet_ntop() returns false if it fails return @inet_ntop($ip) ?: null; } diff --git a/app/Models/Eventlog.php b/app/Models/Eventlog.php index 7628dca677..6b596a61ba 100644 --- a/app/Models/Eventlog.php +++ b/app/Models/Eventlog.php @@ -75,7 +75,7 @@ class Eventlog extends DeviceRelatedModel 'datetime' => Carbon::now(), 'severity' => $severity, 'message' => $text, - 'username' => (class_exists('\Auth') && Auth::check()) ? Auth::user()->username : '', + 'username' => (class_exists('\Auth') && Auth::check()) ? Auth::user()->username : '', ]); if (is_numeric($device)) { diff --git a/app/Models/PortGroup.php b/app/Models/PortGroup.php index 95be9ef205..55dff9cec1 100644 --- a/app/Models/PortGroup.php +++ b/app/Models/PortGroup.php @@ -35,6 +35,7 @@ class PortGroup extends BaseModel if ($user->hasGlobalRead()) { return $query; } + // maybe filtered in future return $query; } diff --git a/app/Models/Sensor.php b/app/Models/Sensor.php index d635e1190f..04fd3bb6e7 100644 --- a/app/Models/Sensor.php +++ b/app/Models/Sensor.php @@ -13,36 +13,36 @@ class Sensor extends DeviceRelatedModel public $timestamps = false; protected $primaryKey = 'sensor_id'; protected static $icons = [ - 'airflow' => 'angle-double-right', - 'ber' => 'sort-amount-desc', - 'charge' => 'battery-half', + 'airflow' => 'angle-double-right', + 'ber' => 'sort-amount-desc', + 'charge' => 'battery-half', 'chromatic_dispersion' => 'indent', - 'cooling' => 'thermometer-full', - 'count' => 'hashtag', - 'current' => 'bolt fa-flip-horizontal', - 'dbm' => 'sun-o', - 'delay' => 'clock-o', - 'eer' => 'snowflake-o', - 'fanspeed' => 'refresh', - 'frequency' => 'line-chart', - 'humidity' => 'tint', - 'load' => 'percent', - 'loss' => 'percentage', - 'power' => 'power-off', - 'power_consumed' => 'plug', - 'power_factor' => 'calculator', - 'pressure' => 'thermometer-empty', - 'quality_factor' => 'arrows', - 'runtime' => 'hourglass-half', - 'signal' => 'wifi', - 'snr' => 'signal', - 'state' => 'bullseye', - 'temperature' => 'thermometer-three-quarters', - 'tv_signal' => 'signal', - 'bitrate' => 'bar-chart', - 'voltage' => 'bolt', - 'waterflow' => 'tint', - 'percent' => 'percent', + 'cooling' => 'thermometer-full', + 'count' => 'hashtag', + 'current' => 'bolt fa-flip-horizontal', + 'dbm' => 'sun-o', + 'delay' => 'clock-o', + 'eer' => 'snowflake-o', + 'fanspeed' => 'refresh', + 'frequency' => 'line-chart', + 'humidity' => 'tint', + 'load' => 'percent', + 'loss' => 'percentage', + 'power' => 'power-off', + 'power_consumed' => 'plug', + 'power_factor' => 'calculator', + 'pressure' => 'thermometer-empty', + 'quality_factor' => 'arrows', + 'runtime' => 'hourglass-half', + 'signal' => 'wifi', + 'snr' => 'signal', + 'state' => 'bullseye', + 'temperature' => 'thermometer-three-quarters', + 'tv_signal' => 'signal', + 'bitrate' => 'bar-chart', + 'voltage' => 'bolt', + 'waterflow' => 'tint', + 'percent' => 'percent', ]; // ---- Helper Functions ---- diff --git a/app/Plugins/Hooks/DeviceOverviewHook.php b/app/Plugins/Hooks/DeviceOverviewHook.php index 44a255fa64..f5425a981d 100644 --- a/app/Plugins/Hooks/DeviceOverviewHook.php +++ b/app/Plugins/Hooks/DeviceOverviewHook.php @@ -43,7 +43,7 @@ abstract class DeviceOverviewHook { return [ 'title' => __CLASS__, - 'device' => $device, + 'device' => $device, ]; } diff --git a/app/Plugins/Hooks/PortTabHook.php b/app/Plugins/Hooks/PortTabHook.php index af7b6541d0..265440cd34 100644 --- a/app/Plugins/Hooks/PortTabHook.php +++ b/app/Plugins/Hooks/PortTabHook.php @@ -45,7 +45,7 @@ abstract class PortTabHook implements Hook { return [ 'title' => __CLASS__, - 'port' => $port, + 'port' => $port, ]; } diff --git a/billing-calculate.php b/billing-calculate.php index a448e24677..2f4fd4fb33 100755 --- a/billing-calculate.php +++ b/billing-calculate.php @@ -74,17 +74,17 @@ foreach (dbFetchRows('SELECT * FROM `bills` ORDER BY `bill_id`') as $bill) { if ($i == '0') { $update = [ - 'rate_95th' => $rate_data['rate_95th'], - 'rate_95th_in' => $rate_data['rate_95th_in'], - 'rate_95th_out' => $rate_data['rate_95th_out'], - 'dir_95th' => $rate_data['dir_95th'], - 'total_data' => $rate_data['total_data'], - 'total_data_in' => $rate_data['total_data_in'], - 'total_data_out' => $rate_data['total_data_out'], - 'rate_average' => $rate_data['rate_average'], - 'rate_average_in' => $rate_data['rate_average_in'], + 'rate_95th' => $rate_data['rate_95th'], + 'rate_95th_in' => $rate_data['rate_95th_in'], + 'rate_95th_out' => $rate_data['rate_95th_out'], + 'dir_95th' => $rate_data['dir_95th'], + 'total_data' => $rate_data['total_data'], + 'total_data_in' => $rate_data['total_data_in'], + 'total_data_out' => $rate_data['total_data_out'], + 'rate_average' => $rate_data['rate_average'], + 'rate_average_in' => $rate_data['rate_average_in'], 'rate_average_out' => $rate_data['rate_average_out'], - 'bill_last_calc' => ['NOW()'], + 'bill_last_calc' => ['NOW()'], ]; dbUpdate($update, 'bills', '`bill_id` = ?', [$bill['bill_id']]); @@ -93,46 +93,46 @@ foreach (dbFetchRows('SELECT * FROM `bills` ORDER BY `bill_id`') as $bill) { if (isset($check['bill_id']) && $check['bill_id'] == $bill['bill_id']) { $update = [ - 'rate_95th' => $rate_data['rate_95th'], - 'rate_95th_in' => $rate_data['rate_95th_in'], - 'rate_95th_out' => $rate_data['rate_95th_out'], - 'dir_95th' => $rate_data['dir_95th'], - 'rate_average' => $rate_data['rate_average'], - 'rate_average_in' => $rate_data['rate_average_in'], + 'rate_95th' => $rate_data['rate_95th'], + 'rate_95th_in' => $rate_data['rate_95th_in'], + 'rate_95th_out' => $rate_data['rate_95th_out'], + 'dir_95th' => $rate_data['dir_95th'], + 'rate_average' => $rate_data['rate_average'], + 'rate_average_in' => $rate_data['rate_average_in'], 'rate_average_out' => $rate_data['rate_average_out'], - 'traf_total' => $rate_data['total_data'], - 'traf_in' => $rate_data['total_data_in'], - 'traf_out' => $rate_data['total_data_out'], - 'bill_peak_out' => $period['peak_out'], - 'bill_peak_in' => $period['peak_in'], - 'bill_used' => $used, - 'bill_overuse' => $overuse, - 'bill_percent' => $percent, - 'updated' => ['NOW()'], + 'traf_total' => $rate_data['total_data'], + 'traf_in' => $rate_data['total_data_in'], + 'traf_out' => $rate_data['total_data_out'], + 'bill_peak_out' => $period['peak_out'], + 'bill_peak_in' => $period['peak_in'], + 'bill_used' => $used, + 'bill_overuse' => $overuse, + 'bill_percent' => $percent, + 'updated' => ['NOW()'], ]; dbUpdate($update, 'bill_history', '`bill_hist_id` = ?', [$check['bill_hist_id']]); echo ' Updated history! '; } else { $update = [ - 'rate_95th' => $rate_data['rate_95th'], - 'rate_95th_in' => $rate_data['rate_95th_in'], - 'rate_95th_out' => $rate_data['rate_95th_out'], - 'dir_95th' => $rate_data['dir_95th'], - 'rate_average' => $rate_data['rate_average'], - 'rate_average_in' => $rate_data['rate_average_in'], + 'rate_95th' => $rate_data['rate_95th'], + 'rate_95th_in' => $rate_data['rate_95th_in'], + 'rate_95th_out' => $rate_data['rate_95th_out'], + 'dir_95th' => $rate_data['dir_95th'], + 'rate_average' => $rate_data['rate_average'], + 'rate_average_in' => $rate_data['rate_average_in'], 'rate_average_out' => $rate_data['rate_average_out'], - 'traf_total' => $rate_data['total_data'], - 'traf_in' => $rate_data['total_data_in'], - 'traf_out' => $rate_data['total_data_out'], - 'bill_datefrom' => $datefrom, - 'bill_dateto' => $dateto, - 'bill_type' => $type, - 'bill_allowed' => $allowed, - 'bill_used' => $used, - 'bill_overuse' => $overuse, - 'bill_percent' => $percent, - 'bill_id' => $bill['bill_id'], + 'traf_total' => $rate_data['total_data'], + 'traf_in' => $rate_data['total_data_in'], + 'traf_out' => $rate_data['total_data_out'], + 'bill_datefrom' => $datefrom, + 'bill_dateto' => $dateto, + 'bill_type' => $type, + 'bill_allowed' => $allowed, + 'bill_used' => $used, + 'bill_overuse' => $overuse, + 'bill_percent' => $percent, + 'bill_id' => $bill['bill_id'], ]; dbInsert($update, 'bill_history'); echo ' Generated history! '; diff --git a/config/database.php b/config/database.php index bbe9a3ae92..d21262e12f 100644 --- a/config/database.php +++ b/config/database.php @@ -163,9 +163,9 @@ return [ ], 'testing_memory' => [ - 'driver' => 'sqlite', + 'driver' => 'sqlite', 'database' => ':memory:', - 'prefix' => '', + 'prefix' => '', 'foreign_key_constraints' => true, ], diff --git a/config/debugbar.php b/config/debugbar.php index 49a778d795..aca7aa951a 100644 --- a/config/debugbar.php +++ b/config/debugbar.php @@ -42,11 +42,11 @@ | */ 'storage' => [ - 'enabled' => true, - 'driver' => 'file', // redis, file, pdo, custom - 'path' => storage_path('debugbar'), // For file driver + 'enabled' => true, + 'driver' => 'file', // redis, file, pdo, custom + 'path' => storage_path('debugbar'), // For file driver 'connection' => null, // Leave null for default connection (Redis/PDO) - 'provider' => '', // Instance of StorageInterface for custom driver + 'provider' => '', // Instance of StorageInterface for custom driver ], /* @@ -111,27 +111,27 @@ */ 'collectors' => [ - 'phpinfo' => true, // Php version - 'messages' => true, // Messages - 'time' => true, // Time Datalogger - 'memory' => true, // Memory usage - 'exceptions' => true, // Exception displayer - 'log' => true, // Logs from Monolog (merged in messages if enabled) - 'db' => true, // Show database (PDO) queries and bindings - 'views' => true, // Views with their data - 'route' => true, // Current route information - 'auth' => true, // Display Laravel authentication status - 'gate' => true, // Display Laravel Gate checks - 'session' => true, // Display session data + 'phpinfo' => true, // Php version + 'messages' => true, // Messages + 'time' => true, // Time Datalogger + 'memory' => true, // Memory usage + 'exceptions' => true, // Exception displayer + 'log' => true, // Logs from Monolog (merged in messages if enabled) + 'db' => true, // Show database (PDO) queries and bindings + 'views' => true, // Views with their data + 'route' => true, // Current route information + 'auth' => true, // Display Laravel authentication status + 'gate' => true, // Display Laravel Gate checks + 'session' => true, // Display session data 'symfony_request' => true, // Only one can be enabled.. - 'mail' => true, // Catch mail messages - 'laravel' => false, // Laravel version and environment - 'events' => false, // All events fired + 'mail' => true, // Catch mail messages + 'laravel' => false, // Laravel version and environment + 'events' => false, // All events fired 'default_request' => false, // Regular or special Symfony request logger - 'logs' => false, // Add the latest log messages - 'files' => false, // Show the included files - 'config' => false, // Display config settings - 'cache' => false, // Display cache events + 'logs' => false, // Add the latest log messages + 'files' => false, // Show the included files + 'config' => false, // Display config settings + 'cache' => false, // Display cache events ], /* @@ -148,14 +148,14 @@ 'show_name' => true, // Also show the users name/email in the debugbar ], 'db' => [ - 'with_params' => true, // Render SQL with the parameters substituted - 'backtrace' => true, // Use a backtrace to find the origin of the query in your files. - 'timeline' => false, // Add the queries to the timeline + 'with_params' => true, // Render SQL with the parameters substituted + 'backtrace' => true, // Use a backtrace to find the origin of the query in your files. + 'timeline' => false, // Add the queries to the timeline 'explain' => [ // Show EXPLAIN output on queries 'enabled' => false, 'types' => ['SELECT'], // // workaround ['SELECT'] only. https://github.com/barryvdh/laravel-debugbar/issues/888 ['SELECT', 'INSERT', 'UPDATE', 'DELETE']; for MySQL 5.6.3+ ], - 'hints' => true, // Show hints for common mistakes + 'hints' => true, // Show hints for common mistakes ], 'mail' => [ 'full_log' => false, diff --git a/config/purifier.php b/config/purifier.php index 48875d318c..a85c6f4dd8 100644 --- a/config/purifier.php +++ b/config/purifier.php @@ -17,37 +17,37 @@ */ return [ - 'encoding' => 'UTF-8', - 'finalize' => true, - 'ignoreNonStrings' => false, - 'cachePath' => storage_path('app/purifier'), - 'cacheFileMode' => 0755, - 'settings' => [ + 'encoding' => 'UTF-8', + 'finalize' => true, + 'ignoreNonStrings' => false, + 'cachePath' => storage_path('app/purifier'), + 'cacheFileMode' => 0755, + 'settings' => [ 'default' => [ - 'HTML.Doctype' => 'HTML 4.01 Transitional', - 'HTML.Allowed' => 'div,b,strong,i,em,u,a[href|title],ul,ol,li,p[style],br,span[style],img[width|height|alt|src]', - 'CSS.AllowedProperties' => 'font,font-size,font-weight,font-style,font-family,text-decoration,padding-left,color,background-color,text-align', + 'HTML.Doctype' => 'HTML 4.01 Transitional', + 'HTML.Allowed' => 'div,b,strong,i,em,u,a[href|title],ul,ol,li,p[style],br,span[style],img[width|height|alt|src]', + 'CSS.AllowedProperties' => 'font,font-size,font-weight,font-style,font-family,text-decoration,padding-left,color,background-color,text-align', 'AutoFormat.AutoParagraph' => true, - 'AutoFormat.RemoveEmpty' => true, + 'AutoFormat.RemoveEmpty' => true, ], 'notification' => [ - 'HTML.Allowed' => 'a,b,i,ul,ol,li,h1,h2,h3,h4,br,p,pre', + 'HTML.Allowed' => 'a,b,i,ul,ol,li,h1,h2,h3,h4,br,p,pre', ], 'widget' => [ - 'HTML.Allowed' => 'b,iframe[frameborder|src|width|height],i,ul,ol,li,h1,h2,h3,h4,br,p,pre', - 'HTML.Trusted' => true, + 'HTML.Allowed' => 'b,iframe[frameborder|src|width|height],i,ul,ol,li,h1,h2,h3,h4,br,p,pre', + 'HTML.Trusted' => true, 'HTML.SafeIframe' => true, 'URI.SafeIframeRegexp' => '%^(https?:)?//%', ], - 'test' => [ + 'test' => [ 'Attr.EnableID' => 'true', ], 'youtube' => [ - 'HTML.SafeIframe' => 'true', + 'HTML.SafeIframe' => 'true', 'URI.SafeIframeRegexp' => '%^(http://|https://|//)(www.youtube.com/embed/|player.vimeo.com/video/)%', ], 'custom_definition' => [ - 'id' => 'html5-definitions', + 'id' => 'html5-definitions', 'rev' => 1, 'debug' => false, 'elements' => [ diff --git a/database/factories/DeviceGroupFactory.php b/database/factories/DeviceGroupFactory.php index 1cf2be9c93..2789aafbe8 100644 --- a/database/factories/DeviceGroupFactory.php +++ b/database/factories/DeviceGroupFactory.php @@ -18,7 +18,7 @@ class DeviceGroupFactory extends Factory return [ 'name' => $this->faker->domainWord(), 'desc' => $this->faker->text(255), - 'type' =>'static', + 'type' => 'static', ]; } } diff --git a/html/bandwidth-graph.php b/html/bandwidth-graph.php index c297f1cd45..e235149b0b 100644 --- a/html/bandwidth-graph.php +++ b/html/bandwidth-graph.php @@ -12,11 +12,11 @@ $init_modules = ['web', 'auth']; require realpath(__DIR__ . '/..') . '/includes/init.php'; $urlargs = [ - 'type' => 'bill_historictransfer', - 'id' => $_GET['bill_id'], - 'width' => $_GET['x'], - 'height' => $_GET['y'], - 'imgtype' => $_GET['type'], + 'type' => 'bill_historictransfer', + 'id' => $_GET['bill_id'], + 'width' => $_GET['x'], + 'height' => $_GET['y'], + 'imgtype' => $_GET['type'], ]; if (is_numeric($_GET['bill_hist_id'])) { $urlargs['bill_hist_id'] = $_GET['bill_hist_id']; diff --git a/html/billing-graph.php b/html/billing-graph.php index e72f8a5ec7..8fd6656c2e 100644 --- a/html/billing-graph.php +++ b/html/billing-graph.php @@ -15,10 +15,10 @@ $init_modules = ['web', 'auth']; require realpath(__DIR__ . '/..') . '/includes/init.php'; $urlargs = [ - 'type' => 'bill_historicbits', - 'id' => $_GET['bill_id'], - 'width' => $_GET['x'], - 'height' => $_GET['y'], + 'type' => 'bill_historicbits', + 'id' => $_GET['bill_id'], + 'width' => $_GET['x'], + 'height' => $_GET['y'], ]; if (isset($_GET['bill_hist_id'])) { $urlargs['bill_hist_id'] = $_GET['bill_hist_id']; diff --git a/includes/caches/alerts.inc.php b/includes/caches/alerts.inc.php index 19ede811f6..91caeaa8cf 100644 --- a/includes/caches/alerts.inc.php +++ b/includes/caches/alerts.inc.php @@ -7,7 +7,7 @@ if (Auth::user()->hasGlobalRead()) { $perms_sql = '`D`.`device_id` IN ' . dbGenPlaceholders(count($device_ids)); $data['active_count'] = [ - 'query' => 'SELECT COUNT(`alerts`.`id`) FROM `alerts` LEFT JOIN `devices` ON `alerts`.`device_id`=`devices`.`device_id` RIGHT JOIN `alert_rules` ON `alerts`.`rule_id`=`alert_rules`.`id` WHERE $perms_sql AND `alerts`.`state` NOT IN (0,2) AND `devices`.`disabled` = 0 AND `devices`.`ignore` = 0', + 'query' => 'SELECT COUNT(`alerts`.`id`) FROM `alerts` LEFT JOIN `devices` ON `alerts`.`device_id`=`devices`.`device_id` RIGHT JOIN `alert_rules` ON `alerts`.`rule_id`=`alert_rules`.`id` WHERE $perms_sql AND `alerts`.`state` NOT IN (0,2) AND `devices`.`disabled` = 0 AND `devices`.`ignore` = 0', 'params' => $device_ids, ]; } diff --git a/includes/caches/devices.inc.php b/includes/caches/devices.inc.php index 596841b06f..ea34ad4e2b 100644 --- a/includes/caches/devices.inc.php +++ b/includes/caches/devices.inc.php @@ -15,27 +15,27 @@ if (Auth::user()->hasGlobalRead()) { $perms_sql = '`D`.`device_id` IN ' . dbGenPlaceholders(count($device_ids)); $data['count'] = [ - 'query' => 'SELECT COUNT(*) FROM devices AS D WHERE $perms_sql', + 'query' => 'SELECT COUNT(*) FROM devices AS D WHERE $perms_sql', 'params' => $device_ids, ]; $data['up'] = [ - 'query' => "SELECT COUNT(*) FROM devices AS D WHERE $perms_sql AND D.`status` = '1' AND D.`ignore` = '0' AND D.`disabled` = '0'", + 'query' => "SELECT COUNT(*) FROM devices AS D WHERE $perms_sql AND D.`status` = '1' AND D.`ignore` = '0' AND D.`disabled` = '0'", 'params' => $device_ids, ]; $data['down'] = [ - 'query' => "SELECT COUNT(*) FROM devices AS D WHERE $perms_sql AND D.`status` = '0' AND D.`ignore` = '0' AND D.`disabled` = '0'", + 'query' => "SELECT COUNT(*) FROM devices AS D WHERE $perms_sql AND D.`status` = '0' AND D.`ignore` = '0' AND D.`disabled` = '0'", 'params' => $device_ids, ]; $data['ignored'] = [ - 'query' => "SELECT COUNT(*) FROM devices AS D WHERE $perms_sql AND D.`ignore` = '1' AND D.`disabled` = '0'", + 'query' => "SELECT COUNT(*) FROM devices AS D WHERE $perms_sql AND D.`ignore` = '1' AND D.`disabled` = '0'", 'params' => $device_ids, ]; $data['disabled'] = [ - 'query' => "SELECT COUNT(*) FROM devices AS D WHERE $perms_sql AND D.`disabled` = '1'", + 'query' => "SELECT COUNT(*) FROM devices AS D WHERE $perms_sql AND D.`disabled` = '1'", 'params' => $device_ids, ]; }//end if diff --git a/includes/caches/notifications.inc.php b/includes/caches/notifications.inc.php index 94dd74d003..0e593590b6 100644 --- a/includes/caches/notifications.inc.php +++ b/includes/caches/notifications.inc.php @@ -21,24 +21,24 @@ * @license GPL */ $data['count'] = [ - 'query' => 'select count(notifications.notifications_id) from notifications where not exists( select 1 from notifications_attribs where notifications.notifications_id = notifications_attribs.notifications_id and notifications_attribs.user_id = ?)', + 'query' => 'select count(notifications.notifications_id) from notifications where not exists( select 1 from notifications_attribs where notifications.notifications_id = notifications_attribs.notifications_id and notifications_attribs.user_id = ?)', 'params' => [Auth::id()], ]; $data['unread'] = [ - 'query' => 'select notifications.* from notifications where not exists( select 1 from notifications_attribs where notifications.notifications_id = notifications_attribs.notifications_id and notifications_attribs.user_id = ?) order by notifications.notifications_id desc', + 'query' => 'select notifications.* from notifications where not exists( select 1 from notifications_attribs where notifications.notifications_id = notifications_attribs.notifications_id and notifications_attribs.user_id = ?) order by notifications.notifications_id desc', 'params' => [Auth::id()], ]; $data['sticky'] = [ - 'query' => 'select notifications.*,notifications_attribs.user_id from notifications inner join notifications_attribs on notifications.notifications_id = notifications_attribs.notifications_id where notifications_attribs.key = "sticky" && notifications_attribs.value = 1 order by notifications_attribs.attrib_id desc', + 'query' => 'select notifications.*,notifications_attribs.user_id from notifications inner join notifications_attribs on notifications.notifications_id = notifications_attribs.notifications_id where notifications_attribs.key = "sticky" && notifications_attribs.value = 1 order by notifications_attribs.attrib_id desc', ]; $data['sticky_count'] = [ - 'query' => 'select count(notifications.notifications_id) from notifications inner join notifications_attribs on notifications.notifications_id = notifications_attribs.notifications_id where notifications_attribs.key = "sticky" && notifications_attribs.value = 1', + 'query' => 'select count(notifications.notifications_id) from notifications inner join notifications_attribs on notifications.notifications_id = notifications_attribs.notifications_id where notifications_attribs.key = "sticky" && notifications_attribs.value = 1', ]; $data['read'] = [ - 'query' => 'select notifications.* from notifications inner join notifications_attribs on notifications.notifications_id = notifications_attribs.notifications_id where notifications_attribs.user_id = ? && ( notifications_attribs.key = "read" && notifications_attribs.value = 1) && not exists( select 1 from notifications_attribs where notifications.notifications_id = notifications_attribs.notifications_id and notifications_attribs.key = "sticky" && notifications_attribs.value = "1") order by notifications_attribs.attrib_id desc', + 'query' => 'select notifications.* from notifications inner join notifications_attribs on notifications.notifications_id = notifications_attribs.notifications_id where notifications_attribs.user_id = ? && ( notifications_attribs.key = "read" && notifications_attribs.value = 1) && not exists( select 1 from notifications_attribs where notifications.notifications_id = notifications_attribs.notifications_id and notifications_attribs.key = "sticky" && notifications_attribs.value = "1") order by notifications_attribs.attrib_id desc', 'params' => [Auth::id()], ]; diff --git a/includes/caches/ports.inc.php b/includes/caches/ports.inc.php index 8bcbf4a88c..f41d8dc620 100644 --- a/includes/caches/ports.inc.php +++ b/includes/caches/ports.inc.php @@ -17,32 +17,32 @@ if (Auth::user()->hasGlobalRead()) { $perms_sql = '`I`.`port_id` IN ' . dbGenPlaceholders(count($device_ids)); $data['count'] = [ - 'query' => "SELECT COUNT(*) FROM ports AS I WHERE $perms_sql AND I.`deleted` = '0'", + 'query' => "SELECT COUNT(*) FROM ports AS I WHERE $perms_sql AND I.`deleted` = '0'", 'params' => $device_ids, ]; $data['up'] = [ - 'query' => "SELECT COUNT(*) FROM ports AS I, devices AS D WHERE $perms_sql AND I.`deleted` = '0' AND I.`device_id` = D.`device_id` AND I.`ignore` = '0' AND D.`ignore` = '0' AND I.`ifOperStatus` = 'up'", + 'query' => "SELECT COUNT(*) FROM ports AS I, devices AS D WHERE $perms_sql AND I.`deleted` = '0' AND I.`device_id` = D.`device_id` AND I.`ignore` = '0' AND D.`ignore` = '0' AND I.`ifOperStatus` = 'up'", 'params' => $device_ids, ]; $data['down'] = [ - 'query' => "SELECT COUNT(*) FROM ports AS I, devices AS D WHERE $perms_sql AND I.`deleted` = '0' AND I.`device_id` = D.`device_id` AND I.`ignore` = '0' AND D.`ignore` = '0' AND I.`ifOperStatus` <> 'up' AND I.`ifAdminStatus` = 'up'", + 'query' => "SELECT COUNT(*) FROM ports AS I, devices AS D WHERE $perms_sql AND I.`deleted` = '0' AND I.`device_id` = D.`device_id` AND I.`ignore` = '0' AND D.`ignore` = '0' AND I.`ifOperStatus` <> 'up' AND I.`ifAdminStatus` = 'up'", 'params' => $device_ids, ]; $data['shutdown'] = [ - 'query' => "SELECT COUNT(*) FROM ports AS I, devices AS D WHERE $perms_sql AND I.`deleted` = '0' AND I.`device_id` = D.`device_id` AND I.`ignore` = '0' AND D.`ignore` = '0' AND I.`ifAdminStatus` = 'down'", + 'query' => "SELECT COUNT(*) FROM ports AS I, devices AS D WHERE $perms_sql AND I.`deleted` = '0' AND I.`device_id` = D.`device_id` AND I.`ignore` = '0' AND D.`ignore` = '0' AND I.`ifAdminStatus` = 'down'", 'params' => $device_ids, ]; $data['errored'] = [ - 'query' => "SELECT COUNT(*) FROM ports AS I, devices AS D WHERE $perms_sql AND I.`deleted` = '0' AND I.`device_id` = D.`device_id` AND I.`ignore` = '0' AND D.`ignore` = '0' AND (I.`ifInErrors_delta` > '0' OR I.`ifOutErrors_delta` > '0')", + 'query' => "SELECT COUNT(*) FROM ports AS I, devices AS D WHERE $perms_sql AND I.`deleted` = '0' AND I.`device_id` = D.`device_id` AND I.`ignore` = '0' AND D.`ignore` = '0' AND (I.`ifInErrors_delta` > '0' OR I.`ifOutErrors_delta` > '0')", 'params' => $device_ids, ]; $data['ignored'] = [ - 'query' => "SELECT COUNT(*) FROM ports AS I, devices AS D WHERE $perms_sql AND I.`deleted` = '0' AND I.`device_id` = D.`device_id` AND (I.`ignore` = '1' OR D.`ignore` = '1')", + 'query' => "SELECT COUNT(*) FROM ports AS I, devices AS D WHERE $perms_sql AND I.`deleted` = '0' AND I.`device_id` = D.`device_id` AND (I.`ignore` = '1' OR D.`ignore` = '1')", 'params' => $device_ids, ]; }//end if diff --git a/includes/caches/services.inc.php b/includes/caches/services.inc.php index 5192e77c5f..b846bddcbb 100644 --- a/includes/caches/services.inc.php +++ b/includes/caches/services.inc.php @@ -11,27 +11,27 @@ if (Auth::user()->hasGlobalRead()) { $perms_sql = '`S`.`device_id` IN ' . dbGenPlaceholders(count($device_ids)); $data['count'] = [ - 'query' => 'SELECT COUNT(*) FROM services AS S WHERE $perms_sql', + 'query' => 'SELECT COUNT(*) FROM services AS S WHERE $perms_sql', 'params' => $device_ids, ]; $data['up'] = [ - 'query' => "SELECT COUNT(*) FROM services AS S WHERE $perms_sql AND S.`service_ignore` = '0' AND S.`service_disabled` = '0' AND S.`service_status` = '0'", + 'query' => "SELECT COUNT(*) FROM services AS S WHERE $perms_sql AND S.`service_ignore` = '0' AND S.`service_disabled` = '0' AND S.`service_status` = '0'", 'params' => $device_ids, ]; $data['down'] = [ - 'query' => "SELECT COUNT(*) FROM services AS S WHERE $perms_sql AND S.`service_ignore` = '0' AND S.`service_disabled` = '0' AND S.`service_status` = '2'", + 'query' => "SELECT COUNT(*) FROM services AS S WHERE $perms_sql AND S.`service_ignore` = '0' AND S.`service_disabled` = '0' AND S.`service_status` = '2'", 'params' => $device_ids, ]; $data['ignored'] = [ - 'query' => "SELECT COUNT(*) FROM services AS S WHERE $perms_sql AND S.`service_ignore` = '1' AND S.`service_disabled` = '0'", + 'query' => "SELECT COUNT(*) FROM services AS S WHERE $perms_sql AND S.`service_ignore` = '1' AND S.`service_disabled` = '0'", 'params' => $device_ids, ]; $data['disabled'] = [ - 'query' => "SELECT COUNT(*) FROM services AS S WHERE $perms_sql AND S.`service_disabled` = '1'", + 'query' => "SELECT COUNT(*) FROM services AS S WHERE $perms_sql AND S.`service_disabled` = '1'", 'params' => $device_ids, ]; }//end if diff --git a/includes/caches/toner.inc.php b/includes/caches/toner.inc.php index 8c65de9ced..9670013839 100644 --- a/includes/caches/toner.inc.php +++ b/includes/caches/toner.inc.php @@ -7,7 +7,7 @@ if (Auth::user()->hasGlobalRead()) { $perms_sql = '`printer_supplies`.`device_id` IN ' . dbGenPlaceholders(count($device_ids)); $data['count'] = [ - 'query' => "SELECT COUNT(`supply_id`) FROM printer_supplies WHERE $perms_sql", + 'query' => "SELECT COUNT(`supply_id`) FROM printer_supplies WHERE $perms_sql", 'params' => $device_ids, ]; } diff --git a/includes/common.php b/includes/common.php index fc930a587a..81aea0d903 100644 --- a/includes/common.php +++ b/includes/common.php @@ -511,7 +511,7 @@ function get_ports_mapped($device_id, $with_statistics = false) $ports = []; $maps = [ 'ifIndex' => [], - 'ifName' => [], + 'ifName' => [], 'ifDescr' => [], ]; @@ -537,7 +537,7 @@ function get_ports_mapped($device_id, $with_statistics = false) return [ 'ports' => $ports, - 'maps' => $maps, + 'maps' => $maps, ]; } @@ -648,6 +648,7 @@ function ResolveGlues($tables, $target, $x = 0, $hist = [], $last = []) } } } + //You should never get here. return false; } diff --git a/includes/discovery/arp-table.inc.php b/includes/discovery/arp-table.inc.php index e1e827c876..7bded41f0d 100644 --- a/includes/discovery/arp-table.inc.php +++ b/includes/discovery/arp-table.inc.php @@ -77,9 +77,9 @@ foreach (DeviceCache::getPrimary()->getVrfContexts() as $context_name) { } elseif (isset($interface['port_id'])) { d_echo("$raw_mac => $ip\n", '+'); $insert_data[] = [ - 'port_id' => $port_id, - 'device_id' => $device['device_id'], - 'mac_address' => $mac, + 'port_id' => $port_id, + 'device_id' => $device['device_id'], + 'mac_address' => $mac, 'ipv4_address' => $ip, 'context_name' => (string) $context_name, ]; diff --git a/includes/discovery/cisco-cbqos.inc.php b/includes/discovery/cisco-cbqos.inc.php index 99c22fc32d..185a763e61 100644 --- a/includes/discovery/cisco-cbqos.inc.php +++ b/includes/discovery/cisco-cbqos.inc.php @@ -15,7 +15,7 @@ if ($device['os_group'] == 'cisco') { $module = 'Cisco-CBQOS'; $component = new LibreNMS\Component(); - $components = $component->getComponents($device['device_id'], ['type'=>$module]); + $components = $component->getComponents($device['device_id'], ['type' => $module]); // We only care about our device id. $components = $components[$device['device_id']]; diff --git a/includes/discovery/cisco-otv.inc.php b/includes/discovery/cisco-otv.inc.php index e403a67a41..bc55be2caf 100644 --- a/includes/discovery/cisco-otv.inc.php +++ b/includes/discovery/cisco-otv.inc.php @@ -59,7 +59,7 @@ if ($device['os_group'] == 'cisco') { $module = 'Cisco-OTV'; $component = new LibreNMS\Component(); - $components = $component->getComponents($device['device_id'], ['type'=>$module]); + $components = $component->getComponents($device['device_id'], ['type' => $module]); // We only care about our device id. $components = $components[$device['device_id']]; diff --git a/includes/discovery/cisco-pw.inc.php b/includes/discovery/cisco-pw.inc.php index a956464005..5288cfe974 100644 --- a/includes/discovery/cisco-pw.inc.php +++ b/includes/discovery/cisco-pw.inc.php @@ -36,15 +36,15 @@ if (Config::get('enable_pseudowires') && $device['os_group'] == 'cisco') { } else { $pseudowire_id = dbInsert( [ - 'device_id' => $device['device_id'], - 'port_id' => $if_id, + 'device_id' => $device['device_id'], + 'port_id' => $if_id, 'peer_device_id' => $cpw_remote_device, - 'peer_ldp_id' => $cpw_remote_id, - 'cpwVcID' => $pw['cpwVcID'], - 'cpwOid' => $pw_id, - 'pw_type' => $pw['cpwVcType'], - 'pw_descr' => $pw['cpwVcDescr'], - 'pw_psntype' => $pw['cpwVcPsnType'], + 'peer_ldp_id' => $cpw_remote_id, + 'cpwVcID' => $pw['cpwVcID'], + 'cpwOid' => $pw_id, + 'pw_type' => $pw['cpwVcType'], + 'pw_descr' => $pw['cpwVcDescr'], + 'pw_psntype' => $pw['cpwVcPsnType'], ], 'pseudowires' ); diff --git a/includes/discovery/cisco-qfp.inc.php b/includes/discovery/cisco-qfp.inc.php index 0337b7887c..8a2f7e3cf0 100644 --- a/includes/discovery/cisco-qfp.inc.php +++ b/includes/discovery/cisco-qfp.inc.php @@ -43,7 +43,7 @@ if ($device['os_group'] == 'cisco') { * Get module's components for a device */ $component = new LibreNMS\Component(); - $components = $component->getComponents($device['device_id'], ['type'=>$module]); + $components = $component->getComponents($device['device_id'], ['type' => $module]); $components = $components[$device['device_id']]; /* diff --git a/includes/discovery/entity-physical/axos.inc.php b/includes/discovery/entity-physical/axos.inc.php index bac90f3d3f..4e85e37ab2 100644 --- a/includes/discovery/entity-physical/axos.inc.php +++ b/includes/discovery/entity-physical/axos.inc.php @@ -4,11 +4,11 @@ $physical_name = snmpwalk_cache_multi_oid($device, 'sysObjectID.0', $physical_na $serial_number = snmpwalk_cache_multi_oid($device, 'axosSystemChassisSerialNumber', $serial_number, 'Axos-System-MIB'); $physical_index = 1; $entity_array[1] = [ - 'entPhysicalIndex' => $physical_index, + 'entPhysicalIndex' => $physical_index, 'entPhysicalDescr' => $physical_name[0]['sysObjectID'], 'entPhysicalVendorType' => 'Calix', 'entPhysicalContainedIn' => '0', - 'entPhysicalClass' => 'chassis', + 'entPhysicalClass' => 'chassis', 'entPhysicalParentRelPos' => '-1', 'entPhysicalName' => $physical_name[0]['sysObjectID'], 'entPhysicalSerialNum' => $serial_number[0]['axosSystemChassisSerialNumber'], @@ -21,15 +21,15 @@ foreach ($card_array as $card) { $physical_index++; // Discover the card $entity_array[] = [ - 'entPhysicalIndex' => $physical_index, - 'entPhysicalDescr' => "Calix {$card['axosCardActualType']}", - 'entPhysicalClass' => 'container', - 'entPhysicalModelName' => $card['axosCardPartNumber'], - 'entPhysicalSerialNum' => $card['axosCardSerialNumber'], - 'entPhysicalContainedIn' => 1, - 'entPhysicalParentRelPos' => $card['axosCardSlot'], - 'entPhysicalSoftwareRev' => $card['axosCardSoftwareVersion'], - 'entPhysicalIsFRU' => true, + 'entPhysicalIndex' => $physical_index, + 'entPhysicalDescr' => "Calix {$card['axosCardActualType']}", + 'entPhysicalClass' => 'container', + 'entPhysicalModelName' => $card['axosCardPartNumber'], + 'entPhysicalSerialNum' => $card['axosCardSerialNumber'], + 'entPhysicalContainedIn' => 1, + 'entPhysicalParentRelPos' => $card['axosCardSlot'], + 'entPhysicalSoftwareRev' => $card['axosCardSoftwareVersion'], + 'entPhysicalIsFRU' => true, ]; } diff --git a/includes/discovery/entity-physical/ciena-sds.inc.php b/includes/discovery/entity-physical/ciena-sds.inc.php index d811d2b396..39433c0b1d 100644 --- a/includes/discovery/entity-physical/ciena-sds.inc.php +++ b/includes/discovery/entity-physical/ciena-sds.inc.php @@ -108,55 +108,55 @@ foreach ($chassis_array as $cienaCesChassis => $chassis_contents) { // as far as I know, there can only be 1 chassis, but iterate just in case $chassisIndex = $cienaCesChassis + 1; $entity_array[] = [ - 'entPhysicalIndex' => $chassisIndex, - 'entPhysicalDescr' => $chassis_contents['cienaCesChassisPlatformDesc'], - 'entPhysicalClass' => 'chassis', - 'entPhysicalName' => 'Chassis', - 'entPhysicalModelName' => $chassis_contents['cienaCesChassisPartNumber'], - 'entPhysicalSerialNum' => $chassis_contents['cienaCesChassisSerialNumber'], - 'entPhysicalContainedIn' => '0', - 'entPhysicalMfgName' => 'Ciena', + 'entPhysicalIndex' => $chassisIndex, + 'entPhysicalDescr' => $chassis_contents['cienaCesChassisPlatformDesc'], + 'entPhysicalClass' => 'chassis', + 'entPhysicalName' => 'Chassis', + 'entPhysicalModelName' => $chassis_contents['cienaCesChassisPartNumber'], + 'entPhysicalSerialNum' => $chassis_contents['cienaCesChassisSerialNumber'], + 'entPhysicalContainedIn' => '0', + 'entPhysicalMfgName' => 'Ciena', 'entPhysicalParentRelPos' => '-1', - 'entPhysicalHardwareRev' => $chassis_contents['cienaCesChassisIDPModelRevision'], - 'entPhysicalIsFRU' => 'true', + 'entPhysicalHardwareRev' => $chassis_contents['cienaCesChassisIDPModelRevision'], + 'entPhysicalIsFRU' => 'true', ]; $entity_array[] = [ - 'entPhysicalIndex' => "40$chassisIndex", - 'entPhysicalClass' => 'container', - 'entPhysicalName' => 'Modules', - 'entPhysicalContainedIn' => $chassisIndex, + 'entPhysicalIndex' => "40$chassisIndex", + 'entPhysicalClass' => 'container', + 'entPhysicalName' => 'Modules', + 'entPhysicalContainedIn' => $chassisIndex, 'entPhysicalParentRelPos' => -1, ]; $entity_array[] = [ - 'entPhysicalIndex' => "41$chassisIndex", - 'entPhysicalClass' => 'container', - 'entPhysicalName' => 'Power Supplies', - 'entPhysicalContainedIn' => $chassisIndex, + 'entPhysicalIndex' => "41$chassisIndex", + 'entPhysicalClass' => 'container', + 'entPhysicalName' => 'Power Supplies', + 'entPhysicalContainedIn' => $chassisIndex, 'entPhysicalParentRelPos' => -1, ]; $entity_array[] = [ - 'entPhysicalIndex' => "42$chassisIndex", - 'entPhysicalClass' => 'container', - 'entPhysicalName' => 'Fans', - 'entPhysicalContainedIn' => $chassisIndex, + 'entPhysicalIndex' => "42$chassisIndex", + 'entPhysicalClass' => 'container', + 'entPhysicalName' => 'Fans', + 'entPhysicalContainedIn' => $chassisIndex, 'entPhysicalParentRelPos' => -1, ]; } foreach ($cienaCesChassisPowerModule as $index => $contents) { $entity_array[] = [ - 'entPhysicalIndex' => "50$index", - 'entPhysicalDescr' => $contents['cienaCesChassisPowerSupplyManufacturer'], - 'entPhysicalClass' => 'sensor', - 'entPhysicalName' => $contents['cienaCesChassisPowerSupplySlotName'], - 'entPhysicalModelName' => $contents['cienaCesChassisPowerSupplyPartNum'], - 'entPhysicalSerialNum' => $contents['cienaCesChassisPowerSupplySerialNumber'], - 'entPhysicalContainedIn' => '41' . $contents['cienaCesChassisPowerSupplyChassisIndx'], - 'entPhysicalMfgName' => 'Ciena', + 'entPhysicalIndex' => "50$index", + 'entPhysicalDescr' => $contents['cienaCesChassisPowerSupplyManufacturer'], + 'entPhysicalClass' => 'sensor', + 'entPhysicalName' => $contents['cienaCesChassisPowerSupplySlotName'], + 'entPhysicalModelName' => $contents['cienaCesChassisPowerSupplyPartNum'], + 'entPhysicalSerialNum' => $contents['cienaCesChassisPowerSupplySerialNumber'], + 'entPhysicalContainedIn' => '41' . $contents['cienaCesChassisPowerSupplyChassisIndx'], + 'entPhysicalMfgName' => 'Ciena', 'entPhysicalParentRelPos' => $contents['cienaCesChassisPowerSupplySlotIndx'], - 'entPhysicalHardwareRev' => $contents['cienaCesChassisPowerSupplyRevInfo'], - 'entPhysicalIsFRU' => $contents['cienaCesChassisPowerSupplyFRU'], - 'ifIndex' => null, + 'entPhysicalHardwareRev' => $contents['cienaCesChassisPowerSupplyRevInfo'], + 'entPhysicalIsFRU' => $contents['cienaCesChassisPowerSupplyFRU'], + 'ifIndex' => null, ]; } @@ -189,16 +189,16 @@ foreach ($cienaCesChassisFanTrayEntry as $index => $contents) { } $entity_array[] = [ - 'entPhysicalIndex' => "53$index", - 'entPhysicalClass' => 'sensor', - 'entPhysicalName' => $contents['cienaCesChassisFanTrayName'], - 'entPhysicalModelName' => 'Fan Tray', - 'entPhysicalDescr' => "$typeString$modeString", - 'entPhysicalSerialNum' => $contents['cienaCesChassisFanTraySerialNumber'], - 'entPhysicalContainedIn' => '42' . $contents['cienaCesChassisFanTrayChassisIndx'], - 'entPhysicalMfgName' => 'Ciena', + 'entPhysicalIndex' => "53$index", + 'entPhysicalClass' => 'sensor', + 'entPhysicalName' => $contents['cienaCesChassisFanTrayName'], + 'entPhysicalModelName' => 'Fan Tray', + 'entPhysicalDescr' => "$typeString$modeString", + 'entPhysicalSerialNum' => $contents['cienaCesChassisFanTraySerialNumber'], + 'entPhysicalContainedIn' => '42' . $contents['cienaCesChassisFanTrayChassisIndx'], + 'entPhysicalMfgName' => 'Ciena', 'entPhysicalParentRelPos' => $contents['cienaCesChassisFanTraySlotIndx'], - 'entPhysicalIsFRU' => ($contents['cienaCesChassisFanTrayType'] = '2') ? 'true' : 'false', + 'entPhysicalIsFRU' => ($contents['cienaCesChassisFanTrayType'] = '2') ? 'true' : 'false', ]; } @@ -209,13 +209,13 @@ foreach ($cienaCesChassisFanEntry as $index => $contents) { $fanIndex = $indexArr[1]; $entity_array[] = [ - 'entPhysicalIndex' => "51$fanIndex", - 'entPhysicalClass' => 'sensor', - 'entPhysicalName' => $contents['cienaCesChassisFanName'], - 'entPhysicalModelName' => 'Fan', - 'entPhysicalContainedIn' => (isset($cienaCesChassisFanTrayEntry[$fanTray])) ? + 'entPhysicalIndex' => "51$fanIndex", + 'entPhysicalClass' => 'sensor', + 'entPhysicalName' => $contents['cienaCesChassisFanName'], + 'entPhysicalModelName' => 'Fan', + 'entPhysicalContainedIn' => (isset($cienaCesChassisFanTrayEntry[$fanTray])) ? "53$fanTray" : '42' . $contents['cienaCesChassisFanChassisIndx'], - 'entPhysicalMfgName' => 'Ciena', + 'entPhysicalMfgName' => 'Ciena', 'entPhysicalParentRelPos' => $fanIndex, ]; } @@ -227,11 +227,11 @@ foreach ($cienaCesChassisFanTempEntry as $index => $contents) { $sensorIndex = $indexArr[1]; $entity_array[] = [ - 'entPhysicalIndex' => "52$sensorIndex", - 'entPhysicalClass' => 'sensor', - 'entPhysicalName' => $contents['cienaCesChassisFanTempName'], - 'entPhysicalModelName' => 'Temp Sensor', - 'entPhysicalContainedIn' => (isset($cienaCesChassisFanTrayEntry[$fanTray])) ? + 'entPhysicalIndex' => "52$sensorIndex", + 'entPhysicalClass' => 'sensor', + 'entPhysicalName' => $contents['cienaCesChassisFanTempName'], + 'entPhysicalModelName' => 'Temp Sensor', + 'entPhysicalContainedIn' => (isset($cienaCesChassisFanTrayEntry[$fanTray])) ? "53$fanTray" : '42' . $contents['cienaCesChassisFanTempChassisIndx'], 'entPhysicalParentRelPos' => -1, ]; @@ -245,17 +245,17 @@ foreach ($module_array as $index => $contents) { $slotIndex = $indexArr[2]; $entity_array[] = [ - 'entPhysicalIndex' => "55$slotIndex", - 'entPhysicalDescr' => $contents['cienaCesModuleDescription'] . ', ' . $contents['cienaCesModuleSwRunningRelease'], - 'entPhysicalClass' => 'sensor', - 'entPhysicalName' => $contents['cienaCesModuleSlotName'] . ': ' . $contents['cienaCesModuleDescriptionBoardName'], - 'entPhysicalModelName' => $contents['cienaCesModuleDescriptionBoardPartNum'], - 'entPhysicalSerialNum' => $contents['cienaCesModuleDescriptionBoardSerialNum'], - 'entPhysicalContainedIn' => '40' . $chassisIndex, - 'entPhysicalMfgName' => 'Ciena', + 'entPhysicalIndex' => "55$slotIndex", + 'entPhysicalDescr' => $contents['cienaCesModuleDescription'] . ', ' . $contents['cienaCesModuleSwRunningRelease'], + 'entPhysicalClass' => 'sensor', + 'entPhysicalName' => $contents['cienaCesModuleSlotName'] . ': ' . $contents['cienaCesModuleDescriptionBoardName'], + 'entPhysicalModelName' => $contents['cienaCesModuleDescriptionBoardPartNum'], + 'entPhysicalSerialNum' => $contents['cienaCesModuleDescriptionBoardSerialNum'], + 'entPhysicalContainedIn' => '40' . $chassisIndex, + 'entPhysicalMfgName' => 'Ciena', 'entPhysicalParentRelPos' => $slotIndex, - 'entPhysicalFirmwareRev' => $contents['cienaCesModuleSwRunningRelease'], - 'entPhysicalIsFRU' => 'true', + 'entPhysicalFirmwareRev' => $contents['cienaCesModuleSwRunningRelease'], + 'entPhysicalIsFRU' => 'true', ]; } @@ -265,13 +265,13 @@ foreach ($cienaCesEttpConfigEntry as $index => $contents) { $slotIndex = ((isset($nameArr[1])) ? $nameArr[0] : 1); $entity_array[] = [ - 'entPhysicalIndex' => "56$index", - 'entPhysicalDescr' => $contents['cienaCesEttpConfigEttpType'], - 'entPhysicalClass' => 'port', - 'entPhysicalName' => $contents['cienaCesEttpConfigName'], - 'entPhysicalContainedIn' => '55' . $slotIndex, + 'entPhysicalIndex' => "56$index", + 'entPhysicalDescr' => $contents['cienaCesEttpConfigEttpType'], + 'entPhysicalClass' => 'port', + 'entPhysicalName' => $contents['cienaCesEttpConfigName'], + 'entPhysicalContainedIn' => '55' . $slotIndex, 'entPhysicalParentRelPos' => $index, - 'ifIndex' => $portIndex, + 'ifIndex' => $portIndex, ]; if (isset($cienaCesPortXcvrEntry[$index])) { if ($cienaCesPortXcvrEntry[$index]['cienaCesPortXcvrOperState'] != 'notPresent') { @@ -280,17 +280,17 @@ foreach ($cienaCesEttpConfigEntry as $index => $contents) { $mfgString = ($cienaCesPortXcvrEntry[$index]['cienaCesPortXcvrMfgDate'] != '' ? 'manufactured ' . $cienaCesPortXcvrEntry[$index]['cienaCesPortXcvrMfgDate'] . ' ' : ''); $entity_array[] = [ - 'entPhysicalIndex' => $portIndex, - 'entPhysicalDescr' => $cienaCesPortXcvrEntry[$index]['cienaCesPortXcvrVendorName'] . ' ' . $wavelengthString . + 'entPhysicalIndex' => $portIndex, + 'entPhysicalDescr' => $cienaCesPortXcvrEntry[$index]['cienaCesPortXcvrVendorName'] . ' ' . $wavelengthString . $cienaCesPortXcvrEntry[$index]['cienaCesPortXcvrIdentiferType'] . ' transceiver ' . $mfgString, - 'entPhysicalClass' => 'sensor', - 'entPhysicalModelName' => $cienaCesPortXcvrEntry[$index]['cienaCesPortXcvrVendorPartNum'], - 'entPhysicalSerialNum' => $cienaCesPortXcvrEntry[$index]['cienaCesPortXcvrSerialNum'], - 'entPhysicalContainedIn' => "56$index", - 'entPhysicalMfgName' => $cienaCesPortXcvrEntry[$index]['cienaCesPortXcvrVendorName'], + 'entPhysicalClass' => 'sensor', + 'entPhysicalModelName' => $cienaCesPortXcvrEntry[$index]['cienaCesPortXcvrVendorPartNum'], + 'entPhysicalSerialNum' => $cienaCesPortXcvrEntry[$index]['cienaCesPortXcvrSerialNum'], + 'entPhysicalContainedIn' => "56$index", + 'entPhysicalMfgName' => $cienaCesPortXcvrEntry[$index]['cienaCesPortXcvrVendorName'], 'entPhysicalParentRelPos' => -1, - 'entPhysicalHardwareRev' => $cienaCesPortXcvrEntry[$index]['cienaCesPortXcvrRevNum'], - 'entPhysicalIsFRU' => 'true', + 'entPhysicalHardwareRev' => $cienaCesPortXcvrEntry[$index]['cienaCesPortXcvrRevNum'], + 'entPhysicalIsFRU' => 'true', ]; } } diff --git a/includes/discovery/entity-physical/cimc.inc.php b/includes/discovery/entity-physical/cimc.inc.php index f38b558105..f4260cc18d 100644 --- a/includes/discovery/entity-physical/cimc.inc.php +++ b/includes/discovery/entity-physical/cimc.inc.php @@ -13,7 +13,7 @@ $comp_module = 'Cisco-CIMC'; $component = new LibreNMS\Component(); -$components = $component->getComponents($device['device_id'], ['type'=>$comp_module]); +$components = $component->getComponents($device['device_id'], ['type' => $comp_module]); // We only care about our device id. $components = $components[$device['device_id']]; @@ -72,10 +72,10 @@ if (is_null($tblUCSObjects)) { // Lets Set some defaults. $entPhysicalData = [ - 'entPhysicalHardwareRev' => '', - 'entPhysicalFirmwareRev' => '', - 'entPhysicalSoftwareRev' => '', - 'entPhysicalIsFRU' => 'FALSE', + 'entPhysicalHardwareRev' => '', + 'entPhysicalFirmwareRev' => '', + 'entPhysicalSoftwareRev' => '', + 'entPhysicalIsFRU' => 'FALSE', ]; switch ($tbl) { diff --git a/includes/discovery/entity-physical/eltex-mes23xx.inc.php b/includes/discovery/entity-physical/eltex-mes23xx.inc.php index fd44781a5d..07a0b890cf 100644 --- a/includes/discovery/entity-physical/eltex-mes23xx.inc.php +++ b/includes/discovery/entity-physical/eltex-mes23xx.inc.php @@ -38,16 +38,16 @@ foreach ($trans as $index => $data) { } if ($connectedto) { $entity_array[] = [ - 'entPhysicalIndex' => $index, - 'entPhysicalDescr' => $data['eltPhdTransceiverInfoType'], - 'entPhysicalClass' => 'sfp-cage', - 'entPhysicalName' => strtoupper($data['eltPhdTransceiverInfoConnectorType']), - 'entPhysicalModelName' => \LibreNMS\OS\EltexMes23xx::normData($data['eltPhdTransceiverInfoPartNumber']), - 'entPhysicalSerialNum' => $data['eltPhdTransceiverInfoSerialNumber'], - 'entPhysicalContainedIn' => $connectedto, - 'entPhysicalMfgName' => $data['eltPhdTransceiverInfoVendorName'], - 'entPhysicalHardwareRev' => \LibreNMS\OS\EltexMes23xx::normData($data['eltPhdTransceiverInfoVendorRev']), - 'entPhysicalIsFRU' => 'true', + 'entPhysicalIndex' => $index, + 'entPhysicalDescr' => $data['eltPhdTransceiverInfoType'], + 'entPhysicalClass' => 'sfp-cage', + 'entPhysicalName' => strtoupper($data['eltPhdTransceiverInfoConnectorType']), + 'entPhysicalModelName' => \LibreNMS\OS\EltexMes23xx::normData($data['eltPhdTransceiverInfoPartNumber']), + 'entPhysicalSerialNum' => $data['eltPhdTransceiverInfoSerialNumber'], + 'entPhysicalContainedIn' => $connectedto, + 'entPhysicalMfgName' => $data['eltPhdTransceiverInfoVendorName'], + 'entPhysicalHardwareRev' => \LibreNMS\OS\EltexMes23xx::normData($data['eltPhdTransceiverInfoVendorRev']), + 'entPhysicalIsFRU' => 'true', ]; } } diff --git a/includes/discovery/entity-physical/entity-physical.inc.php b/includes/discovery/entity-physical/entity-physical.inc.php index 94298b0da0..8a5a5451c9 100644 --- a/includes/discovery/entity-physical/entity-physical.inc.php +++ b/includes/discovery/entity-physical/entity-physical.inc.php @@ -269,24 +269,24 @@ foreach ($entity_array as $entPhysicalIndex => $entry) { // List of real names for cisco entities $entPhysicalVendorTypes = [ - 'cevC7xxxIo1feTxIsl' => 'C7200-IO-FE-MII', + 'cevC7xxxIo1feTxIsl' => 'C7200-IO-FE-MII', 'cevChassis7140Dualfe' => 'C7140-2FE', - 'cevChassis7204' => 'C7204', - 'cevChassis7204Vxr' => 'C7204VXR', - 'cevChassis7206' => 'C7206', - 'cevChassis7206Vxr' => 'C7206VXR', - 'cevCpu7200Npe200' => 'NPE-200', - 'cevCpu7200Npe225' => 'NPE-225', - 'cevCpu7200Npe300' => 'NPE-300', - 'cevCpu7200Npe400' => 'NPE-400', - 'cevCpu7200Npeg1' => 'NPE-G1', - 'cevCpu7200Npeg2' => 'NPE-G2', - 'cevPa1feTxIsl' => 'PA-FE-TX-ISL', - 'cevPa2feTxI82543' => 'PA-2FE-TX', - 'cevPa8e' => 'PA-8E', - 'cevPaA8tX21' => 'PA-8T-X21', - 'cevMGBIC1000BaseLX' => '1000BaseLX GBIC', - 'cevPort10GigBaseLR' => '10GigBaseLR', + 'cevChassis7204' => 'C7204', + 'cevChassis7204Vxr' => 'C7204VXR', + 'cevChassis7206' => 'C7206', + 'cevChassis7206Vxr' => 'C7206VXR', + 'cevCpu7200Npe200' => 'NPE-200', + 'cevCpu7200Npe225' => 'NPE-225', + 'cevCpu7200Npe300' => 'NPE-300', + 'cevCpu7200Npe400' => 'NPE-400', + 'cevCpu7200Npeg1' => 'NPE-G1', + 'cevCpu7200Npeg2' => 'NPE-G2', + 'cevPa1feTxIsl' => 'PA-FE-TX-ISL', + 'cevPa2feTxI82543' => 'PA-2FE-TX', + 'cevPa8e' => 'PA-8E', + 'cevPaA8tX21' => 'PA-8T-X21', + 'cevMGBIC1000BaseLX' => '1000BaseLX GBIC', + 'cevPort10GigBaseLR' => '10GigBaseLR', ]; if (! empty($entPhysicalVendorTypes[$entPhysicalVendorType]) && ! $entPhysicalModelName) { diff --git a/includes/discovery/entity-physical/eurostor.inc.php b/includes/discovery/entity-physical/eurostor.inc.php index d6e89f8cb6..1315c0169d 100644 --- a/includes/discovery/entity-physical/eurostor.inc.php +++ b/includes/discovery/entity-physical/eurostor.inc.php @@ -5,15 +5,15 @@ $id = 1; foreach ($chassis_array as $chassis_contents) { // Discover the chassis $entity_array[] = [ - 'entPhysicalIndex' => $id++, - 'entPhysicalDescr' => "Eurostore {$chassis_contents['siModel']}", - 'entPhysicalClass' => 'chassis', - 'entPhysicalModelName' => $chassis_contents['siModel'], - 'entPhysicalSerialNum' => $chassis_contents['siSerial'], - 'entPhysicalContainedIn' => '0', - 'entPhysicalVendorType' => $chassis_contents['siVendor'], - 'entPhysicalHardwareRev' => $chassis_contents['siBootVer'], - 'entPhysicalFirmwareRev' => $chassis_contents['siFirmVer'], + 'entPhysicalIndex' => $id++, + 'entPhysicalDescr' => "Eurostore {$chassis_contents['siModel']}", + 'entPhysicalClass' => 'chassis', + 'entPhysicalModelName' => $chassis_contents['siModel'], + 'entPhysicalSerialNum' => $chassis_contents['siSerial'], + 'entPhysicalContainedIn' => '0', + 'entPhysicalVendorType' => $chassis_contents['siVendor'], + 'entPhysicalHardwareRev' => $chassis_contents['siBootVer'], + 'entPhysicalFirmwareRev' => $chassis_contents['siFirmVer'], ]; } @@ -27,10 +27,10 @@ for ($i = 1; $i <= 8; $i++) { $backplane_id = $id++; // Discover the chassis $entity_array[] = [ - 'entPhysicalIndex' => $backplane_id, - 'entPhysicalDescr' => $backplane_contents['hwEnclosure0' . $i . 'Description'], - 'entPhysicalClass' => 'backplane', - 'entPhysicalContainedIn' => '1', + 'entPhysicalIndex' => $backplane_id, + 'entPhysicalDescr' => $backplane_contents['hwEnclosure0' . $i . 'Description'], + 'entPhysicalClass' => 'backplane', + 'entPhysicalContainedIn' => '1', 'entPhysicalParentRelPos' => $i, ]; @@ -39,16 +39,16 @@ for ($i = 1; $i <= 8; $i++) { foreach ($hdd_array as $hdd_contents) { // Discover the chassis $entity_array[] = [ - 'entPhysicalContainedIn' => $backplane_id, - 'entPhysicalIndex' => $id++, - 'entPhysicalDescr' => $hdd_contents['hddEnclosure0' . $i . 'Desc'], - 'entPhysicalClass' => 'container', + 'entPhysicalContainedIn' => $backplane_id, + 'entPhysicalIndex' => $id++, + 'entPhysicalDescr' => $hdd_contents['hddEnclosure0' . $i . 'Desc'], + 'entPhysicalClass' => 'container', 'entPhysicalParentRelPos' => $hdd_contents['hddEnclosure0' . $i . 'Slots'], - 'entPhysicalName' => $hdd_contents['hddEnclosure0' . $i . 'Name'], - 'entPhysicalSerialNum' => $hdd_contents['hddEnclosure0' . $i . 'Serial'], - 'entPhysicalFirmwareRev' => $hdd_contents['hddEnclosure0' . $i . 'FrimVer'], - 'entPhysicalIsFRU' => 'true', - 'entPhysicalAlias' => $hdd_contents['hddEnclosure0' . $i . 'State'], + 'entPhysicalName' => $hdd_contents['hddEnclosure0' . $i . 'Name'], + 'entPhysicalSerialNum' => $hdd_contents['hddEnclosure0' . $i . 'Serial'], + 'entPhysicalFirmwareRev' => $hdd_contents['hddEnclosure0' . $i . 'FrimVer'], + 'entPhysicalIsFRU' => 'true', + 'entPhysicalAlias' => $hdd_contents['hddEnclosure0' . $i . 'State'], ]; } } diff --git a/includes/discovery/entity-physical/linux.inc.php b/includes/discovery/entity-physical/linux.inc.php index 9205222d7e..8dd8483038 100644 --- a/includes/discovery/entity-physical/linux.inc.php +++ b/includes/discovery/entity-physical/linux.inc.php @@ -9,59 +9,59 @@ $entity_array = []; foreach ($controller_array as $controller) { // Discover the chassis $entity_array[] = [ - 'entPhysicalIndex' => 200 + $controller['adapterID-AIT'], + 'entPhysicalIndex' => 200 + $controller['adapterID-AIT'], 'entPhysicalParentRelPos' => $controller['adapterID-AIT'], - 'entPhysicalDescr' => '/C' . $controller['adapterID-AIT'], - 'entPhysicalClass' => 'port', - 'entPhysicalModelName' => $controller['productName'], - 'entPhysicalSerialNum' => $controller['serialNo'], - 'entPhysicalContainedIn' => '0', - 'entPhysicalVendorType' => $controller['adapterVendorID'], - 'entPhysicalFirmwareRev' => $controller['firmwareVersion'], + 'entPhysicalDescr' => '/C' . $controller['adapterID-AIT'], + 'entPhysicalClass' => 'port', + 'entPhysicalModelName' => $controller['productName'], + 'entPhysicalSerialNum' => $controller['serialNo'], + 'entPhysicalContainedIn' => '0', + 'entPhysicalVendorType' => $controller['adapterVendorID'], + 'entPhysicalFirmwareRev' => $controller['firmwareVersion'], ]; } foreach ($bbus as $bbu) { // Discover the chassis $entity_array[] = [ - 'entPhysicalIndex' => 1000 + $bbu['pdIndex'], - 'entPhysicalClass' => 'charge', - 'entPhysicalModelName' => $bbu['deviceName'], - 'entPhysicalSerialNum' => $bbu['serialNumber'], - 'entPhysicalContainedIn' => 200 + $bbu['adpID'], - 'entPhysicalIsFRU' => 'true', - 'entPhysicalFirmwareRev' => $bbu['firmwareStatus'], + 'entPhysicalIndex' => 1000 + $bbu['pdIndex'], + 'entPhysicalClass' => 'charge', + 'entPhysicalModelName' => $bbu['deviceName'], + 'entPhysicalSerialNum' => $bbu['serialNumber'], + 'entPhysicalContainedIn' => 200 + $bbu['adpID'], + 'entPhysicalIsFRU' => 'true', + 'entPhysicalFirmwareRev' => $bbu['firmwareStatus'], ]; } foreach ($enclosures as $enclosure) { // Discover the chassis $entity_array[] = [ - 'entPhysicalIndex' => 210 + $enclosure['deviceId'], - 'entPhysicalMfgName' => $enclosure['slotCount'], + 'entPhysicalIndex' => 210 + $enclosure['deviceId'], + 'entPhysicalMfgName' => $enclosure['slotCount'], 'entPhysicalParentRelPos' => $enclosure['deviceId'], - 'entPhysicalDescr' => '/C' . $enclosure['adapterID-CDIT'] . '/E' . $enclosure['deviceId'], - 'entPhysicalClass' => 'chassis', - 'entPhysicalModelName' => $enclosure['productID'], - 'entPhysicalSerialNum' => $enclosure['enclSerialNumber'], - 'entPhysicalContainedIn' => 200 + $enclosure['adapterID-CDIT'], - 'entPhysicalVendorType' => $enclosure['adapterVendorID'], - 'entPhysicalFirmwareRev' => $enclosure['firmwareVersion'], + 'entPhysicalDescr' => '/C' . $enclosure['adapterID-CDIT'] . '/E' . $enclosure['deviceId'], + 'entPhysicalClass' => 'chassis', + 'entPhysicalModelName' => $enclosure['productID'], + 'entPhysicalSerialNum' => $enclosure['enclSerialNumber'], + 'entPhysicalContainedIn' => 200 + $enclosure['adapterID-CDIT'], + 'entPhysicalVendorType' => $enclosure['adapterVendorID'], + 'entPhysicalFirmwareRev' => $enclosure['firmwareVersion'], ]; } foreach ($drives as $drive) { // Discover the chassis $entity_array[] = [ - 'entPhysicalIndex' => 500 + $drive['enclDeviceId'] * 100 + $drive['physDevID'], + 'entPhysicalIndex' => 500 + $drive['enclDeviceId'] * 100 + $drive['physDevID'], 'entPhysicalParentRelPos' => $drive['slotNumber'], - 'entPhysicalDescr' => '/C' . $drive['adpID-PDT'] . '/E' . $drive['enclDeviceId'] . '/S' . $drive['slotNumber'], - 'entPhysicalClass' => 'drive', - 'entPhysicalModelName' => $drive['pdProductID'], - 'entPhysicalSerialNum' => $drive['pdSerialNumber'], - 'entPhysicalContainedIn' => 210 + $drive['enclDeviceId'], - 'entPhysicalIsFRU' => 'true', - 'entPhysicalFirmwareRev' => $drive['pdFwversion'], + 'entPhysicalDescr' => '/C' . $drive['adpID-PDT'] . '/E' . $drive['enclDeviceId'] . '/S' . $drive['slotNumber'], + 'entPhysicalClass' => 'drive', + 'entPhysicalModelName' => $drive['pdProductID'], + 'entPhysicalSerialNum' => $drive['pdSerialNumber'], + 'entPhysicalContainedIn' => 210 + $drive['enclDeviceId'], + 'entPhysicalIsFRU' => 'true', + 'entPhysicalFirmwareRev' => $drive['pdFwversion'], ]; } diff --git a/includes/discovery/entity-physical/mrv-od.inc.php b/includes/discovery/entity-physical/mrv-od.inc.php index 6d71411058..bf11164524 100644 --- a/includes/discovery/entity-physical/mrv-od.inc.php +++ b/includes/discovery/entity-physical/mrv-od.inc.php @@ -21,9 +21,9 @@ $port_array = snmpwalk_cache_multi_oid($device, 'nbsCmmcPortTable', $port_array, // We use the last digit in the OID to define an entPhysicalIndex for Power Supply state sensors $nbsCmmcChassisPSStatus_array = [ - 7 => 'nbsCmmcChassisPS1Status', - 8 => 'nbsCmmcChassisPS2Status', - 9 => 'nbsCmmcChassisPS3Status', + 7 => 'nbsCmmcChassisPS1Status', + 8 => 'nbsCmmcChassisPS2Status', + 9 => 'nbsCmmcChassisPS3Status', 10 => 'nbsCmmcChassisPS4Status', ]; @@ -54,33 +54,33 @@ $nbsCmmcPortType_array = [ $nbsCmmcPortSensor_array = [ 30 => [ - 'objectType' => 'nbsCmmcPortTemperature', - 'skipValue' => '-2147483648', + 'objectType' => 'nbsCmmcPortTemperature', + 'skipValue' => '-2147483648', 'entPhysicalName' => 'Port Temperature', ], 31 => [ - 'objectType' => 'nbsCmmcPortTxPower', - 'skipValue' => '-2147483648', + 'objectType' => 'nbsCmmcPortTxPower', + 'skipValue' => '-2147483648', 'entPhysicalName' => 'Port Tx Power', ], 32 => [ - 'objectType' => 'nbsCmmcPortRxPower', - 'skipValue' => '-2147483648', + 'objectType' => 'nbsCmmcPortRxPower', + 'skipValue' => '-2147483648', 'entPhysicalName' => 'Port Rx Power', ], 33 => [ - 'objectType' => 'nbsCmmcPortBiasAmps', - 'skipValue' => '-1', + 'objectType' => 'nbsCmmcPortBiasAmps', + 'skipValue' => '-1', 'entPhysicalName' => 'Port Tx Bias Current', ], 34 => [ - 'objectType' => 'nbsCmmcPortSupplyVolts', - 'skipValue' => '-1', + 'objectType' => 'nbsCmmcPortSupplyVolts', + 'skipValue' => '-1', 'entPhysicalName' => 'Port Tx Supply Voltage', ], 38 => [ - 'objectType' => 'nbsCmmcPortDigitalDiags', - 'skipValue' => '1', + 'objectType' => 'nbsCmmcPortDigitalDiags', + 'skipValue' => '1', 'entPhysicalName' => 'Port Overall DigiDiags State', ], ]; @@ -89,47 +89,47 @@ foreach ($chassis_array as $nbsCmmcChassis => $chassis_contents) { [$chassisHardwareRev, $chassisFirmwareRev] = explode(', ', $chassis_contents['nbsCmmcChassisHardwareRevision']); // Discover the chassis $entity_array[] = [ - 'entPhysicalIndex' => $chassis_contents['nbsCmmcChassisIfIndex'] . '00', - 'entPhysicalDescr' => "MRV OptiDriver {$chassis_contents['nbsCmmcChassisModel']}", - 'entPhysicalClass' => 'chassis', - 'entPhysicalName' => "Chassis $nbsCmmcChassis", - 'entPhysicalModelName' => $chassis_contents['nbsCmmcChassisModel'], - 'entPhysicalSerialNum' => $chassis_contents['nbsCmmcChassisSerialNum'], - 'entPhysicalContainedIn' => '0', - 'entPhysicalMfgName' => 'MRV Communications', + 'entPhysicalIndex' => $chassis_contents['nbsCmmcChassisIfIndex'] . '00', + 'entPhysicalDescr' => "MRV OptiDriver {$chassis_contents['nbsCmmcChassisModel']}", + 'entPhysicalClass' => 'chassis', + 'entPhysicalName' => "Chassis $nbsCmmcChassis", + 'entPhysicalModelName' => $chassis_contents['nbsCmmcChassisModel'], + 'entPhysicalSerialNum' => $chassis_contents['nbsCmmcChassisSerialNum'], + 'entPhysicalContainedIn' => '0', + 'entPhysicalMfgName' => 'MRV Communications', 'entPhysicalParentRelPos' => $chassis_contents['nbsCmmcChassisIndex'], - 'entPhysicalVendorType' => $chassis_contents['nbsCmmcChassisType'], - 'entPhysicalHardwareRev' => $chassisHardwareRev, - 'entPhysicalFirmwareRev' => $chassisFirmwareRev, - 'entPhysicalIsFRU' => 'true', - 'entPhysicalAlias' => $chassis_contents['nbsCmmcChassisName'], + 'entPhysicalVendorType' => $chassis_contents['nbsCmmcChassisType'], + 'entPhysicalHardwareRev' => $chassisHardwareRev, + 'entPhysicalFirmwareRev' => $chassisFirmwareRev, + 'entPhysicalIsFRU' => 'true', + 'entPhysicalAlias' => $chassis_contents['nbsCmmcChassisName'], ]; // Discover the chassis temperature sensor if (isset($chassis_contents['nbsCmmcChassisTemperature']) && $chassis_contents['nbsCmmcChassisTemperature'] != '-2147483648') { $entity_array[] = [ - 'entPhysicalIndex' => "{$chassis_contents['nbsCmmcChassisIfIndex']}15", - 'entPhysicalDescr' => 'Chassis Temperature Sensor', - 'entPhysicalClass' => 'sensor', - 'entPhysicalName' => 'Chassis Temperature', - 'entPhysicalContainedIn' => "{$chassis_contents['nbsCmmcChassisIfIndex']}00", - 'entPhysicalMfgName' => 'MRV Communications', + 'entPhysicalIndex' => "{$chassis_contents['nbsCmmcChassisIfIndex']}15", + 'entPhysicalDescr' => 'Chassis Temperature Sensor', + 'entPhysicalClass' => 'sensor', + 'entPhysicalName' => 'Chassis Temperature', + 'entPhysicalContainedIn' => "{$chassis_contents['nbsCmmcChassisIfIndex']}00", + 'entPhysicalMfgName' => 'MRV Communications', 'entPhysicalParentRelPos' => '-1', - 'entPhysicalIsFRU' => 'false', + 'entPhysicalIsFRU' => 'false', ]; } // Discover the chassis power budget status sensor if (isset($chassis_contents['nbsCmmcChassisPowerStatus']) && $chassis_contents['nbsCmmcChassisPowerStatus'] != 'notSupported') { $entity_array[] = [ - 'entPhysicalIndex' => "{$chassis_contents['nbsCmmcChassisIfIndex']}51", - 'entPhysicalDescr' => 'Chassis Power Budget Status Sensor', - 'entPhysicalClass' => 'sensor', - 'entPhysicalName' => 'Chassis Power Budget Status', - 'entPhysicalContainedIn' => "{$chassis_contents['nbsCmmcChassisIfIndex']}00", - 'entPhysicalMfgName' => 'MRV Communications', + 'entPhysicalIndex' => "{$chassis_contents['nbsCmmcChassisIfIndex']}51", + 'entPhysicalDescr' => 'Chassis Power Budget Status Sensor', + 'entPhysicalClass' => 'sensor', + 'entPhysicalName' => 'Chassis Power Budget Status', + 'entPhysicalContainedIn' => "{$chassis_contents['nbsCmmcChassisIfIndex']}00", + 'entPhysicalMfgName' => 'MRV Communications', 'entPhysicalParentRelPos' => '-1', - 'entPhysicalIsFRU' => 'false', + 'entPhysicalIsFRU' => 'false', ]; } @@ -138,24 +138,24 @@ foreach ($chassis_array as $nbsCmmcChassis => $chassis_contents) { if (isset($chassis_contents[$item]) && $chassis_contents[$item] != 'notSupported') { $position = substr($item, 16, 1); $entity_array[] = [ - 'entPhysicalIndex' => $chassis_contents['nbsCmmcChassisIfIndex'] . $position, - 'entPhysicalDescr' => 'Power Supply', - 'entPhysicalClass' => 'powerSupply', - 'entPhysicalName' => "Power Supply $position", - 'entPhysicalContainedIn' => "{$chassis_contents['nbsCmmcChassisIfIndex']}00", - 'entPhysicalMfgName' => 'MRV Communications', + 'entPhysicalIndex' => $chassis_contents['nbsCmmcChassisIfIndex'] . $position, + 'entPhysicalDescr' => 'Power Supply', + 'entPhysicalClass' => 'powerSupply', + 'entPhysicalName' => "Power Supply $position", + 'entPhysicalContainedIn' => "{$chassis_contents['nbsCmmcChassisIfIndex']}00", + 'entPhysicalMfgName' => 'MRV Communications', 'entPhysicalParentRelPos' => $position, - 'entPhysicalIsFRU' => 'false', + 'entPhysicalIsFRU' => 'false', ]; $entity_array[] = [ - 'entPhysicalIndex' => $chassis_contents['nbsCmmcChassisIfIndex'] . $index, - 'entPhysicalDescr' => 'Power Supply State', - 'entPhysicalClass' => 'sensor', - 'entPhysicalName' => "Power Supply $position", - 'entPhysicalContainedIn' => $chassis_contents['nbsCmmcChassisIfIndex'] . $position, - 'entPhysicalMfgName' => 'MRV Communications', + 'entPhysicalIndex' => $chassis_contents['nbsCmmcChassisIfIndex'] . $index, + 'entPhysicalDescr' => 'Power Supply State', + 'entPhysicalClass' => 'sensor', + 'entPhysicalName' => "Power Supply $position", + 'entPhysicalContainedIn' => $chassis_contents['nbsCmmcChassisIfIndex'] . $position, + 'entPhysicalMfgName' => 'MRV Communications', 'entPhysicalParentRelPos' => '-1', - 'entPhysicalIsFRU' => 'true', + 'entPhysicalIsFRU' => 'true', ]; } } @@ -165,24 +165,24 @@ foreach ($chassis_array as $nbsCmmcChassis => $chassis_contents) { if (isset($chassis_contents[$item]) && $chassis_contents[$item] != 'notSupported') { $position = substr($item, 17, 1); $entity_array[] = [ - 'entPhysicalIndex' => "{$chassis_contents['nbsCmmcChassisIfIndex']}0$position", - 'entPhysicalDescr' => 'Fan Tray', - 'entPhysicalClass' => 'fan', - 'entPhysicalName' => "Fan Tray $position", - 'entPhysicalContainedIn' => "{$chassis_contents['nbsCmmcChassisIfIndex']}00", - 'entPhysicalMfgName' => 'MRV Communications', + 'entPhysicalIndex' => "{$chassis_contents['nbsCmmcChassisIfIndex']}0$position", + 'entPhysicalDescr' => 'Fan Tray', + 'entPhysicalClass' => 'fan', + 'entPhysicalName' => "Fan Tray $position", + 'entPhysicalContainedIn' => "{$chassis_contents['nbsCmmcChassisIfIndex']}00", + 'entPhysicalMfgName' => 'MRV Communications', 'entPhysicalParentRelPos' => $position, - 'entPhysicalIsFRU' => 'false', + 'entPhysicalIsFRU' => 'false', ]; $entity_array[] = [ - 'entPhysicalIndex' => $chassis_contents['nbsCmmcChassisIfIndex'] . $index, - 'entPhysicalDescr' => 'Fan State', - 'entPhysicalClass' => 'sensor', - 'entPhysicalName' => "Fan $position", - 'entPhysicalContainedIn' => "{$chassis_contents['nbsCmmcChassisIfIndex']}0$position", - 'entPhysicalMfgName' => 'MRV Communications', + 'entPhysicalIndex' => $chassis_contents['nbsCmmcChassisIfIndex'] . $index, + 'entPhysicalDescr' => 'Fan State', + 'entPhysicalClass' => 'sensor', + 'entPhysicalName' => "Fan $position", + 'entPhysicalContainedIn' => "{$chassis_contents['nbsCmmcChassisIfIndex']}0$position", + 'entPhysicalMfgName' => 'MRV Communications', 'entPhysicalParentRelPos' => '-1', - 'entPhysicalIsFRU' => 'true', + 'entPhysicalIsFRU' => 'true', ]; } } @@ -195,46 +195,46 @@ foreach ($slot_array as $nbsCmmcSlot => $slot_contents) { $nbsCmmcSlotIfIndex = $nbsCmmcChassisIfIndex + $slot_contents['nbsCmmcSlotIndex'] * 1000; // Discover the slot $entity_array[] = [ - 'entPhysicalIndex' => $nbsCmmcSlotIfIndex . '00', - 'entPhysicalDescr' => 'MRV OptiDriver Slot', - 'entPhysicalClass' => 'container', - 'entPhysicalName' => "Card Slot $nbsCmmcSlot", - 'entPhysicalContainedIn' => $nbsCmmcChassisIfIndex . '00', - 'entPhysicalMfgName' => 'MRV Communications', + 'entPhysicalIndex' => $nbsCmmcSlotIfIndex . '00', + 'entPhysicalDescr' => 'MRV OptiDriver Slot', + 'entPhysicalClass' => 'container', + 'entPhysicalName' => "Card Slot $nbsCmmcSlot", + 'entPhysicalContainedIn' => $nbsCmmcChassisIfIndex . '00', + 'entPhysicalMfgName' => 'MRV Communications', 'entPhysicalParentRelPos' => $slot_contents['nbsCmmcSlotIndex'], - 'entPhysicalIsFRU' => 'false', + 'entPhysicalIsFRU' => 'false', ]; if (isset($slot_contents['nbsCmmcSlotIfIndex']) && $slot_contents['nbsCmmcSlotIfIndex'] != '-1') { [$cardHardwareRev, $cardFirmwareRev, $cardOtherRev] = explode(', ', $slot_contents['nbsCmmcSlotHardwareRevision']); // Discover the card $entity_array[] = [ - 'entPhysicalIndex' => $slot_contents['nbsCmmcSlotIfIndex'] . '01', - 'entPhysicalDescr' => 'MRV ' . ucfirst($slot_contents['nbsCmmcSlotOperationType']) . ' Card', - 'entPhysicalClass' => 'module', - 'entPhysicalName' => "Card $nbsCmmcSlot", - 'entPhysicalModelName' => $slot_contents['nbsCmmcSlotModel'], - 'entPhysicalSerialNum' => $slot_contents['nbsCmmcSlotSerialNum'], - 'entPhysicalContainedIn' => "{$slot_contents['nbsCmmcSlotIfIndex']}00", - 'entPhysicalMfgName' => 'MRV Communications', + 'entPhysicalIndex' => $slot_contents['nbsCmmcSlotIfIndex'] . '01', + 'entPhysicalDescr' => 'MRV ' . ucfirst($slot_contents['nbsCmmcSlotOperationType']) . ' Card', + 'entPhysicalClass' => 'module', + 'entPhysicalName' => "Card $nbsCmmcSlot", + 'entPhysicalModelName' => $slot_contents['nbsCmmcSlotModel'], + 'entPhysicalSerialNum' => $slot_contents['nbsCmmcSlotSerialNum'], + 'entPhysicalContainedIn' => "{$slot_contents['nbsCmmcSlotIfIndex']}00", + 'entPhysicalMfgName' => 'MRV Communications', 'entPhysicalParentRelPos' => '-1', - 'entPhysicalVendorType' => $slot_contents['nbsCmmcSlotType'], - 'entPhysicalHardwareRev' => "$cardHardwareRev, $cardOtherRev", - 'entPhysicalFirmwareRev' => $cardFirmwareRev, - 'entPhysicalIsFRU' => 'true', - 'entPhysicalAlias' => $slot_contents['nbsCmmcSlotName'], + 'entPhysicalVendorType' => $slot_contents['nbsCmmcSlotType'], + 'entPhysicalHardwareRev' => "$cardHardwareRev, $cardOtherRev", + 'entPhysicalFirmwareRev' => $cardFirmwareRev, + 'entPhysicalIsFRU' => 'true', + 'entPhysicalAlias' => $slot_contents['nbsCmmcSlotName'], ]; // Discover the module temperature sensor if (isset($slot_contents['nbsCmmcSlotTemperature']) && $slot_contents['nbsCmmcSlotTemperature'] != '-2147483648') { $entity_array[] = [ - 'entPhysicalIndex' => "{$slot_contents['nbsCmmcSlotIfIndex']}34", - 'entPhysicalDescr' => 'Card Temperature Sensor', - 'entPhysicalClass' => 'sensor', - 'entPhysicalName' => 'Card Temperature', - 'entPhysicalContainedIn' => "{$slot_contents['nbsCmmcSlotIfIndex']}01", - 'entPhysicalMfgName' => 'MRV Communications', + 'entPhysicalIndex' => "{$slot_contents['nbsCmmcSlotIfIndex']}34", + 'entPhysicalDescr' => 'Card Temperature Sensor', + 'entPhysicalClass' => 'sensor', + 'entPhysicalName' => 'Card Temperature', + 'entPhysicalContainedIn' => "{$slot_contents['nbsCmmcSlotIfIndex']}01", + 'entPhysicalMfgName' => 'MRV Communications', 'entPhysicalParentRelPos' => '-1', - 'entPhysicalIsFRU' => 'false', + 'entPhysicalIsFRU' => 'false', ]; } } @@ -251,14 +251,14 @@ foreach ($port_array as $nbsCmmcPort => $port_contents) { // Discover the transceiver container $entity_array[] = [ - 'entPhysicalIndex' => $port_contents['nbsCmmcPortIfIndex'] . '00', - 'entPhysicalDescr' => "$nbsCmmcPortType Transceiver Container", - 'entPhysicalClass' => 'container', - 'entPhysicalName' => "Transceiver Container $nbsCmmcPort", - 'entPhysicalContainedIn' => $nbsCmmcSlotIfIndex . '01', - 'entPhysicalMfgName' => 'MRV Communications', + 'entPhysicalIndex' => $port_contents['nbsCmmcPortIfIndex'] . '00', + 'entPhysicalDescr' => "$nbsCmmcPortType Transceiver Container", + 'entPhysicalClass' => 'container', + 'entPhysicalName' => "Transceiver Container $nbsCmmcPort", + 'entPhysicalContainedIn' => $nbsCmmcSlotIfIndex . '01', + 'entPhysicalMfgName' => 'MRV Communications', 'entPhysicalParentRelPos' => $port_contents['nbsCmmcPortIndex'], - 'entPhysicalIsFRU' => 'false', + 'entPhysicalIsFRU' => 'false', ]; // Set a few variables for the port discovery $nbsCmmcPortContainedIn = $port_contents['nbsCmmcPortIfIndex'] . '00'; @@ -293,34 +293,34 @@ foreach ($port_array as $nbsCmmcPort => $port_contents) { // Discover the port $entity_array[] = [ - 'entPhysicalIndex' => "{$port_contents['nbsCmmcPortIfIndex']}01", - 'entPhysicalDescr' => $portEntPhysicalDescr, - 'entPhysicalClass' => 'port', - 'entPhysicalName' => "Port $nbsCmmcPort", - 'entPhysicalModelName' => $nbsCmmcPortModelName, - 'entPhysicalSerialNum' => $port_contents['nbsCmmcPortSerialNumber'], - 'entPhysicalContainedIn' => $nbsCmmcPortContainedIn, - 'entPhysicalMfgName' => $nbsCmmcPortVendorInfo, + 'entPhysicalIndex' => "{$port_contents['nbsCmmcPortIfIndex']}01", + 'entPhysicalDescr' => $portEntPhysicalDescr, + 'entPhysicalClass' => 'port', + 'entPhysicalName' => "Port $nbsCmmcPort", + 'entPhysicalModelName' => $nbsCmmcPortModelName, + 'entPhysicalSerialNum' => $port_contents['nbsCmmcPortSerialNumber'], + 'entPhysicalContainedIn' => $nbsCmmcPortContainedIn, + 'entPhysicalMfgName' => $nbsCmmcPortVendorInfo, 'entPhysicalParentRelPos' => $nbsCmmcPortParentRelPos, - 'entPhysicalVendorType' => $port_contents['nbsCmmcPortType'], - 'entPhysicalHardwareRev' => $nbsCmmcPortHardwareRev, - 'entPhysicalIsFRU' => $nbsCmmcPortIsFRU, - 'entPhysicalAlias' => $port_contents['nbsCmmcPortName'], - 'ifIndex' => $port_contents['nbsCmmcPortIfIndex'], + 'entPhysicalVendorType' => $port_contents['nbsCmmcPortType'], + 'entPhysicalHardwareRev' => $nbsCmmcPortHardwareRev, + 'entPhysicalIsFRU' => $nbsCmmcPortIsFRU, + 'entPhysicalAlias' => $port_contents['nbsCmmcPortName'], + 'ifIndex' => $port_contents['nbsCmmcPortIfIndex'], ]; // Discover the port sensors foreach ($nbsCmmcPortSensor_array as $index => $nbsCmmcPortSensor) { if (isset($port_contents[$nbsCmmcPortSensor['objectType']]) && $port_contents[$nbsCmmcPortSensor['objectType']] != $nbsCmmcPortSensor['skipValue']) { $entity_array[] = [ - 'entPhysicalIndex' => $port_contents['nbsCmmcPortIfIndex'] . $index, - 'entPhysicalDescr' => "{$nbsCmmcPortSensor['entPhysicalName']} Sensor", - 'entPhysicalClass' => 'sensor', - 'entPhysicalName' => $nbsCmmcPortSensor['entPhysicalName'], - 'entPhysicalContainedIn' => "{$port_contents['nbsCmmcPortIfIndex']}01", - 'entPhysicalMfgName' => $nbsCmmcPortVendorInfo, + 'entPhysicalIndex' => $port_contents['nbsCmmcPortIfIndex'] . $index, + 'entPhysicalDescr' => "{$nbsCmmcPortSensor['entPhysicalName']} Sensor", + 'entPhysicalClass' => 'sensor', + 'entPhysicalName' => $nbsCmmcPortSensor['entPhysicalName'], + 'entPhysicalContainedIn' => "{$port_contents['nbsCmmcPortIfIndex']}01", + 'entPhysicalMfgName' => $nbsCmmcPortVendorInfo, 'entPhysicalParentRelPos' => '-1', - 'entPhysicalIsFRU' => 'false', + 'entPhysicalIsFRU' => 'false', ]; } } diff --git a/includes/discovery/entity-physical/tait-infra93.inc.php b/includes/discovery/entity-physical/tait-infra93.inc.php index 7060c473f3..fda9274e6e 100644 --- a/includes/discovery/entity-physical/tait-infra93.inc.php +++ b/includes/discovery/entity-physical/tait-infra93.inc.php @@ -21,14 +21,14 @@ d_echo($modules_array); // Create a fake Chassis to host the modules we discover $entity_array[] = [ - 'entPhysicalIndex' => '10', - 'entPhysicalDescr' => 'Chassis', - 'entPhysicalClass' => 'chassis', - 'entPhysicalName' => 'Chassis', - 'entPhysicalModelName' => 'Infra93', - 'entPhysicalContainedIn' => '0', - 'entPhysicalMfgName' => 'TAIT', - 'entPhysicalIsFRU' => 'false', + 'entPhysicalIndex' => '10', + 'entPhysicalDescr' => 'Chassis', + 'entPhysicalClass' => 'chassis', + 'entPhysicalName' => 'Chassis', + 'entPhysicalModelName' => 'Infra93', + 'entPhysicalContainedIn' => '0', + 'entPhysicalMfgName' => 'TAIT', + 'entPhysicalIsFRU' => 'false', ]; // Fill the different modules the "entPhysical" way to have a correct display. @@ -36,86 +36,86 @@ $entity_array[] = [ // this code would need to be adapted with loops if (isset($modules_array[0]) and isset($modules_array[0]['fpInfoProductCode'])) { $entity_array[] = [ - 'entPhysicalIndex' => '11', - 'entPhysicalDescr' => 'Front Panel', - 'entPhysicalClass' => 'module', - 'entPhysicalName' => 'Front Panel', - 'entPhysicalModelName' => $modules_array[0]['fpInfoProductCode'], - 'entPhysicalSerialNum' => $modules_array[0]['fpInfoSerialNumber'], - 'entPhysicalContainedIn' => '10', - 'entPhysicalMfgName' => 'TAIT', - 'entPhysicalHardwareRev' => $modules_array[0]['fpInfoHardwareVersion'], - 'entPhysicalFirmwareRev' => $modules_array[0]['fpInfoFirmwareVersion'], - 'entPhysicalIsFRU' => 'true', + 'entPhysicalIndex' => '11', + 'entPhysicalDescr' => 'Front Panel', + 'entPhysicalClass' => 'module', + 'entPhysicalName' => 'Front Panel', + 'entPhysicalModelName' => $modules_array[0]['fpInfoProductCode'], + 'entPhysicalSerialNum' => $modules_array[0]['fpInfoSerialNumber'], + 'entPhysicalContainedIn' => '10', + 'entPhysicalMfgName' => 'TAIT', + 'entPhysicalHardwareRev' => $modules_array[0]['fpInfoHardwareVersion'], + 'entPhysicalFirmwareRev' => $modules_array[0]['fpInfoFirmwareVersion'], + 'entPhysicalIsFRU' => 'true', ]; } if (isset($modules_array[0]) and isset($modules_array[0]['rctInfoProductCode'])) { $entity_array[] = [ - 'entPhysicalIndex' => '120', - 'entPhysicalDescr' => 'Reciter', - 'entPhysicalClass' => 'module', - 'entPhysicalName' => 'Reciter', - 'entPhysicalModelName' => $modules_array[0]['rctInfoProductCode'], - 'entPhysicalSerialNum' => $modules_array[0]['rctInfoSerialNumber'], - 'entPhysicalContainedIn' => '10', - 'entPhysicalMfgName' => 'TAIT', - 'entPhysicalHardwareRev' => $modules_array[0]['rctInfoHardwareVersion'], - 'entPhysicalFirmwareRev' => $modules_array[0]['rctInfoFirmwareVersion'], - 'entPhysicalIsFRU' => 'true', + 'entPhysicalIndex' => '120', + 'entPhysicalDescr' => 'Reciter', + 'entPhysicalClass' => 'module', + 'entPhysicalName' => 'Reciter', + 'entPhysicalModelName' => $modules_array[0]['rctInfoProductCode'], + 'entPhysicalSerialNum' => $modules_array[0]['rctInfoSerialNumber'], + 'entPhysicalContainedIn' => '10', + 'entPhysicalMfgName' => 'TAIT', + 'entPhysicalHardwareRev' => $modules_array[0]['rctInfoHardwareVersion'], + 'entPhysicalFirmwareRev' => $modules_array[0]['rctInfoFirmwareVersion'], + 'entPhysicalIsFRU' => 'true', ]; $entity_array[] = [ - 'entPhysicalIndex' => '1200', - 'entPhysicalDescr' => 'Reciter Temperature Sensor', - 'entPhysicalClass' => 'sensor', - 'entPhysicalName' => 'Reciter Temperature', - 'entPhysicalContainedIn' => '120', - 'entPhysicalMfgName' => 'TAIT', + 'entPhysicalIndex' => '1200', + 'entPhysicalDescr' => 'Reciter Temperature Sensor', + 'entPhysicalClass' => 'sensor', + 'entPhysicalName' => 'Reciter Temperature', + 'entPhysicalContainedIn' => '120', + 'entPhysicalMfgName' => 'TAIT', 'entPhysicalParentRelPos' => '-1', - 'entPhysicalIsFRU' => 'false', + 'entPhysicalIsFRU' => 'false', ]; } if (isset($modules_array[0]) and isset($modules_array[0]['paInfoProductCode'])) { $entity_array[] = [ - 'entPhysicalIndex' => '130', - 'entPhysicalDescr' => 'Power Amplifier', - 'entPhysicalClass' => 'module', - 'entPhysicalName' => 'Power Amplifier', - 'entPhysicalModelName' => $modules_array[0]['paInfoProductCode'], - 'entPhysicalSerialNum' => $modules_array[0]['paInfoSerialNumber'], - 'entPhysicalContainedIn' => '10', - 'entPhysicalMfgName' => 'TAIT', - 'entPhysicalHardwareRev' => $modules_array[0]['paInfoHardwareVersion'], - 'entPhysicalFirmwareRev' => $modules_array[0]['paInfoFirmwareVersion'], - 'entPhysicalIsFRU' => 'true', + 'entPhysicalIndex' => '130', + 'entPhysicalDescr' => 'Power Amplifier', + 'entPhysicalClass' => 'module', + 'entPhysicalName' => 'Power Amplifier', + 'entPhysicalModelName' => $modules_array[0]['paInfoProductCode'], + 'entPhysicalSerialNum' => $modules_array[0]['paInfoSerialNumber'], + 'entPhysicalContainedIn' => '10', + 'entPhysicalMfgName' => 'TAIT', + 'entPhysicalHardwareRev' => $modules_array[0]['paInfoHardwareVersion'], + 'entPhysicalFirmwareRev' => $modules_array[0]['paInfoFirmwareVersion'], + 'entPhysicalIsFRU' => 'true', ]; $entity_array[] = [ - 'entPhysicalIndex' => '1300', - 'entPhysicalDescr' => 'Amplifier Power Sensor', - 'entPhysicalClass' => 'sensor', - 'entPhysicalName' => 'Output Power', - 'entPhysicalContainedIn' => '130', - 'entPhysicalMfgName' => 'TAIT', + 'entPhysicalIndex' => '1300', + 'entPhysicalDescr' => 'Amplifier Power Sensor', + 'entPhysicalClass' => 'sensor', + 'entPhysicalName' => 'Output Power', + 'entPhysicalContainedIn' => '130', + 'entPhysicalMfgName' => 'TAIT', 'entPhysicalParentRelPos' => '-1', - 'entPhysicalIsFRU' => 'false', + 'entPhysicalIsFRU' => 'false', ]; } $entity_array[] = [ - 'entPhysicalIndex' => '140', - 'entPhysicalDescr' => 'PMU', - 'entPhysicalClass' => 'module', - 'entPhysicalName' => 'PMU', - 'entPhysicalModelName' => $modules_array[0]['pmuInfoProductCode'], - 'entPhysicalSerialNum' => $modules_array[0]['pmuInfoSerialNumber'], - 'entPhysicalContainedIn' => '10', - 'entPhysicalMfgName' => 'TAIT', + 'entPhysicalIndex' => '140', + 'entPhysicalDescr' => 'PMU', + 'entPhysicalClass' => 'module', + 'entPhysicalName' => 'PMU', + 'entPhysicalModelName' => $modules_array[0]['pmuInfoProductCode'], + 'entPhysicalSerialNum' => $modules_array[0]['pmuInfoSerialNumber'], + 'entPhysicalContainedIn' => '10', + 'entPhysicalMfgName' => 'TAIT', 'entPhysicalParentRelPos' => '', - 'entPhysicalVendorType' => '', - 'entPhysicalHardwareRev' => $modules_array[0]['pmuInfoHardwareVersion'], - 'entPhysicalFirmwareRev' => $modules_array[0]['pmuInfoFirmwareVersion'], - 'entPhysicalIsFRU' => 'true', + 'entPhysicalVendorType' => '', + 'entPhysicalHardwareRev' => $modules_array[0]['pmuInfoHardwareVersion'], + 'entPhysicalFirmwareRev' => $modules_array[0]['pmuInfoFirmwareVersion'], + 'entPhysicalIsFRU' => 'true', ]; foreach ($entity_array as $entPhysicalIndex => $entry) { diff --git a/includes/discovery/functions.inc.php b/includes/discovery/functions.inc.php index acc707d4da..d6db410ab8 100644 --- a/includes/discovery/functions.inc.php +++ b/includes/discovery/functions.inc.php @@ -597,23 +597,23 @@ function discover_entity_physical(&$valid, $device, $entPhysicalIndex, $entPhysi if ($entPhysicalDescr || $entPhysicalName) { if (dbFetchCell('SELECT COUNT(entPhysical_id) FROM `entPhysical` WHERE `device_id` = ? AND `entPhysicalIndex` = ?', [$device['device_id'], $entPhysicalIndex]) == '0') { $insert_data = [ - 'device_id' => $device['device_id'], - 'entPhysicalIndex' => $entPhysicalIndex, - 'entPhysicalDescr' => $entPhysicalDescr, - 'entPhysicalClass' => $entPhysicalClass, - 'entPhysicalName' => $entPhysicalName, - 'entPhysicalModelName' => $entPhysicalModelName, - 'entPhysicalSerialNum' => $entPhysicalSerialNum, - 'entPhysicalContainedIn' => $entPhysicalContainedIn, - 'entPhysicalMfgName' => $entPhysicalMfgName, + 'device_id' => $device['device_id'], + 'entPhysicalIndex' => $entPhysicalIndex, + 'entPhysicalDescr' => $entPhysicalDescr, + 'entPhysicalClass' => $entPhysicalClass, + 'entPhysicalName' => $entPhysicalName, + 'entPhysicalModelName' => $entPhysicalModelName, + 'entPhysicalSerialNum' => $entPhysicalSerialNum, + 'entPhysicalContainedIn' => $entPhysicalContainedIn, + 'entPhysicalMfgName' => $entPhysicalMfgName, 'entPhysicalParentRelPos' => $entPhysicalParentRelPos, - 'entPhysicalVendorType' => $entPhysicalVendorType, - 'entPhysicalHardwareRev' => $entPhysicalHardwareRev, - 'entPhysicalFirmwareRev' => $entPhysicalFirmwareRev, - 'entPhysicalSoftwareRev' => $entPhysicalSoftwareRev, - 'entPhysicalIsFRU' => $entPhysicalIsFRU, - 'entPhysicalAlias' => $entPhysicalAlias, - 'entPhysicalAssetID' => $entPhysicalAssetID, + 'entPhysicalVendorType' => $entPhysicalVendorType, + 'entPhysicalHardwareRev' => $entPhysicalHardwareRev, + 'entPhysicalFirmwareRev' => $entPhysicalFirmwareRev, + 'entPhysicalSoftwareRev' => $entPhysicalSoftwareRev, + 'entPhysicalIsFRU' => $entPhysicalIsFRU, + 'entPhysicalAlias' => $entPhysicalAlias, + 'entPhysicalAssetID' => $entPhysicalAssetID, ]; if (! empty($ifIndex)) { $insert_data['ifIndex'] = $ifIndex; @@ -625,23 +625,23 @@ function discover_entity_physical(&$valid, $device, $entPhysicalIndex, $entPhysi } else { echo '.'; $update_data = [ - 'entPhysicalIndex' => $entPhysicalIndex, - 'entPhysicalDescr' => $entPhysicalDescr, - 'entPhysicalClass' => $entPhysicalClass, - 'entPhysicalName' => $entPhysicalName, - 'entPhysicalModelName' => $entPhysicalModelName, - 'entPhysicalSerialNum' => $entPhysicalSerialNum, - 'entPhysicalContainedIn' => $entPhysicalContainedIn, - 'entPhysicalMfgName' => $entPhysicalMfgName, + 'entPhysicalIndex' => $entPhysicalIndex, + 'entPhysicalDescr' => $entPhysicalDescr, + 'entPhysicalClass' => $entPhysicalClass, + 'entPhysicalName' => $entPhysicalName, + 'entPhysicalModelName' => $entPhysicalModelName, + 'entPhysicalSerialNum' => $entPhysicalSerialNum, + 'entPhysicalContainedIn' => $entPhysicalContainedIn, + 'entPhysicalMfgName' => $entPhysicalMfgName, 'entPhysicalParentRelPos' => $entPhysicalParentRelPos, - 'entPhysicalVendorType' => $entPhysicalVendorType, - 'entPhysicalHardwareRev' => $entPhysicalHardwareRev, - 'entPhysicalFirmwareRev' => $entPhysicalFirmwareRev, - 'entPhysicalSoftwareRev' => $entPhysicalSoftwareRev, - 'entPhysicalIsFRU' => $entPhysicalIsFRU, - 'entPhysicalAlias' => $entPhysicalAlias, - 'entPhysicalAssetID' => $entPhysicalAssetID, - 'ifIndex' => $ifIndex, + 'entPhysicalVendorType' => $entPhysicalVendorType, + 'entPhysicalHardwareRev' => $entPhysicalHardwareRev, + 'entPhysicalFirmwareRev' => $entPhysicalFirmwareRev, + 'entPhysicalSoftwareRev' => $entPhysicalSoftwareRev, + 'entPhysicalIsFRU' => $entPhysicalIsFRU, + 'entPhysicalAlias' => $entPhysicalAlias, + 'entPhysicalAssetID' => $entPhysicalAssetID, + 'ifIndex' => $ifIndex, ]; dbUpdate($update_data, 'entPhysical', '`device_id`=? AND `entPhysicalIndex`=?', [$device['device_id'], $entPhysicalIndex]); }//end if @@ -1075,10 +1075,10 @@ function build_bgp_peers($device, $data, $peer2) } d_echo("Found peer $peer_ip (AS$peer_as)\n"); $peerlist[] = [ - 'ip' => $peer_ip, - 'as' => $peer_as, + 'ip' => $peer_ip, + 'as' => $peer_as, 'localip' => $local_ip ?: '0.0.0.0', - 'ver' => $ver, + 'ver' => $ver, ]; } } diff --git a/includes/discovery/hr-device.inc.php b/includes/discovery/hr-device.inc.php index a7abca0447..4841b2ec4a 100644 --- a/includes/discovery/hr-device.inc.php +++ b/includes/discovery/hr-device.inc.php @@ -17,8 +17,8 @@ if (is_array($hrDevices)) { if (is_array($hrDevice) && isset($hrDevice['hrDeviceIndex']) && is_numeric($hrDevice['hrDeviceIndex'])) { if (dbFetchCell('SELECT COUNT(*) FROM `hrDevice` WHERE device_id = ? AND hrDeviceIndex = ?', [$device['device_id'], $hrDevice['hrDeviceIndex']])) { $update_array = [ - 'hrDeviceType' => $hrDevice['hrDeviceType'], - 'hrDeviceDescr' => $hrDevice['hrDeviceDescr'], + 'hrDeviceType' => $hrDevice['hrDeviceType'], + 'hrDeviceDescr' => $hrDevice['hrDeviceDescr'], 'hrDeviceStatus' => $hrDevice['hrDeviceStatus'] ?? 'unknown', 'hrDeviceErrors' => $hrDevice['hrDeviceErrors'] ?? 0, ]; diff --git a/includes/discovery/ntp/awplus.inc.php b/includes/discovery/ntp/awplus.inc.php index ceaf8ccb2a..dab0777777 100644 --- a/includes/discovery/ntp/awplus.inc.php +++ b/includes/discovery/ntp/awplus.inc.php @@ -14,7 +14,7 @@ $module = 'ntp'; $component = new LibreNMS\Component(); -$components = $component->getComponents($device['device_id'], ['type'=>$module]); +$components = $component->getComponents($device['device_id'], ['type' => $module]); // We only care about our device id. $components = $components[$device['device_id']]; diff --git a/includes/discovery/ntp/cisco.inc.php b/includes/discovery/ntp/cisco.inc.php index f557826413..5cb311bdc9 100644 --- a/includes/discovery/ntp/cisco.inc.php +++ b/includes/discovery/ntp/cisco.inc.php @@ -16,7 +16,7 @@ use LibreNMS\Util\IP; $module = 'ntp'; $component = new LibreNMS\Component(); -$components = $component->getComponents($device['device_id'], ['type'=>$module]); +$components = $component->getComponents($device['device_id'], ['type' => $module]); // We only care about our device id. $components = $components[$device['device_id']]; diff --git a/includes/discovery/ports/cnmatrix.inc.php b/includes/discovery/ports/cnmatrix.inc.php index 0037005a51..68d5e5e076 100644 --- a/includes/discovery/ports/cnmatrix.inc.php +++ b/includes/discovery/ports/cnmatrix.inc.php @@ -1,6 +1,6 @@ $port) { +foreach ($port_stats as $index => $port) { $port_stats[$index]['ifAlias'] = $int_desc[$index]['ifMainDesc']; } diff --git a/includes/discovery/sensors/cisco-entity-sensor.inc.php b/includes/discovery/sensors/cisco-entity-sensor.inc.php index 4aae6ed858..2c3268a4a3 100644 --- a/includes/discovery/sensors/cisco-entity-sensor.inc.php +++ b/includes/discovery/sensors/cisco-entity-sensor.inc.php @@ -206,7 +206,7 @@ if ($device['os_group'] == 'cisco') { [, $tmp_ifindex] = explode('.', $entAliasMappingIdentifier); } break; - //or sensor entity has a parent entity with module class and entPhysicalName set to an existing ifName. + //or sensor entity has a parent entity with module class and entPhysicalName set to an existing ifName. } elseif ($entPhysicalClass === 'module' && array_key_exists($entPhysicalName, $port_reverse_array)) { $tmp_ifindex = $port_reverse_array[$entPhysicalName]['ifIndex']; break; diff --git a/includes/discovery/sensors/count/dhcpatriot.inc.php b/includes/discovery/sensors/count/dhcpatriot.inc.php index 99eacc2aaa..dfb9f7faff 100644 --- a/includes/discovery/sensors/count/dhcpatriot.inc.php +++ b/includes/discovery/sensors/count/dhcpatriot.inc.php @@ -9,29 +9,29 @@ $oids = [ 0 => [ - 'type' => 'dhcpatriotDatabaseThreads', + 'type' => 'dhcpatriotDatabaseThreads', 'descr' => 'Database Threads', - 'oid' => '.1.3.6.1.4.1.2021.50.45', + 'oid' => '.1.3.6.1.4.1.2021.50.45', ], 1 => [ - 'type' => 'dhcpatriotDatabaseQueriesPerSecond', + 'type' => 'dhcpatriotDatabaseQueriesPerSecond', 'descr' => 'Database Queries Per Second', - 'oid' => '.1.3.6.1.4.1.2021.50.46', + 'oid' => '.1.3.6.1.4.1.2021.50.46', ], 2 => [ - 'type' => 'dhcpatriotDHCPv4LeasesPerSecond', + 'type' => 'dhcpatriotDHCPv4LeasesPerSecond', 'descr' => 'DHCPv4 Leases Per Second', - 'oid' => '.1.3.6.1.4.1.2021.50.70', + 'oid' => '.1.3.6.1.4.1.2021.50.70', ], 3 => [ - 'type' => 'dhcpatriotDHCPv6LeasesPerSecond', + 'type' => 'dhcpatriotDHCPv6LeasesPerSecond', 'descr' => 'DHCPv6 Leases Per Second', - 'oid' => '.1.3.6.1.5.1.2021.50.140', + 'oid' => '.1.3.6.1.5.1.2021.50.140', ], 4 => [ - 'type' => 'dhcpatriotLicenseExpiration', + 'type' => 'dhcpatriotLicenseExpiration', 'descr' => 'License Expiration Days Remaining', - 'oid' => '.1.3.6.1.4.1.2021.51.12.4.1.2.7.76.73.67.69.78.83.69.1', + 'oid' => '.1.3.6.1.4.1.2021.51.12.4.1.2.7.76.73.67.69.78.83.69.1', ], ]; diff --git a/includes/discovery/sensors/current/tpdin.inc.php b/includes/discovery/sensors/current/tpdin.inc.php index 991511bb53..99e8b7ea09 100644 --- a/includes/discovery/sensors/current/tpdin.inc.php +++ b/includes/discovery/sensors/current/tpdin.inc.php @@ -24,27 +24,27 @@ */ $tpdin_oids = [ [ - 'oid' => '.1.3.6.1.4.1.45621.2.2.9.0', - 'index' => 'current1', - 'descr' => 'Current 1', + 'oid' => '.1.3.6.1.4.1.45621.2.2.9.0', + 'index' => 'current1', + 'descr' => 'Current 1', 'current' => $pre_cache['tpdin_monitor'][0]['current1'], ], [ - 'oid' => '.1.3.6.1.4.1.45621.2.2.10.0', - 'index' => 'current2', - 'descr' => 'Current 2', + 'oid' => '.1.3.6.1.4.1.45621.2.2.10.0', + 'index' => 'current2', + 'descr' => 'Current 2', 'current' => $pre_cache['tpdin_monitor'][0]['current2'], ], [ - 'oid' => '.1.3.6.1.4.1.45621.2.2.11.0', - 'index' => 'current3', - 'descr' => 'Current 3', + 'oid' => '.1.3.6.1.4.1.45621.2.2.11.0', + 'index' => 'current3', + 'descr' => 'Current 3', 'current' => $pre_cache['tpdin_monitor'][0]['current3'], ], [ - 'oid' => '.1.3.6.1.4.1.45621.2.2.12.0', - 'index' => 'current4', - 'descr' => 'Current 4', + 'oid' => '.1.3.6.1.4.1.45621.2.2.12.0', + 'index' => 'current4', + 'descr' => 'Current 4', 'current' => $pre_cache['tpdin_monitor'][0]['current4'], ], ]; diff --git a/includes/discovery/sensors/entity-sensor.inc.php b/includes/discovery/sensors/entity-sensor.inc.php index 268580e9a4..67d4f075ac 100644 --- a/includes/discovery/sensors/entity-sensor.inc.php +++ b/includes/discovery/sensors/entity-sensor.inc.php @@ -40,15 +40,15 @@ if (! empty($entity_array)) { if (! empty($entity_oids)) { $entitysensor = [ - 'voltsDC' => 'voltage', - 'voltsAC' => 'voltage', - 'amperes' => 'current', - 'watts' => 'power', - 'hertz' => 'freq', + 'voltsDC' => 'voltage', + 'voltsAC' => 'voltage', + 'amperes' => 'current', + 'watts' => 'power', + 'hertz' => 'freq', 'percentRH' => 'humidity', - 'rpm' => 'fanspeed', - 'celsius' => 'temperature', - 'dBm' => 'dbm', + 'rpm' => 'fanspeed', + 'celsius' => 'temperature', + 'dBm' => 'dbm', ]; foreach ($entity_oids as $index => $entry) { diff --git a/includes/discovery/sensors/humidity/pcoweb.inc.php b/includes/discovery/sensors/humidity/pcoweb.inc.php index 7e3d163360..a303601abe 100644 --- a/includes/discovery/sensors/humidity/pcoweb.inc.php +++ b/includes/discovery/sensors/humidity/pcoweb.inc.php @@ -4,33 +4,33 @@ echo 'pCOWeb: '; $humidities = [ [ - 'mib' => 'CAREL-ug40cdz-MIB::roomRH.0', - 'descr' => 'Room Relative Humidity', - 'oid' => '.1.3.6.1.4.1.9839.2.1.2.6.0', + 'mib' => 'CAREL-ug40cdz-MIB::roomRH.0', + 'descr' => 'Room Relative Humidity', + 'oid' => '.1.3.6.1.4.1.9839.2.1.2.6.0', 'precision' => '10', ], [ - 'mib' => 'CAREL-ug40cdz-MIB::dehumPband.0', - 'descr' => 'Dehumidification Prop. Band', - 'oid' => '.1.3.6.1.4.1.9839.2.1.3.12.0', + 'mib' => 'CAREL-ug40cdz-MIB::dehumPband.0', + 'descr' => 'Dehumidification Prop. Band', + 'oid' => '.1.3.6.1.4.1.9839.2.1.3.12.0', 'precision' => '1', ], [ - 'mib' => 'CAREL-ug40cdz-MIB::humidPband.0', - 'descr' => 'Humidification Prop. Band', - 'oid' => '.1.3.6.1.4.1.9839.2.1.3.13.0', + 'mib' => 'CAREL-ug40cdz-MIB::humidPband.0', + 'descr' => 'Humidification Prop. Band', + 'oid' => '.1.3.6.1.4.1.9839.2.1.3.13.0', 'precision' => '1', ], [ - 'mib' => 'CAREL-ug40cdz-MIB::dehumSetp.0', - 'descr' => 'Dehumidification Set Point', - 'oid' => '.1.3.6.1.4.1.9839.2.1.3.16.0', + 'mib' => 'CAREL-ug40cdz-MIB::dehumSetp.0', + 'descr' => 'Dehumidification Set Point', + 'oid' => '.1.3.6.1.4.1.9839.2.1.3.16.0', 'precision' => '1', ], [ - 'mib' => 'CAREL-ug40cdz-MIB::humidSetp.0', - 'descr' => 'Humidification Set Point', - 'oid' => '.1.3.6.1.4.1.9839.2.1.3.17.0', + 'mib' => 'CAREL-ug40cdz-MIB::humidSetp.0', + 'descr' => 'Humidification Set Point', + 'oid' => '.1.3.6.1.4.1.9839.2.1.3.17.0', 'precision' => '1', ], ]; diff --git a/includes/discovery/sensors/load/apc.inc.php b/includes/discovery/sensors/load/apc.inc.php index f975812051..fc3adabad7 100644 --- a/includes/discovery/sensors/load/apc.inc.php +++ b/includes/discovery/sensors/load/apc.inc.php @@ -21,12 +21,12 @@ if ($phasecount > 1) { $oid_array = [ [ 'HighPrecOid' => 'upsHighPrecOutputLoad', - 'AdvOid' => 'upsAdvOutputLoad', - 'type' => 'apc', - 'index' => 0, - 'descr' => 'Load(VA)', - 'divisor' => 10, - 'mib' => '+PowerNet-MIB', + 'AdvOid' => 'upsAdvOutputLoad', + 'type' => 'apc', + 'index' => 0, + 'descr' => 'Load(VA)', + 'divisor' => 10, + 'mib' => '+PowerNet-MIB', ], ]; foreach ($oid_array as $item) { diff --git a/includes/discovery/sensors/pre-cache/ifotec.inc.php b/includes/discovery/sensors/pre-cache/ifotec.inc.php index 71ca4cf71b..dc0dce0901 100644 --- a/includes/discovery/sensors/pre-cache/ifotec.inc.php +++ b/includes/discovery/sensors/pre-cache/ifotec.inc.php @@ -27,13 +27,13 @@ if (Str::startsWith($device['sysObjectID'], '.1.3.6.1.4.1.21362.100.')) { if ($pre_cache['ifoSysProductIndex'] != null) { $virtual_tables = [ - 'ifoTempName' => '/\.1\.3\.6\.1\.4\.1\.21362\.101\.2\.1\.1\.3\.' . $pre_cache['ifoSysProductIndex'] . '\.(\d+)/', - 'ifoTempDescr' => '/\.1\.3\.6\.1\.4\.1\.21362\.101\.2\.1\.1\.4\.' . $pre_cache['ifoSysProductIndex'] . '\.(\d+)/', - 'ifoTempValue' => '/\.1\.3\.6\.1\.4\.1\.21362\.101\.2\.1\.1\.5\.' . $pre_cache['ifoSysProductIndex'] . '\.(\d+)/', - 'ifoTempAlarmStatus' => '/\.1\.3\.6\.1\.4\.1\.21362\.101\.2\.1\.1\.6\.' . $pre_cache['ifoSysProductIndex'] . '\.(\d+)/', - 'ifoTempLowThldAlarm' => '/\.1\.3\.6\.1\.4\.1\.21362\.101\.2\.1\.1\.7\.' . $pre_cache['ifoSysProductIndex'] . '\.(\d+)/', - 'ifoTempHighThldAlarm' => '/\.1\.3\.6\.1\.4\.1\.21362\.101\.2\.1\.1\.8\.' . $pre_cache['ifoSysProductIndex'] . '\.(\d+)/', - 'ifoTempLowThldWarning' => '/\.1\.3\.6\.1\.4\.1\.21362\.101\.2\.1\.1\.9\.' . $pre_cache['ifoSysProductIndex'] . '\.(\d+)/', + 'ifoTempName' => '/\.1\.3\.6\.1\.4\.1\.21362\.101\.2\.1\.1\.3\.' . $pre_cache['ifoSysProductIndex'] . '\.(\d+)/', + 'ifoTempDescr' => '/\.1\.3\.6\.1\.4\.1\.21362\.101\.2\.1\.1\.4\.' . $pre_cache['ifoSysProductIndex'] . '\.(\d+)/', + 'ifoTempValue' => '/\.1\.3\.6\.1\.4\.1\.21362\.101\.2\.1\.1\.5\.' . $pre_cache['ifoSysProductIndex'] . '\.(\d+)/', + 'ifoTempAlarmStatus' => '/\.1\.3\.6\.1\.4\.1\.21362\.101\.2\.1\.1\.6\.' . $pre_cache['ifoSysProductIndex'] . '\.(\d+)/', + 'ifoTempLowThldAlarm' => '/\.1\.3\.6\.1\.4\.1\.21362\.101\.2\.1\.1\.7\.' . $pre_cache['ifoSysProductIndex'] . '\.(\d+)/', + 'ifoTempHighThldAlarm' => '/\.1\.3\.6\.1\.4\.1\.21362\.101\.2\.1\.1\.8\.' . $pre_cache['ifoSysProductIndex'] . '\.(\d+)/', + 'ifoTempLowThldWarning' => '/\.1\.3\.6\.1\.4\.1\.21362\.101\.2\.1\.1\.9\.' . $pre_cache['ifoSysProductIndex'] . '\.(\d+)/', 'ifoTempHighThldWarning' => '/\.1\.3\.6\.1\.4\.1\.21362\.101\.2\.1\.1\.10\.' . $pre_cache['ifoSysProductIndex'] . '\.(\d+)/', ]; diff --git a/includes/discovery/sensors/rittal-cmc-iii-sensors.inc.php b/includes/discovery/sensors/rittal-cmc-iii-sensors.inc.php index 72da5b569e..d35bec7d45 100644 --- a/includes/discovery/sensors/rittal-cmc-iii-sensors.inc.php +++ b/includes/discovery/sensors/rittal-cmc-iii-sensors.inc.php @@ -146,16 +146,16 @@ foreach ($cmc_iii_sensors as $sensor_id => $sensor_data) { $sensor_data['name'] = $sensor_data['name'] . '_' . $serial_number; $sensor_logic = [ [ - 'value' => 0, + 'value' => 0, 'generic' => 0, - 'graph' => 1, - 'descr' => $sensor_data['logic'][0], + 'graph' => 1, + 'descr' => $sensor_data['logic'][0], ], [ - 'value' => 1, + 'value' => 1, 'generic' => 0, - 'graph' => 1, - 'descr' => $sensor_data['logic'][1], + 'graph' => 1, + 'descr' => $sensor_data['logic'][1], ], ]; diff --git a/includes/discovery/sensors/state/ctm.inc.php b/includes/discovery/sensors/state/ctm.inc.php index 627dc5e817..bfa81a5eb4 100644 --- a/includes/discovery/sensors/state/ctm.inc.php +++ b/includes/discovery/sensors/state/ctm.inc.php @@ -34,32 +34,32 @@ $states = [ ]; $octetSetup = [ [ - 'oid' => 'portOnM.0', - 'state_name' => 'portOnM', - 'states' => $states['power'], - 'name' => 'Master Port Enabled', - 'num_oid' => '.1.3.6.1.4.1.25868.1.12.0', + 'oid' => 'portOnM.0', + 'state_name' => 'portOnM', + 'states' => $states['power'], + 'name' => 'Master Port Enabled', + 'num_oid' => '.1.3.6.1.4.1.25868.1.12.0', ], [ - 'oid' => 'portSyncM.0', - 'state_name' => 'portSyncM', - 'states' => $states['sync'], - 'name' => 'Master Port Sync Status', - 'num_oid' => '.1.3.6.1.4.1.25868.1.13.0', + 'oid' => 'portSyncM.0', + 'state_name' => 'portSyncM', + 'states' => $states['sync'], + 'name' => 'Master Port Sync Status', + 'num_oid' => '.1.3.6.1.4.1.25868.1.13.0', ], [ - 'oid' => 'portOnS.0', - 'state_name' => 'portOnS', - 'states' => $states['power'], - 'name' => 'Slave Port Enabled', - 'num_oid' => '.1.3.6.1.4.1.25868.1.29.0', + 'oid' => 'portOnS.0', + 'state_name' => 'portOnS', + 'states' => $states['power'], + 'name' => 'Slave Port Enabled', + 'num_oid' => '.1.3.6.1.4.1.25868.1.29.0', ], [ - 'oid' => 'portSyncS.0', - 'state_name' => 'portSyncS', - 'states' => $states['sync'], - 'name' => 'Slave Port Sync Status', - 'num_oid' => '.1.3.6.1.4.1.25868.1.30.0', + 'oid' => 'portSyncS.0', + 'state_name' => 'portSyncS', + 'states' => $states['sync'], + 'name' => 'Slave Port Sync Status', + 'num_oid' => '.1.3.6.1.4.1.25868.1.30.0', ], ]; diff --git a/includes/discovery/sensors/state/dhcpatriot.inc.php b/includes/discovery/sensors/state/dhcpatriot.inc.php index ea84fbcd18..624ea9f1f5 100644 --- a/includes/discovery/sensors/state/dhcpatriot.inc.php +++ b/includes/discovery/sensors/state/dhcpatriot.inc.php @@ -10,43 +10,43 @@ $oids = [ 0 => [ 'descr' => 'System Software Health', - 'oid' => '.1.3.6.1.4.1.2021.51.9.4.1.2.6.72.69.65.76.84.72.1', + 'oid' => '.1.3.6.1.4.1.2021.51.9.4.1.2.6.72.69.65.76.84.72.1', ], 1 => [ 'descr' => 'DHCPv4', - 'oid' => '.1.3.6.1.4.1.2021.52.6.4.1.2.4.68.72.67.80.1', + 'oid' => '.1.3.6.1.4.1.2021.52.6.4.1.2.4.68.72.67.80.1', ], 2 => [ 'descr' => 'DHCPv6', - 'oid' => '.1.3.6.1.4.1.2021.52.9.4.1.2.5.68.72.67.80.54.1', + 'oid' => '.1.3.6.1.4.1.2021.52.9.4.1.2.5.68.72.67.80.54.1', ], 3 => [ 'descr' => 'DNS', - 'oid' => '.1.3.6.1.4.1.2021.52.1.4.1.2.3.68.78.83.1', + 'oid' => '.1.3.6.1.4.1.2021.52.1.4.1.2.3.68.78.83.1', ], 4 => [ 'descr' => 'HTTP', - 'oid' => '.1.3.6.1.4.1.2021.52.2.4.1.2.4.72.84.84.80.1', + 'oid' => '.1.3.6.1.4.1.2021.52.2.4.1.2.4.72.84.84.80.1', ], 5 => [ 'descr' => 'HTTPS', - 'oid' => '.1.3.6.1.4.1.2021.52.3.4.1.2.5.72.84.84.80.83.1', + 'oid' => '.1.3.6.1.4.1.2021.52.3.4.1.2.5.72.84.84.80.83.1', ], 6 => [ 'descr' => 'NTP', - 'oid' => '.1.3.6.1.4.1.2021.52.4.4.1.2.3.78.84.80.1', + 'oid' => '.1.3.6.1.4.1.2021.52.4.4.1.2.3.78.84.80.1', ], 7 => [ 'descr' => 'SSH', - 'oid' => '.1.3.6.1.4.1.2021.52.5.4.1.2.3.83.83.72.1', + 'oid' => '.1.3.6.1.4.1.2021.52.5.4.1.2.3.83.83.72.1', ], 8 => [ 'descr' => 'Database Status', - 'oid' => '.1.3.6.1.4.1.2021.51.2.4.1.2.5.77.89.83.81.76.1', + 'oid' => '.1.3.6.1.4.1.2021.51.2.4.1.2.5.77.89.83.81.76.1', ], 9 => [ 'descr' => 'Database Sync Status', - 'oid' => '.1.3.6.1.4.1.2021.51.3.4.1.2.16.77.89.83.81.76.82.69.80.76.73.67.65.84.73.79.78.1', + 'oid' => '.1.3.6.1.4.1.2021.51.3.4.1.2.16.77.89.83.81.76.82.69.80.76.73.67.65.84.73.79.78.1', ], ]; diff --git a/includes/discovery/sensors/temperature/pcoweb.inc.php b/includes/discovery/sensors/temperature/pcoweb.inc.php index 7654bff665..c9bc11a293 100644 --- a/includes/discovery/sensors/temperature/pcoweb.inc.php +++ b/includes/discovery/sensors/temperature/pcoweb.inc.php @@ -4,111 +4,111 @@ echo ' pCOWeb '; $temperatures = [ [ - 'mib' => 'CAREL-ug40cdz-MIB::roomTemp.0', - 'descr' => 'Room Temperature', - 'oid' => '.1.3.6.1.4.1.9839.2.1.2.1.0', + 'mib' => 'CAREL-ug40cdz-MIB::roomTemp.0', + 'descr' => 'Room Temperature', + 'oid' => '.1.3.6.1.4.1.9839.2.1.2.1.0', 'precision' => '10', ], [ - 'mib' => 'CAREL-ug40cdz-MIB::outdoorTemp.0', - 'descr' => 'Ambient Temperature', - 'oid' => '.1.3.6.1.4.1.9839.2.1.2.2.0', + 'mib' => 'CAREL-ug40cdz-MIB::outdoorTemp.0', + 'descr' => 'Ambient Temperature', + 'oid' => '.1.3.6.1.4.1.9839.2.1.2.2.0', 'precision' => '10', ], [ - 'mib' => 'CAREL-ug40cdz-MIB::deliveryTemp.0', - 'descr' => 'Delivery Air Temperature', - 'oid' => '.1.3.6.1.4.1.9839.2.1.2.3.0', + 'mib' => 'CAREL-ug40cdz-MIB::deliveryTemp.0', + 'descr' => 'Delivery Air Temperature', + 'oid' => '.1.3.6.1.4.1.9839.2.1.2.3.0', 'precision' => '10', ], [ - 'mib' => 'CAREL-ug40cdz-MIB::cwTemp.0', - 'descr' => 'Chilled Water Temperature', - 'oid' => '.1.3.6.1.4.1.9839.2.1.2.4.0', + 'mib' => 'CAREL-ug40cdz-MIB::cwTemp.0', + 'descr' => 'Chilled Water Temperature', + 'oid' => '.1.3.6.1.4.1.9839.2.1.2.4.0', 'precision' => '10', ], [ - 'mib' => 'CAREL-ug40cdz-MIB::hwTemp.0', - 'descr' => 'Hot Water Temperature', - 'oid' => '.1.3.6.1.4.1.9839.2.1.2.5.0', + 'mib' => 'CAREL-ug40cdz-MIB::hwTemp.0', + 'descr' => 'Hot Water Temperature', + 'oid' => '.1.3.6.1.4.1.9839.2.1.2.5.0', 'precision' => '10', ], [ - 'mib' => 'CAREL-ug40cdz-MIB::cwoTemp.0', - 'descr' => 'Chilled Water Outlet Temperature', - 'oid' => '.1.3.6.1.4.1.9839.2.1.2.7.0', + 'mib' => 'CAREL-ug40cdz-MIB::cwoTemp.0', + 'descr' => 'Chilled Water Outlet Temperature', + 'oid' => '.1.3.6.1.4.1.9839.2.1.2.7.0', 'precision' => '10', ], [ - 'mib' => 'CAREL-ug40cdz-MIB::suctTemp1.0', - 'descr' => 'Circuit 1 Suction Temperature', - 'oid' => '.1.3.6.1.4.1.9839.2.1.2.10.0', + 'mib' => 'CAREL-ug40cdz-MIB::suctTemp1.0', + 'descr' => 'Circuit 1 Suction Temperature', + 'oid' => '.1.3.6.1.4.1.9839.2.1.2.10.0', 'precision' => '10', ], [ - 'mib' => 'CAREL-ug40cdz-MIB::suctTemp2.0', - 'descr' => 'Circuit 2 Suction Temperature', - 'oid' => '.1.3.6.1.4.1.9839.2.1.2.11.0', + 'mib' => 'CAREL-ug40cdz-MIB::suctTemp2.0', + 'descr' => 'Circuit 2 Suction Temperature', + 'oid' => '.1.3.6.1.4.1.9839.2.1.2.11.0', 'precision' => '10', ], [ - 'mib' => 'CAREL-ug40cdz-MIB::evapTemp1.0', - 'descr' => 'Circuit 1 Evap. Temperature', - 'oid' => '.1.3.6.1.4.1.9839.2.1.2.12.0', + 'mib' => 'CAREL-ug40cdz-MIB::evapTemp1.0', + 'descr' => 'Circuit 1 Evap. Temperature', + 'oid' => '.1.3.6.1.4.1.9839.2.1.2.12.0', 'precision' => '10', ], [ - 'mib' => 'CAREL-ug40cdz-MIB::evapTemp2.0', - 'descr' => 'Circuit 2 Evap. Temperature', - 'oid' => '.1.3.6.1.4.1.9839.2.1.2.13.0', + 'mib' => 'CAREL-ug40cdz-MIB::evapTemp2.0', + 'descr' => 'Circuit 2 Evap. Temperature', + 'oid' => '.1.3.6.1.4.1.9839.2.1.2.13.0', 'precision' => '10', ], [ - 'mib' => 'CAREL-ug40cdz-MIB::ssh1.0', - 'descr' => 'Circuit 1 Superheat', - 'oid' => '.1.3.6.1.4.1.9839.2.1.2.14.0', + 'mib' => 'CAREL-ug40cdz-MIB::ssh1.0', + 'descr' => 'Circuit 1 Superheat', + 'oid' => '.1.3.6.1.4.1.9839.2.1.2.14.0', 'precision' => '10', ], [ - 'mib' => 'CAREL-ug40cdz-MIB::ssh2.0', - 'descr' => 'Circuit 2 Superheat', - 'oid' => '.1.3.6.1.4.1.9839.2.1.2.15.0', + 'mib' => 'CAREL-ug40cdz-MIB::ssh2.0', + 'descr' => 'Circuit 2 Superheat', + 'oid' => '.1.3.6.1.4.1.9839.2.1.2.15.0', 'precision' => '10', ], [ - 'mib' => 'CAREL-ug40cdz-MIB::coolSetP.0', - 'descr' => 'Cooling Set Point', - 'oid' => '.1.3.6.1.4.1.9839.2.1.2.20.0', + 'mib' => 'CAREL-ug40cdz-MIB::coolSetP.0', + 'descr' => 'Cooling Set Point', + 'oid' => '.1.3.6.1.4.1.9839.2.1.2.20.0', 'precision' => '10', ], [ - 'mib' => 'CAREL-ug40cdz-MIB::coolDiff.0', - 'descr' => 'Cooling Prop. Band', - 'oid' => '.1.3.6.1.4.1.9839.2.1.2.21.0', + 'mib' => 'CAREL-ug40cdz-MIB::coolDiff.0', + 'descr' => 'Cooling Prop. Band', + 'oid' => '.1.3.6.1.4.1.9839.2.1.2.21.0', 'precision' => '10', ], [ - 'mib' => 'CAREL-ug40cdz-MIB::cool2SetP.0', - 'descr' => 'Cooling 2nd Set Point', - 'oid' => '.1.3.6.1.4.1.9839.2.1.2.22.0', + 'mib' => 'CAREL-ug40cdz-MIB::cool2SetP.0', + 'descr' => 'Cooling 2nd Set Point', + 'oid' => '.1.3.6.1.4.1.9839.2.1.2.22.0', 'precision' => '10', ], [ - 'mib' => 'CAREL-ug40cdz-MIB::heatSetP.0', - 'descr' => 'Heating Set Point', - 'oid' => '.1.3.6.1.4.1.9839.2.1.2.23.0', + 'mib' => 'CAREL-ug40cdz-MIB::heatSetP.0', + 'descr' => 'Heating Set Point', + 'oid' => '.1.3.6.1.4.1.9839.2.1.2.23.0', 'precision' => '10', ], [ - 'mib' => 'CAREL-ug40cdz-MIB::heatDiff.0', - 'descr' => 'Heating Prop. Band', - 'oid' => '.1.3.6.1.4.1.9839.2.1.2.25.0', + 'mib' => 'CAREL-ug40cdz-MIB::heatDiff.0', + 'descr' => 'Heating Prop. Band', + 'oid' => '.1.3.6.1.4.1.9839.2.1.2.25.0', 'precision' => '10', ], [ - 'mib' => 'CAREL-ug40cdz-MIB::heat2SetP.0', - 'descr' => 'Heating 2nd Set Point', - 'oid' => '.1.3.6.1.4.1.9839.2.1.2.24.0', + 'mib' => 'CAREL-ug40cdz-MIB::heat2SetP.0', + 'descr' => 'Heating 2nd Set Point', + 'oid' => '.1.3.6.1.4.1.9839.2.1.2.24.0', 'precision' => '10', ], ]; diff --git a/includes/discovery/sensors/temperature/tpdin.inc.php b/includes/discovery/sensors/temperature/tpdin.inc.php index 4fb97a86e5..41302bb8bf 100644 --- a/includes/discovery/sensors/temperature/tpdin.inc.php +++ b/includes/discovery/sensors/temperature/tpdin.inc.php @@ -24,15 +24,15 @@ */ $tpdin_oids = [ [ - 'oid' => '.1.3.6.1.4.1.45621.2.2.13.0', - 'index' => 'temperature1', - 'descr' => 'External Temp', + 'oid' => '.1.3.6.1.4.1.45621.2.2.13.0', + 'index' => 'temperature1', + 'descr' => 'External Temp', 'current' => $pre_cache['tpdin_monitor'][0]['temperature1'], ], [ - 'oid' => '.1.3.6.1.4.1.45621.2.2.14.0', - 'index' => 'temperature2', - 'descr' => 'Internal Temp', + 'oid' => '.1.3.6.1.4.1.45621.2.2.14.0', + 'index' => 'temperature2', + 'descr' => 'Internal Temp', 'current' => $pre_cache['tpdin_monitor'][0]['temperature2'], ], ]; diff --git a/includes/discovery/sensors/voltage/tpdin.inc.php b/includes/discovery/sensors/voltage/tpdin.inc.php index 7f4892b0c7..9e050af9c5 100644 --- a/includes/discovery/sensors/voltage/tpdin.inc.php +++ b/includes/discovery/sensors/voltage/tpdin.inc.php @@ -24,27 +24,27 @@ */ $tpdin_oids = [ [ - 'oid' => '.1.3.6.1.4.1.45621.2.2.5.0', - 'index' => 'voltage1', - 'descr' => 'Voltage 1', + 'oid' => '.1.3.6.1.4.1.45621.2.2.5.0', + 'index' => 'voltage1', + 'descr' => 'Voltage 1', 'current' => $pre_cache['tpdin_monitor'][0]['voltage1'], ], [ - 'oid' => '.1.3.6.1.4.1.45621.2.2.6.0', - 'index' => 'voltage2', - 'descr' => 'Voltage 2', + 'oid' => '.1.3.6.1.4.1.45621.2.2.6.0', + 'index' => 'voltage2', + 'descr' => 'Voltage 2', 'current' => $pre_cache['tpdin_monitor'][0]['voltage2'], ], [ - 'oid' => '.1.3.6.1.4.1.45621.2.2.7.0', - 'index' => 'voltage3', - 'descr' => 'Voltage 3', + 'oid' => '.1.3.6.1.4.1.45621.2.2.7.0', + 'index' => 'voltage3', + 'descr' => 'Voltage 3', 'current' => $pre_cache['tpdin_monitor'][0]['voltage3'], ], [ - 'oid' => '.1.3.6.1.4.1.45621.2.2.8.0', - 'index' => 'voltage4', - 'descr' => 'Voltage 4', + 'oid' => '.1.3.6.1.4.1.45621.2.2.8.0', + 'index' => 'voltage4', + 'descr' => 'Voltage 4', 'current' => $pre_cache['tpdin_monitor'][0]['voltage4'], ], ]; diff --git a/includes/discovery/services.inc.php b/includes/discovery/services.inc.php index 17f6e72e9c..428fbaaee5 100644 --- a/includes/discovery/services.inc.php +++ b/includes/discovery/services.inc.php @@ -9,10 +9,10 @@ if (Config::get('discover_services_templates')) { if (Config::get('discover_services')) { // FIXME: use /etc/services? $known_services = [ - 22 => 'ssh', - 25 => 'smtp', - 53 => 'dns', - 80 => 'http', + 22 => 'ssh', + 25 => 'smtp', + 53 => 'dns', + 80 => 'http', 110 => 'pop', 143 => 'imap', ]; diff --git a/includes/discovery/vlans.inc.php b/includes/discovery/vlans.inc.php index aa224f3efa..08499d0b7b 100644 --- a/includes/discovery/vlans.inc.php +++ b/includes/discovery/vlans.inc.php @@ -61,8 +61,8 @@ foreach ($device['vlans'] as $domain_id => $vlans) { $db_w = [ 'device_id' => $device['device_id'], - 'port_id' => $port['port_id'] ?? null, - 'vlan' => $vlan_id, + 'port_id' => $port['port_id'] ?? null, + 'vlan' => $vlan_id, ]; $db_a['baseport'] = $index_to_base[$ifIndex] ?? ''; diff --git a/includes/functions.php b/includes/functions.php index 352915b69b..0b880ea44e 100755 --- a/includes/functions.php +++ b/includes/functions.php @@ -142,7 +142,7 @@ function device_discovery_trigger($id) $message = 'Error rediscovering device'; } - return ['status'=> $update, 'message' => $message]; + return ['status' => $update, 'message' => $message]; } function delete_device($id) @@ -740,13 +740,13 @@ function getCIMCentPhysical($location, &$entphysical, &$index) // Now we have an ID, create the entry. $index++; $insert = [ - 'device_id' => $device['device_id'], - 'entPhysicalIndex' => $index, - 'entPhysicalClass' => 'container', - 'entPhysicalVendorType' => $location, - 'entPhysicalName' => $shortlocation, - 'entPhysicalContainedIn' => $parent, - 'entPhysicalParentRelPos' => '-1', + 'device_id' => $device['device_id'], + 'entPhysicalIndex' => $index, + 'entPhysicalClass' => 'container', + 'entPhysicalVendorType' => $location, + 'entPhysicalName' => $shortlocation, + 'entPhysicalContainedIn' => $parent, + 'entPhysicalParentRelPos' => '-1', ]; // Add to the DB and Array. @@ -837,21 +837,21 @@ function cache_peeringdb() if ($tmp_peer) { $peer_keep[] = $tmp_peer['pdb_ix_peers_id']; $update = [ - 'remote_asn' => $peer->{'asn'}, - 'remote_ipaddr4' => $peer->{'ipaddr4'}, + 'remote_asn' => $peer->{'asn'}, + 'remote_ipaddr4' => $peer->{'ipaddr4'}, 'remote_ipaddr6' => $peer->{'ipaddr6'}, - 'name' => $peer_name, + 'name' => $peer_name, ]; dbUpdate($update, 'pdb_ix_peers', '`pdb_ix_peers_id` = ?', [$tmp_peer['pdb_ix_peers_id']]); } else { $peer_insert = [ - 'ix_id' => $ixid, - 'peer_id' => $peer->{'id'}, - 'remote_asn' => $peer->{'asn'}, + 'ix_id' => $ixid, + 'peer_id' => $peer->{'id'}, + 'remote_asn' => $peer->{'asn'}, 'remote_ipaddr4' => $peer->{'ipaddr4'}, 'remote_ipaddr6' => $peer->{'ipaddr6'}, - 'name' => $peer_name, - 'timestamp' => time(), + 'name' => $peer_name, + 'timestamp' => time(), ]; $peer_keep[] = dbInsert($peer_insert, 'pdb_ix_peers'); } diff --git a/includes/html/api_functions.inc.php b/includes/html/api_functions.inc.php index ba6272895a..ed2f46134e 100644 --- a/includes/html/api_functions.inc.php +++ b/includes/html/api_functions.inc.php @@ -81,7 +81,7 @@ function api_success_noresult($code, $message = null): JsonResponse function api_error($statusCode, $message): JsonResponse { return response()->json([ - 'status' => 'error', + 'status' => 'error', 'message' => $message, ], $statusCode, [], JSON_PRETTY_PRINT); } // end api_error() @@ -114,7 +114,7 @@ function api_get_graph(Request $request, array $additional = []) ]); $graph = Graph::get([ - 'width' => $request->get('width', 1075), + 'width' => $request->get('width', 1075), 'height' => $request->get('height', 300), ...$additional, ...$vars, @@ -815,7 +815,7 @@ function get_graph_by_portgroup(Request $request) } return api_get_graph($request, [ - 'type' => 'multiport_bits_separate', + 'type' => 'multiport_bits_separate', 'id' => $if_list, ]); } @@ -1017,7 +1017,7 @@ function list_available_wireless_graphs(Illuminate\Http\Request $request) foreach (dbFetchRows('SELECT `sensor_id`, `sensor_descr` FROM `wireless_sensors` WHERE `device_id` = ? AND `sensor_class` = ? AND `sensor_deleted` = 0', [$device_id, $type]) as $graph) { $graphs[] = [ 'sensor_id' => $graph['sensor_id'], - 'desc' => $graph['sensor_descr'], + 'desc' => $graph['sensor_descr'], ]; } } @@ -1327,7 +1327,7 @@ function add_edit_rule(Illuminate\Http\Request $request) } $extra = [ - 'mute' => $mute, + 'mute' => $mute, 'count' => $count, 'delay' => $delay_sec, 'interval' => $interval_sec, diff --git a/includes/html/collectd/config.php b/includes/html/collectd/config.php index ad8c4b77ff..ad4f0ab051 100644 --- a/includes/html/collectd/config.php +++ b/includes/html/collectd/config.php @@ -56,24 +56,24 @@ Config::set('rrd_rows', 2400); // "-c", "MGRID#FFAAAA", "-c", "FRAME#3e3e3e", "-c", "ARROW#5e5e5e", "-R", "normal"); // Predefined set of colors for use by collectd_draw_rrd() Config::set('rrd_colors', [ - 'h_1' => 'F7B7B7', - 'f_1' => 'FF0000', // Red - 'h_2' => 'B7EFB7', - 'f_2' => '00E000', // Green - 'h_3' => 'B7B7F7', - 'f_3' => '0000FF', // Blue - 'h_4' => 'F3DFB7', - 'f_4' => 'F0A000', // Yellow - 'h_5' => 'B7DFF7', - 'f_5' => '00A0FF', // Cyan - 'h_6' => 'DFB7F7', - 'f_6' => 'A000FF', // Magenta - 'h_7' => 'FFC782', - 'f_7' => 'FF8C00', // Orange - 'h_8' => 'DCFF96', - 'f_8' => 'AAFF00', // Lime - 'h_9' => '83FFCD', - 'f_9' => '00FF99', + 'h_1' => 'F7B7B7', + 'f_1' => 'FF0000', // Red + 'h_2' => 'B7EFB7', + 'f_2' => '00E000', // Green + 'h_3' => 'B7B7F7', + 'f_3' => '0000FF', // Blue + 'h_4' => 'F3DFB7', + 'f_4' => 'F0A000', // Yellow + 'h_5' => 'B7DFF7', + 'f_5' => '00A0FF', // Cyan + 'h_6' => 'DFB7F7', + 'f_6' => 'A000FF', // Magenta + 'h_7' => 'FFC782', + 'f_7' => 'FF8C00', // Orange + 'h_8' => 'DCFF96', + 'f_8' => 'AAFF00', // Lime + 'h_9' => '83FFCD', + 'f_9' => '00FF99', 'h_10' => '81D9FF', 'f_10' => '00B2FF', 'h_11' => 'FF89F5', diff --git a/includes/html/collectd/definitions.local.php b/includes/html/collectd/definitions.local.php index ece0fabd11..cc08c4824a 100644 --- a/includes/html/collectd/definitions.local.php +++ b/includes/html/collectd/definitions.local.php @@ -75,7 +75,7 @@ function meta_graph_local($host, $plugin, $plugin_instance, $type, $type_instanc continue; } - $sources[] = ['name'=>$inst, 'file'=>$file]; + $sources[] = ['name' => $inst, 'file' => $file]; } // return collectd_draw_meta_stack($opts, $sources); diff --git a/includes/html/collectd/definitions.php b/includes/html/collectd/definitions.php index e95c0fb2f7..c82abd8f66 100644 --- a/includes/html/collectd/definitions.php +++ b/includes/html/collectd/definitions.php @@ -1677,7 +1677,7 @@ function meta_graph_files_count($host, $plugin, $plugin_instance, $type, $type_i $opts['colors'] = [ 'incoming' => '00e000', - 'active' => 'a0e000', + 'active' => 'a0e000', 'deferred' => 'a00050', ]; @@ -1694,7 +1694,7 @@ function meta_graph_files_count($host, $plugin, $plugin_instance, $type, $type_i continue; } - $sources[] = ['name'=>$inst, 'file'=>$file]; + $sources[] = ['name' => $inst, 'file' => $file]; } return collectd_draw_meta_stack($opts, $sources); @@ -1712,7 +1712,7 @@ function meta_graph_files_size($host, $plugin, $plugin_instance, $type, $type_in $opts['colors'] = [ 'incoming' => '00e000', - 'active' => 'a0e000', + 'active' => 'a0e000', 'deferred' => 'a00050', ]; @@ -1729,7 +1729,7 @@ function meta_graph_files_size($host, $plugin, $plugin_instance, $type, $type_in continue; } - $sources[] = ['name'=>$inst, 'file'=>$file]; + $sources[] = ['name' => $inst, 'file' => $file]; } return collectd_draw_meta_stack($opts, $sources); @@ -1746,14 +1746,14 @@ function meta_graph_cpu($host, $plugin, $plugin_instance, $type, $type_instances $opts['rrd_opts'] = ['-r', '-u', '100', 'COMMENT:Percent Cur Min Ave Max\l']; $opts['colors'] = [ - 'idle' => 'ffffff', - 'nice' => '00e000', - 'user' => '0000ff', - 'wait' => 'ffb000', - 'system' => 'ff0000', - 'softirq' => 'ff00ff', + 'idle' => 'ffffff', + 'nice' => '00e000', + 'user' => '0000ff', + 'wait' => 'ffb000', + 'system' => 'ff0000', + 'softirq' => 'ff00ff', 'interrupt' => 'a000a0', - 'steal' => '000000', + 'steal' => '000000', ]; $type_instances = ['idle', 'wait', 'nice', 'user', 'system', 'softirq', 'interrupt', 'steal']; @@ -1769,7 +1769,7 @@ function meta_graph_cpu($host, $plugin, $plugin_instance, $type, $type_instances continue; } - $sources[] = ['name'=>$inst, 'file'=>$file]; + $sources[] = ['name' => $inst, 'file' => $file]; } return collectd_draw_meta_stack($opts, $sources); @@ -1788,10 +1788,10 @@ function meta_graph_memory($host, $plugin, $plugin_instance, $type, $type_instan // BYTES $opts['colors'] = [ - 'free' => '00e000', - 'cached' => '0000ff', + 'free' => '00e000', + 'cached' => '0000ff', 'buffered' => 'ffb000', - 'used' => 'ff0000', + 'used' => 'ff0000', ]; $type_instances = ['free', 'cached', 'buffered', 'used']; @@ -1807,7 +1807,7 @@ function meta_graph_memory($host, $plugin, $plugin_instance, $type, $type_instan continue; } - $sources[] = ['name'=>$inst, 'file'=>$file]; + $sources[] = ['name' => $inst, 'file' => $file]; } return collectd_draw_meta_stack($opts, $sources); @@ -1825,9 +1825,9 @@ function meta_graph_vs_threads($host, $plugin, $plugin_instance, $type, $type_in $opts['rrd_opts'] = ['-v', 'Threads']; $opts['colors'] = [ - 'total' => 'F0A000', - 'running' => 'FF0000', - 'onhold' => '00E000', + 'total' => 'F0A000', + 'running' => 'FF0000', + 'onhold' => '00E000', 'uninterruptable' => '0000FF', ]; @@ -1844,7 +1844,7 @@ function meta_graph_vs_threads($host, $plugin, $plugin_instance, $type, $type_in continue; } - $sources[] = ['name'=>$inst, 'file'=>$file]; + $sources[] = ['name' => $inst, 'file' => $file]; } return collectd_draw_meta_line($opts, $sources); @@ -1862,9 +1862,9 @@ function meta_graph_vs_memory($host, $plugin, $plugin_instance, $type, $type_ins $opts['rrd_opts'] = ['-b', '1024', '-v', 'Bytes']; $opts['colors'] = [ - 'vm' => 'F0A000', - 'vml' => 'FF0000', - 'rss' => '00E000', + 'vm' => 'F0A000', + 'vml' => 'FF0000', + 'rss' => '00E000', 'anon' => '0000FF', ]; @@ -1881,7 +1881,7 @@ function meta_graph_vs_memory($host, $plugin, $plugin_instance, $type, $type_ins continue; } - $sources[] = ['name'=>$inst, 'file'=>$file]; + $sources[] = ['name' => $inst, 'file' => $file]; } return collectd_draw_meta_line($opts, $sources); @@ -1910,7 +1910,7 @@ function meta_graph_if_rx_errors($host, $plugin, $plugin_instance, $type, $type_ continue; } - $sources[] = ['name'=>$inst, 'file'=>$file]; + $sources[] = ['name' => $inst, 'file' => $file]; } return collectd_draw_meta_stack($opts, $sources); @@ -1939,7 +1939,7 @@ function meta_graph_mysql_commands($host, $plugin, $plugin_instance, $type, $typ continue; } - $sources[] = ['name'=>$inst, 'file'=>$file]; + $sources[] = ['name' => $inst, 'file' => $file]; } return collectd_draw_meta_stack($opts, $sources); @@ -1968,7 +1968,7 @@ function meta_graph_nfs_procedure($host, $plugin, $plugin_instance, $type, $type continue; } - $sources[] = ['name'=>$inst, 'file'=>$file]; + $sources[] = ['name' => $inst, 'file' => $file]; } return collectd_draw_meta_stack($opts, $sources); @@ -1985,12 +1985,12 @@ function meta_graph_ps_state($host, $plugin, $plugin_instance, $type, $type_inst $opts['rrd_opts'] = ['COMMENT:Processes Cur Avg Min Max\l']; $opts['colors'] = [ - 'running' => '00e000', + 'running' => '00e000', 'sleeping' => '0000ff', - 'paging' => 'ffb000', - 'zombies' => 'ff0000', - 'blocked' => 'ff00ff', - 'stopped' => 'a000a0', + 'paging' => 'ffb000', + 'zombies' => 'ff0000', + 'blocked' => 'ff00ff', + 'stopped' => 'a000a0', ]; $type_instances = ['paging', 'blocked', 'zombies', 'stopped', 'running', 'sleeping']; @@ -2006,7 +2006,7 @@ function meta_graph_ps_state($host, $plugin, $plugin_instance, $type, $type_inst continue; } - $sources[] = ['name'=>$inst, 'file'=>$file]; + $sources[] = ['name' => $inst, 'file' => $file]; } return collectd_draw_meta_stack($opts, $sources); @@ -2024,9 +2024,9 @@ function meta_graph_swap($host, $plugin, $plugin_instance, $type, $type_instance $opts['rrd_opts'] = ['-b', '1024', 'COMMENT:Bytes Cur Avg Min Max\l']; $opts['colors'] = [ - 'free' => '00e000', - 'cached' => '0000ff', - 'used' => 'ff0000', + 'free' => '00e000', + 'cached' => '0000ff', + 'used' => 'ff0000', ]; $type_instances = ['free', 'cached', 'used']; @@ -2042,7 +2042,7 @@ function meta_graph_swap($host, $plugin, $plugin_instance, $type, $type_instance continue; } - $sources[] = ['name'=>$inst, 'file'=>$file]; + $sources[] = ['name' => $inst, 'file' => $file]; } return collectd_draw_meta_stack($opts, $sources); @@ -2060,16 +2060,16 @@ function meta_graph_apache_scoreboard($host, $plugin, $plugin_instance, $type, $ $opts['rrd_opts'] = ['COMMENT:Processes Cur Min Ave Max\l']; $opts['colors'] = [ - 'open' => '00e000', - 'waiting' => '0000ff', - 'starting' => 'a00000', - 'reading' => 'ff0000', - 'sending' => '00ff00', - 'keepalive' => 'f000f0', - 'dnslookup' => '00a000', - 'logging' => '008080', - 'closing' => 'a000a0', - 'finishing' => '000080', + 'open' => '00e000', + 'waiting' => '0000ff', + 'starting' => 'a00000', + 'reading' => 'ff0000', + 'sending' => '00ff00', + 'keepalive' => 'f000f0', + 'dnslookup' => '00a000', + 'logging' => '008080', + 'closing' => 'a000a0', + 'finishing' => '000080', 'idle_cleanup' => '000000', ]; @@ -2086,7 +2086,7 @@ function meta_graph_apache_scoreboard($host, $plugin, $plugin_instance, $type, $ continue; } - $sources[] = ['name'=>$inst, 'file'=>$file, 'ds'=>'value']; + $sources[] = ['name' => $inst, 'file' => $file, 'ds' => 'value']; } return collectd_draw_meta_stack($opts, $sources); @@ -2106,16 +2106,16 @@ function meta_graph_tcp_connections($host, $plugin, $plugin_instance, $type, $ty $opts['colors'] = [ 'ESTABLISHED' => '00e000', - 'SYN_SENT' => '00e0ff', - 'SYN_RECV' => '00e0a0', - 'FIN_WAIT1' => 'f000f0', - 'FIN_WAIT2' => 'f000a0', - 'TIME_WAIT' => 'ffb000', - 'CLOSE' => '0000f0', - 'CLOSE_WAIT' => '0000a0', - 'LAST_ACK' => '000080', - 'LISTEN' => 'ff0000', - 'CLOSING' => '000000', + 'SYN_SENT' => '00e0ff', + 'SYN_RECV' => '00e0a0', + 'FIN_WAIT1' => 'f000f0', + 'FIN_WAIT2' => 'f000a0', + 'TIME_WAIT' => 'ffb000', + 'CLOSE' => '0000f0', + 'CLOSE_WAIT' => '0000a0', + 'LAST_ACK' => '000080', + 'LISTEN' => 'ff0000', + 'CLOSING' => '000000', ]; $type_instances = ['ESTABLISHED', 'SYN_SENT', 'SYN_RECV', 'FIN_WAIT1', 'FIN_WAIT2', 'TIME_WAIT', 'CLOSE', 'CLOSE_WAIT', 'LAST_ACK', 'CLOSING', 'LISTEN']; @@ -2131,7 +2131,7 @@ function meta_graph_tcp_connections($host, $plugin, $plugin_instance, $type, $ty continue; } - $sources[] = ['name'=>$inst, 'file'=>$file, 'ds'=>'value']; + $sources[] = ['name' => $inst, 'file' => $file, 'ds' => 'value']; } return collectd_draw_meta_stack($opts, $sources); diff --git a/includes/html/forms/alert-details.inc.php b/includes/html/forms/alert-details.inc.php index 7a3b6f121d..cf5356b837 100644 --- a/includes/html/forms/alert-details.inc.php +++ b/includes/html/forms/alert-details.inc.php @@ -12,7 +12,7 @@ if (! Auth::user()->hasGlobalAdmin()) { $message = 'Wrong permissions'; $details = 'You need to have admin permissions.'; exit(json_encode([ - 'status' => $status, + 'status' => $status, 'message' => $message, 'details' => $details, ])); @@ -34,7 +34,7 @@ if (is_numeric($alert_log_id)) { } exit(json_encode([ - 'status' => $status, + 'status' => $status, 'message' => $message, 'details' => $details, ])); diff --git a/includes/html/forms/alert-notes.inc.php b/includes/html/forms/alert-notes.inc.php index 9e7be051b9..d6f088cc0f 100644 --- a/includes/html/forms/alert-notes.inc.php +++ b/includes/html/forms/alert-notes.inc.php @@ -46,7 +46,7 @@ if (is_numeric($alert_id)) { $message = 'Invalid alert id'; } exit(json_encode([ - 'status' => $status, + 'status' => $status, 'message' => $message, - 'note' => $note, + 'note' => $note, ])); diff --git a/includes/html/forms/alert-rules.inc.php b/includes/html/forms/alert-rules.inc.php index 3f5066592a..467c0ce5e8 100644 --- a/includes/html/forms/alert-rules.inc.php +++ b/includes/html/forms/alert-rules.inc.php @@ -92,14 +92,14 @@ if ($invert_map == 'on') { } $extra = [ - 'mute' => $mute, - 'count' => $count, - 'delay' => $delay_sec, - 'invert' => $invert, - 'interval' => $interval_sec, - 'recovery' => $recovery, + 'mute' => $mute, + 'count' => $count, + 'delay' => $delay_sec, + 'invert' => $invert, + 'interval' => $interval_sec, + 'recovery' => $recovery, 'acknowledgement' => $acknowledgement, - 'options' => $options, + 'options' => $options, ]; $extra_json = json_encode($extra); @@ -237,6 +237,6 @@ if (is_numeric($rule_id) && $rule_id > 0) { } exit(json_encode([ - 'status' => $status, - 'message' => $message, + 'status' => $status, + 'message' => $message, ])); diff --git a/includes/html/forms/alert-transports.inc.php b/includes/html/forms/alert-transports.inc.php index 21190036f3..544346d9b1 100644 --- a/includes/html/forms/alert-transports.inc.php +++ b/includes/html/forms/alert-transports.inc.php @@ -110,6 +110,6 @@ if (empty($name)) { } exit(json_encode([ - 'status' => $status, - 'message' => $message, + 'status' => $status, + 'message' => $message, ])); diff --git a/includes/html/forms/component.inc.php b/includes/html/forms/component.inc.php index b052102fc9..2a4ff80ccd 100644 --- a/includes/html/forms/component.inc.php +++ b/includes/html/forms/component.inc.php @@ -4,7 +4,7 @@ header('Content-type: application/json'); if (! Auth::user()->hasGlobalAdmin()) { $response = [ - 'status' => 'error', + 'status' => 'error', 'message' => 'Need to be admin', ]; echo json_encode($response, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE); @@ -76,7 +76,7 @@ if (count($UPDATE) > 0) { } $response = [ - 'status' => $status, - 'message' => $message, + 'status' => $status, + 'message' => $message, ]; echo json_encode($response, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE); diff --git a/includes/html/forms/create-alert-item.inc.php b/includes/html/forms/create-alert-item.inc.php index dad7d6d26b..233ebb3df1 100644 --- a/includes/html/forms/create-alert-item.inc.php +++ b/includes/html/forms/create-alert-item.inc.php @@ -57,10 +57,10 @@ if (empty($rule)) { } $extra = [ - 'mute' => $mute, - 'count' => $count, - 'delay' => $delay_sec, - 'invert' => $invert, + 'mute' => $mute, + 'count' => $count, + 'delay' => $delay_sec, + 'invert' => $invert, 'interval' => $interval_sec, ]; $extra_json = json_encode($extra); diff --git a/includes/html/forms/create-service.inc.php b/includes/html/forms/create-service.inc.php index 7c6e57286a..50eea8514a 100644 --- a/includes/html/forms/create-service.inc.php +++ b/includes/html/forms/create-service.inc.php @@ -50,17 +50,17 @@ foreach (['stype', 'device_id', 'service_id'] as $varname) { if (is_numeric($service_id) && $service_id > 0) { // Need to edit. if (is_numeric(edit_service($update, $service_id))) { - $status = ['status' =>0, 'message' => 'Modified Service: ' . $service_id . ': ' . $stype . '']; + $status = ['status' => 0, 'message' => 'Modified Service: ' . $service_id . ': ' . $stype . '']; } else { - $status = ['status' =>1, 'message' => 'ERROR: Failed to modify service: ' . $service_id . '']; + $status = ['status' => 1, 'message' => 'ERROR: Failed to modify service: ' . $service_id . '']; } } else { // Need to add. $service_id = add_service($device_id, $stype, $desc, $ip, $param, $ignore, $disabled, 0, $name); if ($service_id == false) { - $status = ['status' =>1, 'message' => 'ERROR: Failed to add Service: ' . $stype . '']; + $status = ['status' => 1, 'message' => 'ERROR: Failed to add Service: ' . $stype . '']; } else { - $status = ['status' =>0, 'message' => 'Added Service: ' . $service_id . ': ' . $stype . '']; + $status = ['status' => 0, 'message' => 'Added Service: ' . $service_id . ': ' . $stype . '']; } } header('Content-Type: application/json'); diff --git a/includes/html/forms/customoid.inc.php b/includes/html/forms/customoid.inc.php index 31ff2d8ade..56cd45b992 100644 --- a/includes/html/forms/customoid.inc.php +++ b/includes/html/forms/customoid.inc.php @@ -4,7 +4,7 @@ header('Content-type: application/json'); if (! Auth::user()->hasGlobalAdmin()) { exit(json_encode([ - 'status' => 'error', + 'status' => 'error', 'message' => 'Need to be admin', ])); } @@ -68,19 +68,19 @@ if ($action == 'test') { if (is_numeric($id) && $id > 0) { if (dbUpdate( [ - 'customoid_descr' => $name, - 'customoid_oid' => $oid, - 'customoid_datatype' => $datatype, - 'customoid_unit' => $unit, - 'customoid_divisor' => $divisor, - 'customoid_multiplier' => $multiplier, - 'customoid_limit' => $limit, - 'customoid_limit_warn' => $limit_warn, - 'customoid_limit_low' => $limit_low, + 'customoid_descr' => $name, + 'customoid_oid' => $oid, + 'customoid_datatype' => $datatype, + 'customoid_unit' => $unit, + 'customoid_divisor' => $divisor, + 'customoid_multiplier' => $multiplier, + 'customoid_limit' => $limit, + 'customoid_limit_warn' => $limit_warn, + 'customoid_limit_low' => $limit_low, 'customoid_limit_low_warn' => $limit_low_warn, - 'customoid_alert' => $alerts, - 'customoid_passed' => $passed, - 'user_func' => $user_func, + 'customoid_alert' => $alerts, + 'customoid_passed' => $passed, + 'user_func' => $user_func, ], 'customoids', '`customoid_id` = ?', @@ -98,20 +98,20 @@ if ($action == 'test') { } else { $id = dbInsert( [ - 'device_id' => $device_id, - 'customoid_descr' => $name, - 'customoid_oid' => $oid, - 'customoid_datatype' => $datatype, - 'customoid_unit' => $unit, - 'customoid_divisor' => $divisor, - 'customoid_multiplier' => $multiplier, - 'customoid_limit' => $limit, - 'customoid_limit_warn' => $limit_warn, - 'customoid_limit_low' => $limit_low, + 'device_id' => $device_id, + 'customoid_descr' => $name, + 'customoid_oid' => $oid, + 'customoid_datatype' => $datatype, + 'customoid_unit' => $unit, + 'customoid_divisor' => $divisor, + 'customoid_multiplier' => $multiplier, + 'customoid_limit' => $limit, + 'customoid_limit_warn' => $limit_warn, + 'customoid_limit_low' => $limit_low, 'customoid_limit_low_warn' => $limit_low_warn, - 'customoid_alert' => $alerts, - 'customoid_passed' => $passed, - 'user_func' => $user_func, + 'customoid_alert' => $alerts, + 'customoid_passed' => $passed, + 'user_func' => $user_func, ], 'customoids' ); @@ -125,6 +125,6 @@ if ($action == 'test') { } exit(json_encode([ - 'status' => $status, - 'message' => $message, + 'status' => $status, + 'message' => $message, ])); diff --git a/includes/html/forms/delete-alert-transport.inc.php b/includes/html/forms/delete-alert-transport.inc.php index b40d23eb60..dd8cff3796 100644 --- a/includes/html/forms/delete-alert-transport.inc.php +++ b/includes/html/forms/delete-alert-transport.inc.php @@ -38,5 +38,5 @@ if (! is_numeric($vars['transport_id'])) { exit(json_encode([ 'status' => $status, - 'message'=> $message, + 'message' => $message, ])); diff --git a/includes/html/forms/delete-cluster-poller.inc.php b/includes/html/forms/delete-cluster-poller.inc.php index 664efc2bd4..8d66f558cd 100644 --- a/includes/html/forms/delete-cluster-poller.inc.php +++ b/includes/html/forms/delete-cluster-poller.inc.php @@ -23,11 +23,11 @@ * @author Tony Murray */ if (! Auth::user()->hasGlobalAdmin()) { - $status = ['status' =>1, 'message' => 'ERROR: You need to be admin to delete poller entries']; + $status = ['status' => 1, 'message' => 'ERROR: You need to be admin to delete poller entries']; } else { $id = $vars['id']; if (! is_numeric($id)) { - $status = ['status' =>1, 'message' => 'No poller has been selected']; + $status = ['status' => 1, 'message' => 'No poller has been selected']; } else { $poller_name = dbFetchCell('SELECT `poller_name` FROM `pollers` WHERE `id`=?', [$id]); if (dbDelete('poller_cluster', 'id=?', [$id]) && dbDelete('poller_cluster_stats', 'parent_poller=?', [$id])) { diff --git a/includes/html/forms/delete-customoid.inc.php b/includes/html/forms/delete-customoid.inc.php index ff4faa474b..4256100903 100644 --- a/includes/html/forms/delete-customoid.inc.php +++ b/includes/html/forms/delete-customoid.inc.php @@ -4,7 +4,7 @@ header('Content-type: text/plain'); if (! Auth::user()->hasGlobalAdmin()) { $response = [ - 'status' => 'error', + 'status' => 'error', 'message' => 'Need to be admin', ]; echo json_encode($response, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE); diff --git a/includes/html/forms/delete-poller.inc.php b/includes/html/forms/delete-poller.inc.php index 74f58a0ac6..d783b10c01 100644 --- a/includes/html/forms/delete-poller.inc.php +++ b/includes/html/forms/delete-poller.inc.php @@ -23,11 +23,11 @@ * @author Tony Murray */ if (! Auth::user()->hasGlobalAdmin()) { - $status = ['status' =>1, 'message' => 'ERROR: You need to be admin to delete poller entries']; + $status = ['status' => 1, 'message' => 'ERROR: You need to be admin to delete poller entries']; } else { $id = $vars['id']; if (! is_numeric($id)) { - $status = ['status' =>1, 'message' => 'No poller has been selected']; + $status = ['status' => 1, 'message' => 'No poller has been selected']; } else { $poller_name = dbFetchCell('SELECT `poller_name` FROM `pollers` WHERE `id`=?', [$id]); if (dbDelete('pollers', 'id=?', [$id])) { diff --git a/includes/html/forms/delete-service.inc.php b/includes/html/forms/delete-service.inc.php index a28a570c37..4c2769a7d8 100644 --- a/includes/html/forms/delete-service.inc.php +++ b/includes/html/forms/delete-service.inc.php @@ -12,15 +12,15 @@ */ if (! Auth::user()->hasGlobalAdmin()) { - $status = ['status' =>1, 'message' => 'ERROR: You need to be admin to delete services']; + $status = ['status' => 1, 'message' => 'ERROR: You need to be admin to delete services']; } else { if (! is_numeric($vars['service_id'])) { - $status = ['status' =>1, 'message' => 'No Service has been selected']; + $status = ['status' => 1, 'message' => 'No Service has been selected']; } else { if (delete_service($vars['service_id'])) { - $status = ['status' =>0, 'message' => 'Service: ' . $vars['service_id'] . ', has been deleted.']; + $status = ['status' => 0, 'message' => 'Service: ' . $vars['service_id'] . ', has been deleted.']; } else { - $status = ['status' =>1, 'message' => 'Service: ' . $vars['service_id'] . ', has NOT been deleted.']; + $status = ['status' => 1, 'message' => 'Service: ' . $vars['service_id'] . ', has NOT been deleted.']; } } } diff --git a/includes/html/forms/delete-transport-group.inc.php b/includes/html/forms/delete-transport-group.inc.php index b4051ed045..1f6572ccfa 100644 --- a/includes/html/forms/delete-transport-group.inc.php +++ b/includes/html/forms/delete-transport-group.inc.php @@ -39,5 +39,5 @@ if (! is_numeric($vars['group_id'])) { exit(json_encode([ 'status' => $status, - 'message'=> $message, + 'message' => $message, ])); diff --git a/includes/html/forms/mempool-update.inc.php b/includes/html/forms/mempool-update.inc.php index d0da012c8b..67b148f53f 100644 --- a/includes/html/forms/mempool-update.inc.php +++ b/includes/html/forms/mempool-update.inc.php @@ -16,7 +16,7 @@ header('Content-type: application/json'); if (! Auth::user()->hasGlobalAdmin()) { $response = [ - 'status' => 'error', + 'status' => 'error', 'message' => 'Need to be admin', ]; echo json_encode($response, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE); @@ -37,7 +37,7 @@ if (! is_numeric($device_id)) { } elseif (! is_numeric($data)) { $message = 'Missing value'; } else { - if (dbUpdate(['mempool_perc_warn'=>$data], 'mempools', '`mempool_id`=? AND `device_id`=?', [$mempool_id, $device_id]) >= 0) { + if (dbUpdate(['mempool_perc_warn' => $data], 'mempools', '`mempool_id`=? AND `device_id`=?', [$mempool_id, $device_id]) >= 0) { $message = 'Memory information updated'; $status = 'ok'; } else { @@ -46,8 +46,8 @@ if (! is_numeric($device_id)) { } $response = [ - 'status' => $status, - 'message' => $message, - 'extra' => $extra, + 'status' => $status, + 'message' => $message, + 'extra' => $extra, ]; echo json_encode($response, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE); diff --git a/includes/html/forms/notifications.inc.php b/includes/html/forms/notifications.inc.php index a5ef53c7b3..bcabcdacfc 100644 --- a/includes/html/forms/notifications.inc.php +++ b/includes/html/forms/notifications.inc.php @@ -37,7 +37,7 @@ if (in_array($_REQUEST['action'], ['stick', 'unstick', 'create']) && ! Auth::use } if ($_REQUEST['action'] == 'read' && isset($_REQUEST['notification_id'])) { - if (dbInsert(['notifications_id'=>$_REQUEST['notification_id'], 'user_id'=>Auth::id(), 'key'=>'read', 'value'=>1], 'notifications_attribs')) { + if (dbInsert(['notifications_id' => $_REQUEST['notification_id'], 'user_id' => Auth::id(), 'key' => 'read', 'value' => 1], 'notifications_attribs')) { exit(json_encode([ 'status' => 'ok', 'message' => 'Set as Read', @@ -61,7 +61,7 @@ if ($_REQUEST['action'] == 'read' && isset($_REQUEST['notification_id'])) { 'message' => 'All notifications set as read', ])); } elseif ($_REQUEST['action'] == 'stick' && isset($_REQUEST['notification_id'])) { - if (dbInsert(['notifications_id'=>$_REQUEST['notification_id'], 'user_id'=>Auth::id(), 'key'=>'sticky', 'value'=>1], 'notifications_attribs')) { + if (dbInsert(['notifications_id' => $_REQUEST['notification_id'], 'user_id' => Auth::id(), 'key' => 'sticky', 'value' => 1], 'notifications_attribs')) { exit(json_encode([ 'status' => 'ok', 'message' => 'Set as Sticky', @@ -75,7 +75,7 @@ if ($_REQUEST['action'] == 'read' && isset($_REQUEST['notification_id'])) { ])); } } elseif ($_REQUEST['action'] == 'create' && (! empty($_REQUEST['title']) && ! empty($_REQUEST['body']))) { - if (dbInsert(['title'=>$_REQUEST['title'], 'body'=>$_REQUEST['body'], 'checksum'=>hash('sha512', Auth::id() . '.LOCAL.' . $_REQUEST['title']), 'source'=>Auth::id()], 'notifications')) { + if (dbInsert(['title' => $_REQUEST['title'], 'body' => $_REQUEST['body'], 'checksum' => hash('sha512', Auth::id() . '.LOCAL.' . $_REQUEST['title']), 'source' => Auth::id()], 'notifications')) { exit(json_encode([ 'status' => 'ok', 'message' => 'Created', @@ -89,6 +89,6 @@ if ($_REQUEST['action'] == 'read' && isset($_REQUEST['notification_id'])) { } exit(json_encode([ - 'status' => 'error', - 'message' => 'unknown error', + 'status' => 'error', + 'message' => 'unknown error', ])); diff --git a/includes/html/forms/override-config.inc.php b/includes/html/forms/override-config.inc.php index a493e87acf..6c1f09c25e 100644 --- a/includes/html/forms/override-config.inc.php +++ b/includes/html/forms/override-config.inc.php @@ -16,7 +16,7 @@ header('Content-type: application/json'); if (! Auth::user()->hasGlobalAdmin()) { $response = [ - 'status' => 'error', + 'status' => 'error', 'message' => 'Need to be admin', ]; echo json_encode($response, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE); @@ -42,7 +42,7 @@ if (empty($device['device_id'])) { } $response = [ - 'status' => $status, - 'message' => $message, + 'status' => $status, + 'message' => $message, ]; echo json_encode($response, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE); diff --git a/includes/html/forms/parse-alert-rule.inc.php b/includes/html/forms/parse-alert-rule.inc.php index 7cb571e568..183c205929 100644 --- a/includes/html/forms/parse-alert-rule.inc.php +++ b/includes/html/forms/parse-alert-rule.inc.php @@ -73,14 +73,14 @@ if (is_array($rule)) { header('Content-type: application/json'); echo json_encode([ - 'extra' => isset($rule['extra']) ? json_decode($rule['extra']) : null, - 'maps' => $maps, + 'extra' => isset($rule['extra']) ? json_decode($rule['extra']) : null, + 'maps' => $maps, 'transports' => $transports, - 'name' => $rule['name'], - 'proc' => $rule['proc'], - 'builder' => $builder, - 'severity' => $rule['severity'], - 'adv_query' => $rule['query'], - 'invert_map' => $rule['invert_map'], + 'name' => $rule['name'], + 'proc' => $rule['proc'], + 'builder' => $builder, + 'severity' => $rule['severity'], + 'adv_query' => $rule['query'], + 'invert_map' => $rule['invert_map'], ]); } diff --git a/includes/html/forms/parse-alert-template.inc.php b/includes/html/forms/parse-alert-template.inc.php index 3b98f2c146..9f74b9fedf 100644 --- a/includes/html/forms/parse-alert-template.inc.php +++ b/includes/html/forms/parse-alert-template.inc.php @@ -22,22 +22,22 @@ $template_edit = is_numeric($template_id) && $template_id > 0; $rules = []; $output = [ - 'template' => '', - 'name' => '', - 'title' => '', + 'template' => '', + 'name' => '', + 'title' => '', 'title_rec' => '', - 'type' => '', - 'rules' => $rules, + 'type' => '', + 'rules' => $rules, ]; if ($template_edit) { $template = dbFetchRow('SELECT * FROM `alert_templates` WHERE `id` = ? LIMIT 1', [$template_id]); $output = [ - 'template' => $template['template'], - 'name' => $template['name'], - 'title' => $template['title'], + 'template' => $template['template'], + 'name' => $template['name'], + 'title' => $template['title'], 'title_rec' => $template['title_rec'], - 'type' => $template['type'], + 'type' => $template['type'], ]; } diff --git a/includes/html/forms/parse-customoid.inc.php b/includes/html/forms/parse-customoid.inc.php index 486ad68c36..974ad729ee 100644 --- a/includes/html/forms/parse-customoid.inc.php +++ b/includes/html/forms/parse-customoid.inc.php @@ -2,7 +2,7 @@ if (! Auth::user()->hasGlobalAdmin()) { $response = [ - 'status' => 'error', + 'status' => 'error', 'message' => 'Need to be admin', ]; echo json_encode($response, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE); @@ -28,19 +28,19 @@ if (is_numeric($customoid_id) && $customoid_id > 0) { header('Content-type: application/json'); echo json_encode([ - 'name' => $oid['customoid_descr'], - 'oid' => $oid['customoid_oid'], - 'datatype' => $oid['customoid_datatype'], - 'unit' => $oid['customoid_unit'], - 'divisor' => $oid['customoid_divisor'], - 'multiplier' => $oid['customoid_multiplier'], - 'limit' => $oid['customoid_limit'], - 'limit_warn' => $oid['customoid_limit_warn'], - 'limit_low' => $oid['customoid_limit_low'], + 'name' => $oid['customoid_descr'], + 'oid' => $oid['customoid_oid'], + 'datatype' => $oid['customoid_datatype'], + 'unit' => $oid['customoid_unit'], + 'divisor' => $oid['customoid_divisor'], + 'multiplier' => $oid['customoid_multiplier'], + 'limit' => $oid['customoid_limit'], + 'limit_warn' => $oid['customoid_limit_warn'], + 'limit_low' => $oid['customoid_limit_low'], 'limit_low_warn' => $oid['customoid_limit_low_warn'], - 'alerts' => $alerts, - 'cpassed' => $cpassed, - 'passed' => $passed, - 'user_func' => $oid['user_func'], + 'alerts' => $alerts, + 'cpassed' => $cpassed, + 'passed' => $passed, + 'user_func' => $oid['user_func'], ]); } diff --git a/includes/html/forms/parse-poller-groups.inc.php b/includes/html/forms/parse-poller-groups.inc.php index a10f3150b9..3543c22467 100644 --- a/includes/html/forms/parse-poller-groups.inc.php +++ b/includes/html/forms/parse-poller-groups.inc.php @@ -23,7 +23,7 @@ if (is_numeric($group_id) && $group_id > 0) { $group = dbFetchRow('SELECT * FROM `poller_groups` WHERE `id` = ? LIMIT 1', [$group_id]); $output = [ 'group_name' => $group['group_name'], - 'descr' => $group['descr'], + 'descr' => $group['descr'], ]; header('Content-type: application/json'); echo json_encode($output, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE); diff --git a/includes/html/forms/parse-service.inc.php b/includes/html/forms/parse-service.inc.php index 1d536ae257..303b1c50bc 100644 --- a/includes/html/forms/parse-service.inc.php +++ b/includes/html/forms/parse-service.inc.php @@ -22,14 +22,14 @@ if (is_numeric($service_id) && $service_id > 0) { $service = service_get(null, $service_id); $output = [ - 'stype' => $service[0]['service_type'], - 'ip' => $service[0]['service_ip'], - 'desc' => $service[0]['service_desc'], - 'param' => $service[0]['service_param'], - 'ignore' => $service[0]['service_ignore'], - 'disabled' => $service[0]['service_disabled'], + 'stype' => $service[0]['service_type'], + 'ip' => $service[0]['service_ip'], + 'desc' => $service[0]['service_desc'], + 'param' => $service[0]['service_param'], + 'ignore' => $service[0]['service_ignore'], + 'disabled' => $service[0]['service_disabled'], 'template_id' => $service[0]['service_template_id'], - 'name' => $service[0]['service_name'], + 'name' => $service[0]['service_name'], ]; header('Content-Type: application/json'); diff --git a/includes/html/forms/processor-update.inc.php b/includes/html/forms/processor-update.inc.php index 6df86f8768..185ea8a845 100644 --- a/includes/html/forms/processor-update.inc.php +++ b/includes/html/forms/processor-update.inc.php @@ -16,7 +16,7 @@ header('Content-type: application/json'); if (! Auth::user()->hasGlobalAdmin()) { $response = [ - 'status' => 'error', + 'status' => 'error', 'message' => 'Need to be admin', ]; echo json_encode($response, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE); @@ -37,7 +37,7 @@ if (! is_numeric($device_id)) { } elseif (! is_numeric($data)) { $message = 'Missing value'; } else { - if (dbUpdate(['processor_perc_warn'=>$data], 'processors', '`processor_id`=? AND `device_id`=?', [$processor_id, $device_id]) >= 0) { + if (dbUpdate(['processor_perc_warn' => $data], 'processors', '`processor_id`=? AND `device_id`=?', [$processor_id, $device_id]) >= 0) { $message = 'Processor information updated'; $status = 'ok'; } else { @@ -46,8 +46,8 @@ if (! is_numeric($device_id)) { } $response = [ - 'status' => $status, - 'message' => $message, - 'extra' => $extra, + 'status' => $status, + 'message' => $message, + 'extra' => $extra, ]; echo json_encode($response, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE); diff --git a/includes/html/forms/rediscover-device.inc.php b/includes/html/forms/rediscover-device.inc.php index 55542e94c6..b41bce04f9 100644 --- a/includes/html/forms/rediscover-device.inc.php +++ b/includes/html/forms/rediscover-device.inc.php @@ -14,7 +14,7 @@ if (! Auth::user()->hasGlobalAdmin()) { $response = [ - 'status' => 'error', + 'status' => 'error', 'message' => 'Need to be admin', ]; echo json_encode($response, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE); @@ -60,7 +60,7 @@ if (isset($_POST['device_id'])) { } $output = [ - 'status' => $status, + 'status' => $status, 'message' => $message, ]; diff --git a/includes/html/forms/refresh-oxidized-node.inc.php b/includes/html/forms/refresh-oxidized-node.inc.php index ec1dc17631..c0bce64cab 100644 --- a/includes/html/forms/refresh-oxidized-node.inc.php +++ b/includes/html/forms/refresh-oxidized-node.inc.php @@ -27,7 +27,7 @@ if (Auth::user()->hasGlobalAdmin() && isset($device_hostname)) { } $output = [ - 'status' => $status, + 'status' => $status, 'message' => $message, ]; diff --git a/includes/html/forms/reload-oxidized-nodes-list.inc.php b/includes/html/forms/reload-oxidized-nodes-list.inc.php index 819a95be07..5ae711cb40 100644 --- a/includes/html/forms/reload-oxidized-nodes-list.inc.php +++ b/includes/html/forms/reload-oxidized-nodes-list.inc.php @@ -19,7 +19,7 @@ if (! Auth::user()->hasGlobalAdmin()) { $message = 'Oxidized node list was reloaded'; } $output = [ - 'status' => $status, + 'status' => $status, 'message' => $message, ]; header('Content-type: application/json'); diff --git a/includes/html/forms/reset-port-state.inc.php b/includes/html/forms/reset-port-state.inc.php index 685080fa9a..9e061ec4ee 100644 --- a/includes/html/forms/reset-port-state.inc.php +++ b/includes/html/forms/reset-port-state.inc.php @@ -28,7 +28,7 @@ use App\Models\Device; if (! Auth::user()->hasGlobalAdmin()) { $response = [ - 'status' => 'error', + 'status' => 'error', 'message' => 'Need to be admin', ]; echo json_encode($response, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE); @@ -65,7 +65,7 @@ if (isset($_POST['device_id'])) { } $output = [ - 'status' => $status, + 'status' => $status, 'message' => $message, ]; diff --git a/includes/html/forms/routing-update.inc.php b/includes/html/forms/routing-update.inc.php index 7324251374..4e45523e22 100644 --- a/includes/html/forms/routing-update.inc.php +++ b/includes/html/forms/routing-update.inc.php @@ -16,7 +16,7 @@ header('Content-type: application/json'); if (! Auth::user()->hasGlobalAdmin()) { $response = [ - 'status' => 'error', + 'status' => 'error', 'message' => 'Need to be admin', ]; echo json_encode($response, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE); @@ -35,7 +35,7 @@ if (! is_numeric($device_id)) { } elseif (! is_numeric($routing_id)) { $message = 'Missing routing id'; } else { - if (dbUpdate(['bgpPeerDescr'=>$data], 'bgpPeers', '`bgpPeer_id`=? AND `device_id`=?', [$routing_id, $device_id]) >= 0) { + if (dbUpdate(['bgpPeerDescr' => $data], 'bgpPeers', '`bgpPeer_id`=? AND `device_id`=?', [$routing_id, $device_id]) >= 0) { $message = 'Routing information updated'; $status = 'ok'; } else { @@ -44,8 +44,8 @@ if (! is_numeric($device_id)) { } $response = [ - 'status' => $status, - 'message' => $message, - 'extra' => $extra, + 'status' => $status, + 'message' => $message, + 'extra' => $extra, ]; echo json_encode($response, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE); diff --git a/includes/html/forms/schedule-maintenance.inc.php b/includes/html/forms/schedule-maintenance.inc.php index 42c38b6c38..f2cd010c63 100644 --- a/includes/html/forms/schedule-maintenance.inc.php +++ b/includes/html/forms/schedule-maintenance.inc.php @@ -180,7 +180,7 @@ if ($sub_type == 'new-maintenance') { }//end if $response = [ - 'status' => $status, + 'status' => $status, 'message' => $message, ]; } elseif ($sub_type == 'parse-maintenance') { @@ -214,7 +214,7 @@ if ($sub_type == 'new-maintenance') { $status = 'ok'; $message = 'Maintenance schedule has been removed'; $response = [ - 'status' => $status, + 'status' => $status, 'message' => $message, ]; }//end if diff --git a/includes/html/forms/sensor-alert-reset.inc.php b/includes/html/forms/sensor-alert-reset.inc.php index 079fdd04ea..b96282b0fe 100644 --- a/includes/html/forms/sensor-alert-reset.inc.php +++ b/includes/html/forms/sensor-alert-reset.inc.php @@ -17,7 +17,7 @@ header('Content-type: application/json'); if (! Auth::user()->hasGlobalAdmin()) { $response = [ - 'status' => 'error', + 'status' => 'error', 'message' => 'Need to be admin', ]; echo json_encode($response, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE); @@ -48,7 +48,7 @@ if (is_array($sensor_id)) { $message = 'Invalid sensor id'; } $response = [ - 'status' => $status, - 'message' => $message, + 'status' => $status, + 'message' => $message, ]; echo json_encode($response, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE); diff --git a/includes/html/forms/sensor-alert-update.inc.php b/includes/html/forms/sensor-alert-update.inc.php index be050fbe67..e2dcb42360 100644 --- a/includes/html/forms/sensor-alert-update.inc.php +++ b/includes/html/forms/sensor-alert-update.inc.php @@ -17,7 +17,7 @@ header('Content-type: application/json'); if (! Auth::user()->hasGlobalAdmin()) { $response = [ - 'status' => 'error', + 'status' => 'error', 'message' => 'Need to be admin', ]; echo json_encode($response, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE); @@ -57,7 +57,7 @@ if (isset($_POST['sub_type']) && ! empty($_POST['sub_type'])) { } } $response = [ - 'status' => $status, - 'message' => $message, + 'status' => $status, + 'message' => $message, ]; echo json_encode($response, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE); diff --git a/includes/html/forms/sensor-update.inc.php b/includes/html/forms/sensor-update.inc.php index e89bae453c..cdd2c36231 100644 --- a/includes/html/forms/sensor-update.inc.php +++ b/includes/html/forms/sensor-update.inc.php @@ -17,7 +17,7 @@ header('Content-type: application/json'); if (! Auth::user()->hasGlobalAdmin()) { $response = [ - 'status' => 'error', + 'status' => 'error', 'message' => 'Need to be admin', ]; echo json_encode($response, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE); @@ -47,7 +47,7 @@ if (! is_numeric($device_id)) { } $response = [ - 'status' => $status, - 'message' => $message, + 'status' => $status, + 'message' => $message, ]; echo json_encode($response, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE); diff --git a/includes/html/forms/storage-update.inc.php b/includes/html/forms/storage-update.inc.php index f01a18b410..ee8a58b62f 100644 --- a/includes/html/forms/storage-update.inc.php +++ b/includes/html/forms/storage-update.inc.php @@ -16,7 +16,7 @@ header('Content-type: application/json'); if (! Auth::user()->hasGlobalAdmin()) { $response = [ - 'status' => 'error', + 'status' => 'error', 'message' => 'Need to be admin', ]; echo json_encode($response, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE); @@ -37,7 +37,7 @@ if (! is_numeric($device_id)) { } elseif (! is_numeric($data)) { $message = 'Missing value'; } else { - if (dbUpdate(['storage_perc_warn'=>$data], 'storage', '`storage_id`=? AND `device_id`=?', [$storage_id, $device_id]) >= 0) { + if (dbUpdate(['storage_perc_warn' => $data], 'storage', '`storage_id`=? AND `device_id`=?', [$storage_id, $device_id]) >= 0) { $message = 'Storage information updated'; $status = 'ok'; } else { @@ -46,8 +46,8 @@ if (! is_numeric($device_id)) { } $response = [ - 'status' => $status, - 'message' => $message, - 'extra' => $extra, + 'status' => $status, + 'message' => $message, + 'extra' => $extra, ]; echo json_encode($response, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE); diff --git a/includes/html/forms/transport-groups.inc.php b/includes/html/forms/transport-groups.inc.php index 535c137304..2177c90b66 100644 --- a/includes/html/forms/transport-groups.inc.php +++ b/includes/html/forms/transport-groups.inc.php @@ -93,6 +93,6 @@ if (empty($name)) { } exit(json_encode([ - 'status' => $status, - 'message' => $message, + 'status' => $status, + 'message' => $message, ])); diff --git a/includes/html/forms/update-ifalias.inc.php b/includes/html/forms/update-ifalias.inc.php index 1d4f09c62e..ecccf59c3d 100644 --- a/includes/html/forms/update-ifalias.inc.php +++ b/includes/html/forms/update-ifalias.inc.php @@ -26,7 +26,7 @@ if (! empty($ifName) && is_numeric($port_id)) { $descr = 'repoll'; // Set to repoll so we avoid using ifDescr on port poll } - if (dbUpdate(['ifAlias'=>$descr], 'ports', '`port_id`=?', [$port_id]) > 0) { + if (dbUpdate(['ifAlias' => $descr], 'ports', '`port_id`=?', [$port_id]) > 0) { $device = device_by_id_cache($device_id); if ($descr === 'repoll') { del_dev_attrib($device, 'ifName:' . $ifName); @@ -42,6 +42,6 @@ if (! empty($ifName) && is_numeric($port_id)) { } $response = [ - 'status' => $status, + 'status' => $status, ]; echo json_encode($response, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE); diff --git a/includes/html/forms/update-ifspeed.inc.php b/includes/html/forms/update-ifspeed.inc.php index 223c5ad70b..156d0b3776 100644 --- a/includes/html/forms/update-ifspeed.inc.php +++ b/includes/html/forms/update-ifspeed.inc.php @@ -48,6 +48,6 @@ if ($port) { } $response = [ - 'status' => $status, + 'status' => $status, ]; echo json_encode($response, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE); diff --git a/includes/html/forms/update-port-notes.inc.php b/includes/html/forms/update-port-notes.inc.php index 3377b28acd..ee36d88716 100644 --- a/includes/html/forms/update-port-notes.inc.php +++ b/includes/html/forms/update-port-notes.inc.php @@ -26,10 +26,10 @@ if (isset($attrib_value) && set_dev_attrib(['device_id' => $device_id], $port_id $message = 'ERROR: Could not update'; } exit(json_encode([ - 'status' => $status, - 'message' => $message, - 'attrib_type' => $port_id_notes, + 'status' => $status, + 'message' => $message, + 'attrib_type' => $port_id_notes, 'attrib_value' => $attrib_value, - 'device_id' => $device_id, + 'device_id' => $device_id, ])); diff --git a/includes/html/forms/update-ports.inc.php b/includes/html/forms/update-ports.inc.php index 1f8e7b2a60..2dc8d553c4 100644 --- a/includes/html/forms/update-ports.inc.php +++ b/includes/html/forms/update-ports.inc.php @@ -4,7 +4,7 @@ header('Content-type: application/json'); if (! Auth::user()->hasGlobalAdmin()) { $response = [ - 'status' => 'error', + 'status' => 'error', 'message' => 'Need to be admin', ]; echo json_encode($response, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE); @@ -75,7 +75,7 @@ if ($rows_updated > 0) { } $response = [ - 'status' => $status, - 'message' => $message, + 'status' => $status, + 'message' => $message, ]; echo json_encode($response, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE); diff --git a/includes/html/graphs/application/apache_scoreboard.inc.php b/includes/html/graphs/application/apache_scoreboard.inc.php index 571280f813..310914e443 100644 --- a/includes/html/graphs/application/apache_scoreboard.inc.php +++ b/includes/html/graphs/application/apache_scoreboard.inc.php @@ -7,44 +7,44 @@ require 'includes/html/graphs/common.inc.php'; $rrd_filename = Rrd::name($device['hostname'], ['app', 'apache', $app->app_id]); $array = [ - 'sb_reading' => [ - 'descr' => 'Reading', + 'sb_reading' => [ + 'descr' => 'Reading', 'colour' => '750F7DFF', ], - 'sb_writing' => [ - 'descr' => 'Writing', + 'sb_writing' => [ + 'descr' => 'Writing', 'colour' => '00FF00FF', ], - 'sb_wait' => [ - 'descr' => 'Waiting', + 'sb_wait' => [ + 'descr' => 'Waiting', 'colour' => '4444FFFF', ], - 'sb_start' => [ - 'descr' => 'Starting', + 'sb_start' => [ + 'descr' => 'Starting', 'colour' => '157419FF', ], 'sb_keepalive' => [ - 'descr' => 'Keepalive', + 'descr' => 'Keepalive', 'colour' => 'FF0000FF', ], - 'sb_dns' => [ - 'descr' => 'DNS', + 'sb_dns' => [ + 'descr' => 'DNS', 'colour' => '6DC8FEFF', ], - 'sb_closing' => [ - 'descr' => 'Closing', + 'sb_closing' => [ + 'descr' => 'Closing', 'colour' => 'FFAB00FF', ], - 'sb_logging' => [ - 'descr' => 'Logging', + 'sb_logging' => [ + 'descr' => 'Logging', 'colour' => 'FFFF00FF', ], - 'sb_graceful' => [ - 'descr' => 'Graceful', + 'sb_graceful' => [ + 'descr' => 'Graceful', 'colour' => 'FF5576FF', ], - 'sb_idle' => [ - 'descr' => 'Idle', + 'sb_idle' => [ + 'descr' => 'Idle', 'colour' => 'FF4105FF', ], ]; diff --git a/includes/html/graphs/application/asterisk_iax2.inc.php b/includes/html/graphs/application/asterisk_iax2.inc.php index bd4aa83128..ead7bd0cc4 100644 --- a/includes/html/graphs/application/asterisk_iax2.inc.php +++ b/includes/html/graphs/application/asterisk_iax2.inc.php @@ -10,7 +10,7 @@ $rrd_filename = Rrd::name($device['hostname'], ['app', 'asterisk', 'iax2', $app- $astiax2_access_array = [ 'iax2peers' => 'Total Peers', 'iax2online' => 'Online', - 'iax2offline'=> 'Offline', + 'iax2offline' => 'Offline', 'iax2unmonitored' => 'Unmonitored', ]; diff --git a/includes/html/graphs/application/asterisk_sip.inc.php b/includes/html/graphs/application/asterisk_sip.inc.php index 21a5595427..20dab4fc52 100644 --- a/includes/html/graphs/application/asterisk_sip.inc.php +++ b/includes/html/graphs/application/asterisk_sip.inc.php @@ -9,10 +9,10 @@ $unit_text = 'SIP Peers'; $rrd_filename = Rrd::name($device['hostname'], ['app', 'asterisk', 'stats', $app->app_id]); $astsip_access_array = [ - 'sippeers' => 'Total Peers', - 'sipmononline' => 'Online (Monitored)', - 'sipmonoffline' => 'Offline (Monitored)', - 'sipunmononline' => 'Online (Unmonitored)', + 'sippeers' => 'Total Peers', + 'sipmononline' => 'Online (Monitored)', + 'sipmonoffline' => 'Offline (Monitored)', + 'sipunmononline' => 'Online (Unmonitored)', 'sipunmonoffline' => 'Offline (Unmonitored)', ]; diff --git a/includes/html/graphs/application/backupninja_backupninja.inc.php b/includes/html/graphs/application/backupninja_backupninja.inc.php index 35bac529a9..8bf7702d64 100644 --- a/includes/html/graphs/application/backupninja_backupninja.inc.php +++ b/includes/html/graphs/application/backupninja_backupninja.inc.php @@ -6,19 +6,19 @@ $rrd_filename = Rrd::name($device['hostname'], ['app', 'backupninja', $app->app_ $array = [ 'last_actions' => [ - 'descr' => 'last_actions', + 'descr' => 'last_actions', 'colour' => '22FF22', ], 'last_fatal' => [ - 'descr' => 'last_fatal', + 'descr' => 'last_fatal', 'colour' => '0022FF', ], - 'last_error' => [ - 'descr' => 'last_error', + 'last_error' => [ + 'descr' => 'last_error', 'colour' => 'FF0000', ], 'last_warning' => [ - 'descr' => 'last_warning', + 'descr' => 'last_warning', 'colour' => '0080C0', ], ]; diff --git a/includes/html/graphs/application/bind_adb_in.inc.php b/includes/html/graphs/application/bind_adb_in.inc.php index 3b2d112517..b55db10aca 100644 --- a/includes/html/graphs/application/bind_adb_in.inc.php +++ b/includes/html/graphs/application/bind_adb_in.inc.php @@ -14,13 +14,13 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Addresses', - 'ds' => 'aiht', + 'descr' => 'Addresses', + 'ds' => 'aiht', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Names', - 'ds' => 'niht', + 'descr' => 'Names', + 'ds' => 'niht', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/bind_adb_size.inc.php b/includes/html/graphs/application/bind_adb_size.inc.php index 2ceb53ea48..7e0853681d 100644 --- a/includes/html/graphs/application/bind_adb_size.inc.php +++ b/includes/html/graphs/application/bind_adb_size.inc.php @@ -14,13 +14,13 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Address', - 'ds' => 'ahts', + 'descr' => 'Address', + 'ds' => 'ahts', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Name', - 'ds' => 'nhts', + 'descr' => 'Name', + 'ds' => 'nhts', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/bind_cache_deleted.inc.php b/includes/html/graphs/application/bind_cache_deleted.inc.php index 83c3258994..b56747850b 100644 --- a/includes/html/graphs/application/bind_cache_deleted.inc.php +++ b/includes/html/graphs/application/bind_cache_deleted.inc.php @@ -14,13 +14,13 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Mem Exhaustion', - 'ds' => 'crddtme', + 'descr' => 'Mem Exhaustion', + 'ds' => 'crddtme', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'TTL Expiration', - 'ds' => 'crddtte', + 'descr' => 'TTL Expiration', + 'ds' => 'crddtte', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/bind_cache_heap.inc.php b/includes/html/graphs/application/bind_cache_heap.inc.php index 3aff6c5e2b..e78618fa3a 100644 --- a/includes/html/graphs/application/bind_cache_heap.inc.php +++ b/includes/html/graphs/application/bind_cache_heap.inc.php @@ -14,18 +14,18 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Total', - 'ds' => 'chmt', + 'descr' => 'Total', + 'ds' => 'chmt', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'In Use', - 'ds' => 'chmiu', + 'descr' => 'In Use', + 'ds' => 'chmiu', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Highest In Use', - 'ds' => 'chhmiu', + 'descr' => 'Highest In Use', + 'ds' => 'chhmiu', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/bind_cache_hm.inc.php b/includes/html/graphs/application/bind_cache_hm.inc.php index 04228d7773..281893bd18 100644 --- a/includes/html/graphs/application/bind_cache_hm.inc.php +++ b/includes/html/graphs/application/bind_cache_hm.inc.php @@ -14,23 +14,23 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Hits', - 'ds' => 'ch', + 'descr' => 'Hits', + 'ds' => 'ch', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Misses', - 'ds' => 'cm', + 'descr' => 'Misses', + 'ds' => 'cm', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Hits Frm Qry', - 'ds' => 'chfq', + 'descr' => 'Hits Frm Qry', + 'ds' => 'chfq', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Misses Frm Qry', - 'ds' => 'cmfq', + 'descr' => 'Misses Frm Qry', + 'ds' => 'cmfq', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/bind_cache_tree.inc.php b/includes/html/graphs/application/bind_cache_tree.inc.php index b510324afb..7380fd316e 100644 --- a/includes/html/graphs/application/bind_cache_tree.inc.php +++ b/includes/html/graphs/application/bind_cache_tree.inc.php @@ -14,18 +14,18 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Total', - 'ds' => 'ctmt', + 'descr' => 'Total', + 'ds' => 'ctmt', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'In Use', - 'ds' => 'ctmiu', + 'descr' => 'In Use', + 'ds' => 'ctmiu', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Highest In Use', - 'ds' => 'cthmiu', + 'descr' => 'Highest In Use', + 'ds' => 'cthmiu', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/bind_resolver_failure.inc.php b/includes/html/graphs/application/bind_resolver_failure.inc.php index 4cec3b131e..75cfd1028b 100644 --- a/includes/html/graphs/application/bind_resolver_failure.inc.php +++ b/includes/html/graphs/application/bind_resolver_failure.inc.php @@ -14,48 +14,48 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'NXDOMAIN', - 'ds' => 'nr', + 'descr' => 'NXDOMAIN', + 'ds' => 'nr', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'SERVFAIL', - 'ds' => 'sr', + 'descr' => 'SERVFAIL', + 'ds' => 'sr', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'FORMERR', - 'ds' => 'fr', + 'descr' => 'FORMERR', + 'ds' => 'fr', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'REFUSED', - 'ds' => 'rr', + 'descr' => 'REFUSED', + 'ds' => 'rr', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'EDNS(0) qry fl', - 'ds' => 'eqf', + 'descr' => 'EDNS(0) qry fl', + 'ds' => 'eqf', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Trnctd Rcvd', - 'ds' => 'trr', + 'descr' => 'Trnctd Rcvd', + 'ds' => 'trr', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Retry', - 'ds' => 'qr', + 'descr' => 'Retry', + 'ds' => 'qr', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Timeout', - 'ds' => 'qt', + 'descr' => 'Timeout', + 'ds' => 'qt', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Lame Dele.', - 'ds' => 'ldr', + 'descr' => 'Lame Dele.', + 'ds' => 'ldr', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/bind_resolver_naf.inc.php b/includes/html/graphs/application/bind_resolver_naf.inc.php index 978baf1bc6..a13c6e1136 100644 --- a/includes/html/graphs/application/bind_resolver_naf.inc.php +++ b/includes/html/graphs/application/bind_resolver_naf.inc.php @@ -14,23 +14,23 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'IPv4 NS Ftchd', - 'ds' => 'i4naf', + 'descr' => 'IPv4 NS Ftchd', + 'ds' => 'i4naf', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'IPv6 NS Ftchd', - 'ds' => 'i6naf', + 'descr' => 'IPv6 NS Ftchd', + 'ds' => 'i6naf', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'IPv4 Failed', - 'ds' => 'i4naff', + 'descr' => 'IPv4 Failed', + 'ds' => 'i4naff', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'IPv6 Failed', - 'ds' => 'i6naff', + 'descr' => 'IPv6 Failed', + 'ds' => 'i6naff', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/bind_resolver_qrs.inc.php b/includes/html/graphs/application/bind_resolver_qrs.inc.php index c6a6bc7ffc..62f94c29c6 100644 --- a/includes/html/graphs/application/bind_resolver_qrs.inc.php +++ b/includes/html/graphs/application/bind_resolver_qrs.inc.php @@ -14,23 +14,23 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'IPv4 Sent', - 'ds' => 'i4qs', + 'descr' => 'IPv4 Sent', + 'ds' => 'i4qs', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'IPv6 Sent', - 'ds' => 'i6qs', + 'descr' => 'IPv6 Sent', + 'ds' => 'i6qs', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'IPv4 Rcvd', - 'ds' => 'i4rr', + 'descr' => 'IPv4 Rcvd', + 'ds' => 'i4rr', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'IPv6 Rcvd', - 'ds' => 'i6rr', + 'descr' => 'IPv6 Rcvd', + 'ds' => 'i6rr', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/bind_rtt.inc.php b/includes/html/graphs/application/bind_rtt.inc.php index dc60a4610e..08893cab79 100644 --- a/includes/html/graphs/application/bind_rtt.inc.php +++ b/includes/html/graphs/application/bind_rtt.inc.php @@ -14,33 +14,33 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => '<10', - 'ds' => 'rttl10', + 'descr' => '<10', + 'ds' => 'rttl10', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => '10-100', - 'ds' => 'rtt10t100', + 'descr' => '10-100', + 'ds' => 'rtt10t100', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => '100-500', - 'ds' => 'rtt100t500', + 'descr' => '100-500', + 'ds' => 'rtt100t500', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => '500-800', - 'ds' => 'rtt500t800', + 'descr' => '500-800', + 'ds' => 'rtt500t800', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => '800-1600', - 'ds' => 'rtt800t1600', + 'descr' => '800-1600', + 'ds' => 'rtt800t1600', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => '>1600', - 'ds' => 'rttg1600', + 'descr' => '>1600', + 'ds' => 'rttg1600', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/bind_server_issues.inc.php b/includes/html/graphs/application/bind_server_issues.inc.php index 6c1c041125..f228c12787 100644 --- a/includes/html/graphs/application/bind_server_issues.inc.php +++ b/includes/html/graphs/application/bind_server_issues.inc.php @@ -14,28 +14,28 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Auth Qry Rej', - 'ds' => 'aqr', + 'descr' => 'Auth Qry Rej', + 'ds' => 'aqr', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Rec Qry Rej', - 'ds' => 'rqr', + 'descr' => 'Rec Qry Rej', + 'ds' => 'rqr', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Trnctd Rsp Snt', - 'ds' => 'trs', + 'descr' => 'Trnctd Rsp Snt', + 'ds' => 'trs', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Oth Qry Fail', - 'ds' => 'oqf', + 'descr' => 'Oth Qry Fail', + 'ds' => 'oqf', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Qry Dropped', - 'ds' => 'qd', + 'descr' => 'Qry Dropped', + 'ds' => 'qd', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/bind_server_received.inc.php b/includes/html/graphs/application/bind_server_received.inc.php index 10dcf6045f..4ec34bdda9 100644 --- a/includes/html/graphs/application/bind_server_received.inc.php +++ b/includes/html/graphs/application/bind_server_received.inc.php @@ -14,43 +14,43 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'IPv4 Req', - 'ds' => 'i4rr', + 'descr' => 'IPv4 Req', + 'ds' => 'i4rr', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'IPv6 Req', - 'ds' => 'i6rr', + 'descr' => 'IPv6 Req', + 'ds' => 'i6rr', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'TCP Req', - 'ds' => 'trr', + 'descr' => 'TCP Req', + 'ds' => 'trr', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'TCP Qry', - 'ds' => 'tqr', + 'descr' => 'TCP Qry', + 'ds' => 'tqr', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'UDP Qry', - 'ds' => 'uqr', + 'descr' => 'UDP Qry', + 'ds' => 'uqr', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'With EDNS(0)', - 'ds' => 'rwer', + 'descr' => 'With EDNS(0)', + 'ds' => 'rwer', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Other EDNS', - 'ds' => 'oeor', + 'descr' => 'Other EDNS', + 'ds' => 'oeor', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Dup. Qry', - 'ds' => 'dqr', + 'descr' => 'Dup. Qry', + 'ds' => 'dqr', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/bind_server_results.inc.php b/includes/html/graphs/application/bind_server_results.inc.php index 1a0e28493b..e3247036d2 100644 --- a/includes/html/graphs/application/bind_server_results.inc.php +++ b/includes/html/graphs/application/bind_server_results.inc.php @@ -14,43 +14,43 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Successful', - 'ds' => 'qrisa', + 'descr' => 'Successful', + 'ds' => 'qrisa', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Authoritative', - 'ds' => 'qriaa', + 'descr' => 'Authoritative', + 'ds' => 'qriaa', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Non Authoritative', - 'ds' => 'qrinaa', + 'descr' => 'Non Authoritative', + 'ds' => 'qrinaa', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'NX RR Set', - 'ds' => 'qrin', + 'descr' => 'NX RR Set', + 'ds' => 'qrin', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'SERVFAIL', - 'ds' => 'qris', + 'descr' => 'SERVFAIL', + 'ds' => 'qris', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'NXDOMAIN', - 'ds' => 'qrind', + 'descr' => 'NXDOMAIN', + 'ds' => 'qrind', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'With EDNS(0)', - 'ds' => 'rwes', + 'descr' => 'With EDNS(0)', + 'ds' => 'rwes', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Caused Rec', - 'ds' => 'qcr', + 'descr' => 'Caused Rec', + 'ds' => 'qcr', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/bind_sockets_accepted.inc.php b/includes/html/graphs/application/bind_sockets_accepted.inc.php index 493572a2b7..3b7e3f3e30 100644 --- a/includes/html/graphs/application/bind_sockets_accepted.inc.php +++ b/includes/html/graphs/application/bind_sockets_accepted.inc.php @@ -14,13 +14,13 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'TCP/IPv4', - 'ds' => 'ti4ca', + 'descr' => 'TCP/IPv4', + 'ds' => 'ti4ca', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'TCP/IPv6', - 'ds' => 'ti6ca', + 'descr' => 'TCP/IPv6', + 'ds' => 'ti6ca', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/bind_sockets_active.inc.php b/includes/html/graphs/application/bind_sockets_active.inc.php index 16c35db767..95fc8d4a0b 100644 --- a/includes/html/graphs/application/bind_sockets_active.inc.php +++ b/includes/html/graphs/application/bind_sockets_active.inc.php @@ -14,13 +14,13 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'UDP/IPv4', - 'ds' => 'ui4sa', + 'descr' => 'UDP/IPv4', + 'ds' => 'ui4sa', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'UDP/IPv6', - 'ds' => 'ui6sa', + 'descr' => 'UDP/IPv6', + 'ds' => 'ui6sa', ]; // This appears to be buggy on various versions of BIND named and acts as a counter instead. // $rrd_list[]=array( @@ -30,13 +30,13 @@ if (Rrd::checkRrdExists($rrd_filename)) { // ); $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'TCP/IPv6', - 'ds' => 'ti6sa', + 'descr' => 'TCP/IPv6', + 'ds' => 'ti6sa', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Raw', - 'ds' => 'rsa', + 'descr' => 'Raw', + 'ds' => 'rsa', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/bind_sockets_bf.inc.php b/includes/html/graphs/application/bind_sockets_bf.inc.php index fa22f67da5..3df3433dcd 100644 --- a/includes/html/graphs/application/bind_sockets_bf.inc.php +++ b/includes/html/graphs/application/bind_sockets_bf.inc.php @@ -14,23 +14,23 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'UDP/IPv4', - 'ds' => 'ui4sbf', + 'descr' => 'UDP/IPv4', + 'ds' => 'ui4sbf', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'UDP/IPv6', - 'ds' => 'ui6sbf', + 'descr' => 'UDP/IPv6', + 'ds' => 'ui6sbf', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'TCP/IPv4', - 'ds' => 'ti4sbf', + 'descr' => 'TCP/IPv4', + 'ds' => 'ti4sbf', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'TCP/IPv6', - 'ds' => 'ti6sbf', + 'descr' => 'TCP/IPv6', + 'ds' => 'ti6sbf', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/bind_sockets_cf.inc.php b/includes/html/graphs/application/bind_sockets_cf.inc.php index f73c573f4a..0ee682dae1 100644 --- a/includes/html/graphs/application/bind_sockets_cf.inc.php +++ b/includes/html/graphs/application/bind_sockets_cf.inc.php @@ -14,23 +14,23 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'UDP/IPv4', - 'ds' => 'ui4scf', + 'descr' => 'UDP/IPv4', + 'ds' => 'ui4scf', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'UDP/IPv6', - 'ds' => 'ui6scf', + 'descr' => 'UDP/IPv6', + 'ds' => 'ui6scf', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'TCP/IPv4', - 'ds' => 'ti4scf', + 'descr' => 'TCP/IPv4', + 'ds' => 'ti4scf', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'TCP/IPv6', - 'ds' => 'ti6scf', + 'descr' => 'TCP/IPv6', + 'ds' => 'ti6scf', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/bind_sockets_closed.inc.php b/includes/html/graphs/application/bind_sockets_closed.inc.php index 05b5cbd038..29024d5278 100644 --- a/includes/html/graphs/application/bind_sockets_closed.inc.php +++ b/includes/html/graphs/application/bind_sockets_closed.inc.php @@ -14,23 +14,23 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'UDP/IPv4', - 'ds' => 'ui4sc', + 'descr' => 'UDP/IPv4', + 'ds' => 'ui4sc', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'UDP/IPv6', - 'ds' => 'ui6sc', + 'descr' => 'UDP/IPv6', + 'ds' => 'ui6sc', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'TCP/IPv4', - 'ds' => 'ti4sc', + 'descr' => 'TCP/IPv4', + 'ds' => 'ti4sc', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'TCP/IPv6', - 'ds' => 'ti6sc', + 'descr' => 'TCP/IPv6', + 'ds' => 'ti6sc', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/bind_sockets_errors.inc.php b/includes/html/graphs/application/bind_sockets_errors.inc.php index 08161de9f6..dd2f4a6014 100644 --- a/includes/html/graphs/application/bind_sockets_errors.inc.php +++ b/includes/html/graphs/application/bind_sockets_errors.inc.php @@ -14,43 +14,43 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'UDP/IPv4 send', - 'ds' => 'ui4se', + 'descr' => 'UDP/IPv4 send', + 'ds' => 'ui4se', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'UDP/IPv6 send', - 'ds' => 'ui6se', + 'descr' => 'UDP/IPv6 send', + 'ds' => 'ui6se', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'TCP/IPv4 send', - 'ds' => 'ti4se', + 'descr' => 'TCP/IPv4 send', + 'ds' => 'ti4se', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'TCP/IPv6 send', - 'ds' => 'ti6se', + 'descr' => 'TCP/IPv6 send', + 'ds' => 'ti6se', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'UDP/IPv4 recv', - 'ds' => 'ui4re', + 'descr' => 'UDP/IPv4 recv', + 'ds' => 'ui4re', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'UDP/IPv6 recv', - 'ds' => 'ui6re', + 'descr' => 'UDP/IPv6 recv', + 'ds' => 'ui6re', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'TCP/IPv4 recv', - 'ds' => 'ti4re', + 'descr' => 'TCP/IPv4 recv', + 'ds' => 'ti4re', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'TCP/IPv6 recv', - 'ds' => 'ti6re', + 'descr' => 'TCP/IPv6 recv', + 'ds' => 'ti6re', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/bind_sockets_established.inc.php b/includes/html/graphs/application/bind_sockets_established.inc.php index cfa1148ad8..a6c170b210 100644 --- a/includes/html/graphs/application/bind_sockets_established.inc.php +++ b/includes/html/graphs/application/bind_sockets_established.inc.php @@ -14,23 +14,23 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'UDP/IPv4', - 'ds' => 'ui4ce', + 'descr' => 'UDP/IPv4', + 'ds' => 'ui4ce', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'UDP/IPv6', - 'ds' => 'ui6ce', + 'descr' => 'UDP/IPv6', + 'ds' => 'ui6ce', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'TCP/IPv4', - 'ds' => 'ti4ce', + 'descr' => 'TCP/IPv4', + 'ds' => 'ti4ce', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'TCP/IPv6', - 'ds' => 'ti6ce', + 'descr' => 'TCP/IPv6', + 'ds' => 'ti6ce', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/bind_sockets_opened.inc.php b/includes/html/graphs/application/bind_sockets_opened.inc.php index 92ccb3ee60..05b21d4957 100644 --- a/includes/html/graphs/application/bind_sockets_opened.inc.php +++ b/includes/html/graphs/application/bind_sockets_opened.inc.php @@ -14,28 +14,28 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'UDP/IPv4', - 'ds' => 'ui4so', + 'descr' => 'UDP/IPv4', + 'ds' => 'ui4so', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'UDP/IPv6', - 'ds' => 'ui6so', + 'descr' => 'UDP/IPv6', + 'ds' => 'ui6so', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'TCP/IPv4', - 'ds' => 'ti4so', + 'descr' => 'TCP/IPv4', + 'ds' => 'ti4so', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'TCP/IPv6', - 'ds' => 'ti6so', + 'descr' => 'TCP/IPv6', + 'ds' => 'ti6so', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Raw', - 'ds' => 'rso', + 'descr' => 'Raw', + 'ds' => 'rso', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/cape_anti_issues.inc.php b/includes/html/graphs/application/cape_anti_issues.inc.php index 501ec40f65..861f53092b 100644 --- a/includes/html/graphs/application/cape_anti_issues.inc.php +++ b/includes/html/graphs/application/cape_anti_issues.inc.php @@ -28,39 +28,39 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Min', - 'ds' => 's0anti_issues', + 'descr' => 'Min', + 'ds' => 's0anti_issues', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Max', - 'ds' => 's1anti_issues', + 'descr' => 'Max', + 'ds' => 's1anti_issues', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Mean', - 'ds' => 's3anti_issues', + 'descr' => 'Mean', + 'ds' => 's3anti_issues', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Median', - 'ds' => 's4anti_issues', + 'descr' => 'Median', + 'ds' => 's4anti_issues', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Mode', - 'ds' => 's5anti_issues', + 'descr' => 'Mode', + 'ds' => 's5anti_issues', ]; if ($vars['stddev'] == 'on') { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'StdDev', - 'ds' => 's7anti_issues', + 'descr' => 'StdDev', + 'ds' => 's7anti_issues', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'StdDevP', - 'ds' => 's9anti_issues', + 'descr' => 'StdDevP', + 'ds' => 's9anti_issues', ]; } } else { diff --git a/includes/html/graphs/application/cape_anti_issues_pkg.inc.php b/includes/html/graphs/application/cape_anti_issues_pkg.inc.php index ee5f818cb6..e72a1e0c45 100644 --- a/includes/html/graphs/application/cape_anti_issues_pkg.inc.php +++ b/includes/html/graphs/application/cape_anti_issues_pkg.inc.php @@ -19,8 +19,8 @@ foreach ($packages as $index => $package) { $rrd_filename = Rrd::name($device['hostname'], ['app', $name, $app['app_id'], $package]); $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => $label, - 'ds' => 'anti_issues', + 'descr' => $label, + 'ds' => 'anti_issues', ]; $packages_int++; diff --git a/includes/html/graphs/application/cape_api_calls.inc.php b/includes/html/graphs/application/cape_api_calls.inc.php index 9c706b47ca..03c9db876b 100644 --- a/includes/html/graphs/application/cape_api_calls.inc.php +++ b/includes/html/graphs/application/cape_api_calls.inc.php @@ -28,39 +28,39 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Min', - 'ds' => 's0api_calls', + 'descr' => 'Min', + 'ds' => 's0api_calls', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Max', - 'ds' => 's1api_calls', + 'descr' => 'Max', + 'ds' => 's1api_calls', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Mean', - 'ds' => 's3api_calls', + 'descr' => 'Mean', + 'ds' => 's3api_calls', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Median', - 'ds' => 's4api_calls', + 'descr' => 'Median', + 'ds' => 's4api_calls', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Mode', - 'ds' => 's5api_calls', + 'descr' => 'Mode', + 'ds' => 's5api_calls', ]; if ($vars['stddev'] == 'on') { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'StdDev', - 'ds' => 's7api_calls', + 'descr' => 'StdDev', + 'ds' => 's7api_calls', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'StdDevP', - 'ds' => 's9api_calls', + 'descr' => 'StdDevP', + 'ds' => 's9api_calls', ]; } } else { diff --git a/includes/html/graphs/application/cape_api_calls_pkg.inc.php b/includes/html/graphs/application/cape_api_calls_pkg.inc.php index 6acbc53148..98d58dd827 100644 --- a/includes/html/graphs/application/cape_api_calls_pkg.inc.php +++ b/includes/html/graphs/application/cape_api_calls_pkg.inc.php @@ -19,8 +19,8 @@ foreach ($packages as $index => $package) { $rrd_filename = Rrd::name($device['hostname'], ['app', $name, $app['app_id'], $package]); $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => $label, - 'ds' => 'api_calls', + 'descr' => $label, + 'ds' => 'api_calls', ]; $packages_int++; diff --git a/includes/html/graphs/application/cape_crash_issues.inc.php b/includes/html/graphs/application/cape_crash_issues.inc.php index f677149767..4ca98de98c 100644 --- a/includes/html/graphs/application/cape_crash_issues.inc.php +++ b/includes/html/graphs/application/cape_crash_issues.inc.php @@ -28,39 +28,39 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Min', - 'ds' => 's0crash_issues', + 'descr' => 'Min', + 'ds' => 's0crash_issues', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Max', - 'ds' => 's1crash_issues', + 'descr' => 'Max', + 'ds' => 's1crash_issues', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Mean', - 'ds' => 's3crash_issues', + 'descr' => 'Mean', + 'ds' => 's3crash_issues', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Median', - 'ds' => 's4crash_issues', + 'descr' => 'Median', + 'ds' => 's4crash_issues', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Mode', - 'ds' => 's5crash_issues', + 'descr' => 'Mode', + 'ds' => 's5crash_issues', ]; if ($vars['stddev'] == 'on') { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'StdDev', - 'ds' => 's7crash_issues', + 'descr' => 'StdDev', + 'ds' => 's7crash_issues', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'StdDevP', - 'ds' => 's9crash_issues', + 'descr' => 'StdDevP', + 'ds' => 's9crash_issues', ]; } } else { diff --git a/includes/html/graphs/application/cape_crash_issues_pkg.inc.php b/includes/html/graphs/application/cape_crash_issues_pkg.inc.php index 5d56edf430..fe667b126e 100644 --- a/includes/html/graphs/application/cape_crash_issues_pkg.inc.php +++ b/includes/html/graphs/application/cape_crash_issues_pkg.inc.php @@ -19,8 +19,8 @@ foreach ($packages as $index => $package) { $rrd_filename = Rrd::name($device['hostname'], ['app', $name, $app['app_id'], $package]); $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => $label, - 'ds' => 'crash_issues', + 'descr' => $label, + 'ds' => 'crash_issues', ]; $packages_int++; diff --git a/includes/html/graphs/application/cape_domains.inc.php b/includes/html/graphs/application/cape_domains.inc.php index a36ffdf294..82d2272d54 100644 --- a/includes/html/graphs/application/cape_domains.inc.php +++ b/includes/html/graphs/application/cape_domains.inc.php @@ -28,39 +28,39 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Min', - 'ds' => 's0domains', + 'descr' => 'Min', + 'ds' => 's0domains', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Max', - 'ds' => 's1domains', + 'descr' => 'Max', + 'ds' => 's1domains', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Mean', - 'ds' => 's3domains', + 'descr' => 'Mean', + 'ds' => 's3domains', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Median', - 'ds' => 's4domains', + 'descr' => 'Median', + 'ds' => 's4domains', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Mode', - 'ds' => 's5domains', + 'descr' => 'Mode', + 'ds' => 's5domains', ]; if ($vars['stddev'] == 'on') { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'StdDev', - 'ds' => 's7domains', + 'descr' => 'StdDev', + 'ds' => 's7domains', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'StdDevP', - 'ds' => 's9domains', + 'descr' => 'StdDevP', + 'ds' => 's9domains', ]; } } else { diff --git a/includes/html/graphs/application/cape_domains_pkg.inc.php b/includes/html/graphs/application/cape_domains_pkg.inc.php index b545f4dbfa..9b5f8b1ac5 100644 --- a/includes/html/graphs/application/cape_domains_pkg.inc.php +++ b/includes/html/graphs/application/cape_domains_pkg.inc.php @@ -19,8 +19,8 @@ foreach ($packages as $index => $package) { $rrd_filename = Rrd::name($device['hostname'], ['app', $name, $app['app_id'], $package]); $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => $label, - 'ds' => 'domains', + 'descr' => $label, + 'ds' => 'domains', ]; $packages_int++; diff --git a/includes/html/graphs/application/cape_dropped_files.inc.php b/includes/html/graphs/application/cape_dropped_files.inc.php index 7d944e4d97..208320e35e 100644 --- a/includes/html/graphs/application/cape_dropped_files.inc.php +++ b/includes/html/graphs/application/cape_dropped_files.inc.php @@ -28,39 +28,39 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Min', - 'ds' => 's0dropped_files', + 'descr' => 'Min', + 'ds' => 's0dropped_files', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Max', - 'ds' => 's1dropped_files', + 'descr' => 'Max', + 'ds' => 's1dropped_files', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Mean', - 'ds' => 's3dropped_files', + 'descr' => 'Mean', + 'ds' => 's3dropped_files', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Median', - 'ds' => 's4dropped_files', + 'descr' => 'Median', + 'ds' => 's4dropped_files', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Mode', - 'ds' => 's5dropped_files', + 'descr' => 'Mode', + 'ds' => 's5dropped_files', ]; if ($vars['stddev'] == 'on') { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'StdDev', - 'ds' => 's7dropped_files', + 'descr' => 'StdDev', + 'ds' => 's7dropped_files', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'StdDevP', - 'ds' => 's9dropped_files', + 'descr' => 'StdDevP', + 'ds' => 's9dropped_files', ]; } } else { diff --git a/includes/html/graphs/application/cape_dropped_files_pkg.inc.php b/includes/html/graphs/application/cape_dropped_files_pkg.inc.php index 656ea904ed..522741d7a9 100644 --- a/includes/html/graphs/application/cape_dropped_files_pkg.inc.php +++ b/includes/html/graphs/application/cape_dropped_files_pkg.inc.php @@ -19,8 +19,8 @@ foreach ($packages as $index => $package) { $rrd_filename = Rrd::name($device['hostname'], ['app', $name, $app['app_id'], $package]); $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => $label, - 'ds' => 'dropped_files', + 'descr' => $label, + 'ds' => 'dropped_files', ]; $packages_int++; diff --git a/includes/html/graphs/application/cape_files_written.inc.php b/includes/html/graphs/application/cape_files_written.inc.php index 8493c199b2..1869cca9a8 100644 --- a/includes/html/graphs/application/cape_files_written.inc.php +++ b/includes/html/graphs/application/cape_files_written.inc.php @@ -28,39 +28,39 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Min', - 'ds' => 's0files_written', + 'descr' => 'Min', + 'ds' => 's0files_written', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Max', - 'ds' => 's1files_written', + 'descr' => 'Max', + 'ds' => 's1files_written', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Mean', - 'ds' => 's3files_written', + 'descr' => 'Mean', + 'ds' => 's3files_written', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Median', - 'ds' => 's4files_written', + 'descr' => 'Median', + 'ds' => 's4files_written', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Mode', - 'ds' => 's5files_written', + 'descr' => 'Mode', + 'ds' => 's5files_written', ]; if ($vars['stdset'] == 'on') { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'StdDev', - 'ds' => 's7files_written', + 'descr' => 'StdDev', + 'ds' => 's7files_written', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'StdDevP', - 'ds' => 's9files_written', + 'descr' => 'StdDevP', + 'ds' => 's9files_written', ]; } } else { diff --git a/includes/html/graphs/application/cape_files_written_pkg.inc.php b/includes/html/graphs/application/cape_files_written_pkg.inc.php index c8388270ae..1dbc620a08 100644 --- a/includes/html/graphs/application/cape_files_written_pkg.inc.php +++ b/includes/html/graphs/application/cape_files_written_pkg.inc.php @@ -19,8 +19,8 @@ foreach ($packages as $index => $package) { $rrd_filename = Rrd::name($device['hostname'], ['app', $name, $app['app_id'], $package]); $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => $label, - 'ds' => 'files_written', + 'descr' => $label, + 'ds' => 'files_written', ]; $packages_int++; diff --git a/includes/html/graphs/application/cape_lines.inc.php b/includes/html/graphs/application/cape_lines.inc.php index ac82b5cfe5..900fc8d2be 100644 --- a/includes/html/graphs/application/cape_lines.inc.php +++ b/includes/html/graphs/application/cape_lines.inc.php @@ -16,28 +16,28 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'debug', - 'ds' => 'debug', + 'descr' => 'debug', + 'ds' => 'debug', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'info', - 'ds' => 'info', + 'descr' => 'info', + 'ds' => 'info', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'warning', - 'ds' => 'warning', + 'descr' => 'warning', + 'ds' => 'warning', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'error', - 'ds' => 'error', + 'descr' => 'error', + 'ds' => 'error', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'critical', - 'ds' => 'critical', + 'descr' => 'critical', + 'ds' => 'critical', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/cape_malscore.inc.php b/includes/html/graphs/application/cape_malscore.inc.php index bfd5448ac3..47ed42c16c 100644 --- a/includes/html/graphs/application/cape_malscore.inc.php +++ b/includes/html/graphs/application/cape_malscore.inc.php @@ -28,39 +28,39 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Min', - 'ds' => 's0malscore', + 'descr' => 'Min', + 'ds' => 's0malscore', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Max', - 'ds' => 's1malscore', + 'descr' => 'Max', + 'ds' => 's1malscore', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Mean', - 'ds' => 's3malscore', + 'descr' => 'Mean', + 'ds' => 's3malscore', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Median', - 'ds' => 's4malscore', + 'descr' => 'Median', + 'ds' => 's4malscore', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Mode', - 'ds' => 's5malscore', + 'descr' => 'Mode', + 'ds' => 's5malscore', ]; if ($vars['stddev'] == 'on') { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'StdDev', - 'ds' => 's7malscore', + 'descr' => 'StdDev', + 'ds' => 's7malscore', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'StdDevP', - 'ds' => 's9malscore', + 'descr' => 'StdDevP', + 'ds' => 's9malscore', ]; } } else { diff --git a/includes/html/graphs/application/cape_pkg_stats.inc.php b/includes/html/graphs/application/cape_pkg_stats.inc.php index 9996962883..a29db4316a 100644 --- a/includes/html/graphs/application/cape_pkg_stats.inc.php +++ b/includes/html/graphs/application/cape_pkg_stats.inc.php @@ -25,71 +25,71 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename_dropped_files)) { $rrd_list[] = [ 'filename' => $rrd_filename_dropped_files, - 'descr' => 'dropped_files', - 'ds' => 'dropped_files', + 'descr' => 'dropped_files', + 'ds' => 'dropped_files', ]; } if (Rrd::checkRrdExists($rrd_filename_running_processes)) { $rrd_list[] = [ 'filename' => $rrd_filename_running_processes, - 'descr' => 'running_processes', - 'ds' => 'running_processes', + 'descr' => 'running_processes', + 'ds' => 'running_processes', ]; } if (Rrd::checkRrdExists($rrd_filename_api_calls)) { $rrd_list[] = [ 'filename' => $rrd_filename_api_calls, - 'descr' => 'api_calls', - 'ds' => 'api_calls', + 'descr' => 'api_calls', + 'ds' => 'api_calls', ]; } if (Rrd::checkRrdExists($rrd_filename_domains)) { $rrd_list[] = [ 'filename' => $rrd_filename_domains, - 'descr' => 'domains', - 'ds' => 'domains', + 'descr' => 'domains', + 'ds' => 'domains', ]; } if (Rrd::checkRrdExists($rrd_filename_signatures_total)) { $rrd_list[] = [ 'filename' => $rrd_filename_signatures_total, - 'descr' => 'signatures_total', - 'ds' => 'signatures_total', + 'descr' => 'signatures_total', + 'ds' => 'signatures_total', ]; } if (Rrd::checkRrdExists($rrd_filename_signatures_alert)) { $rrd_list[] = [ 'filename' => $rrd_filename_signatures_alert, - 'descr' => 'signatures_alert', - 'ds' => 'signatures_alert', + 'descr' => 'signatures_alert', + 'ds' => 'signatures_alert', ]; } if (Rrd::checkRrdExists($rrd_filename_files_written)) { $rrd_list[] = [ 'filename' => $rrd_filename_files_written, - 'descr' => 'files_written', - 'ds' => 'files_written', + 'descr' => 'files_written', + 'ds' => 'files_written', ]; } if (Rrd::checkRrdExists($rrd_filename_reg_keys_mod)) { $rrd_list[] = [ 'filename' => $rrd_filename_reg_keys_mod, - 'descr' => 'reg_keys_mod', - 'ds' => 'reg_keys_mod', + 'descr' => 'reg_keys_mod', + 'ds' => 'reg_keys_mod', ]; } if (Rrd::checkRrdExists($rrd_filename_crash_issues)) { $rrd_list[] = [ 'filename' => $rrd_filename_crash_issues, - 'descr' => 'crash_issues', - 'ds' => 'crash_issues', + 'descr' => 'crash_issues', + 'ds' => 'crash_issues', ]; } if (Rrd::checkRrdExists($rrd_filename_anti_issues)) { $rrd_list[] = [ 'filename' => $rrd_filename_anti_issues, - 'descr' => 'anti_issues', - 'ds' => 'anti_issues', + 'descr' => 'anti_issues', + 'ds' => 'anti_issues', ]; } diff --git a/includes/html/graphs/application/cape_pkg_tasks_all.inc.php b/includes/html/graphs/application/cape_pkg_tasks_all.inc.php index ded64050b1..ce53a03ea8 100644 --- a/includes/html/graphs/application/cape_pkg_tasks_all.inc.php +++ b/includes/html/graphs/application/cape_pkg_tasks_all.inc.php @@ -19,8 +19,8 @@ foreach ($packages as $index => $package) { $rrd_filename = Rrd::name($device['hostname'], ['app', $name, $app['app_id'], $package]); $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => $label, - 'ds' => 'tasks', + 'descr' => $label, + 'ds' => 'tasks', ]; $packages_int++; diff --git a/includes/html/graphs/application/cape_registry_keys_modified.inc.php b/includes/html/graphs/application/cape_registry_keys_modified.inc.php index aa7aae7def..bb2a1aa446 100644 --- a/includes/html/graphs/application/cape_registry_keys_modified.inc.php +++ b/includes/html/graphs/application/cape_registry_keys_modified.inc.php @@ -28,39 +28,39 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Min', - 'ds' => 's0regkeysmod', + 'descr' => 'Min', + 'ds' => 's0regkeysmod', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Max', - 'ds' => 's1regkeysmod', + 'descr' => 'Max', + 'ds' => 's1regkeysmod', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Mean', - 'ds' => 's3regkeysmod', + 'descr' => 'Mean', + 'ds' => 's3regkeysmod', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Median', - 'ds' => 's4regkeysmod', + 'descr' => 'Median', + 'ds' => 's4regkeysmod', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Mode', - 'ds' => 's5regkeysmod', + 'descr' => 'Mode', + 'ds' => 's5regkeysmod', ]; if ($vars['stddev'] == 'on') { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'StdDev', - 'ds' => 's7regkeysmod', + 'descr' => 'StdDev', + 'ds' => 's7regkeysmod', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'StdDevP', - 'ds' => 's9regkeysmod', + 'descr' => 'StdDevP', + 'ds' => 's9regkeysmod', ]; } } else { diff --git a/includes/html/graphs/application/cape_registry_keys_modified_pkg.inc.php b/includes/html/graphs/application/cape_registry_keys_modified_pkg.inc.php index ee920a1852..1bed3b0d95 100644 --- a/includes/html/graphs/application/cape_registry_keys_modified_pkg.inc.php +++ b/includes/html/graphs/application/cape_registry_keys_modified_pkg.inc.php @@ -19,8 +19,8 @@ foreach ($packages as $index => $package) { $rrd_filename = Rrd::name($device['hostname'], ['app', $name, $app['app_id'], $package]); $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => $label, - 'ds' => 'reg_keys_mod', + 'descr' => $label, + 'ds' => 'reg_keys_mod', ]; $packages_int++; diff --git a/includes/html/graphs/application/cape_run_stats.inc.php b/includes/html/graphs/application/cape_run_stats.inc.php index ca5dad04d0..4809b4f13e 100644 --- a/includes/html/graphs/application/cape_run_stats.inc.php +++ b/includes/html/graphs/application/cape_run_stats.inc.php @@ -38,71 +38,71 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename_anti_issues)) { $rrd_list[] = [ 'filename' => $rrd_filename_anti_issues, - 'descr' => 'anti_issues', - 'ds' => 'anti_issues', + 'descr' => 'anti_issues', + 'ds' => 'anti_issues', ]; } if (Rrd::checkRrdExists($rrd_filename_api_calls)) { $rrd_list[] = [ 'filename' => $rrd_filename_api_calls, - 'descr' => 'api_calls', - 'ds' => 'api_calls', + 'descr' => 'api_calls', + 'ds' => 'api_calls', ]; } if (Rrd::checkRrdExists($rrd_filename_domains)) { $rrd_list[] = [ 'filename' => $rrd_filename_domains, - 'descr' => 'domains', - 'ds' => 'domains', + 'descr' => 'domains', + 'ds' => 'domains', ]; } if (Rrd::checkRrdExists($rrd_filename_crash_issues)) { $rrd_list[] = [ 'filename' => $rrd_filename_crash_issues, - 'descr' => 'crash_issues', - 'ds' => 'crash_issues', + 'descr' => 'crash_issues', + 'ds' => 'crash_issues', ]; } if (Rrd::checkRrdExists($rrd_filename_dropped_files)) { $rrd_list[] = [ 'filename' => $rrd_filename_dropped_files, - 'descr' => 'dropped_files', - 'ds' => 'dropped_files', + 'descr' => 'dropped_files', + 'ds' => 'dropped_files', ]; } if (Rrd::checkRrdExists($rrd_filename_files_written)) { $rrd_list[] = [ 'filename' => $rrd_filename_files_written, - 'descr' => 'files_written', - 'ds' => 'files_written', + 'descr' => 'files_written', + 'ds' => 'files_written', ]; } if (Rrd::checkRrdExists($rrd_filename_reg_keys_mod)) { $rrd_list[] = [ 'filename' => $rrd_filename_reg_keys_mod, - 'descr' => 'reg_keys_mod', - 'ds' => 'reg_keys_mod', + 'descr' => 'reg_keys_mod', + 'ds' => 'reg_keys_mod', ]; } if (Rrd::checkRrdExists($rrd_filename_running_processes)) { $rrd_list[] = [ 'filename' => $rrd_filename_running_processes, - 'descr' => 'running_processes', - 'ds' => 'running_processes', + 'descr' => 'running_processes', + 'ds' => 'running_processes', ]; } if (Rrd::checkRrdExists($rrd_filename_signatures_alert)) { $rrd_list[] = [ 'filename' => $rrd_filename_signatures_alert, - 'descr' => 'signatures_alert', - 'ds' => 'signatures_alert', + 'descr' => 'signatures_alert', + 'ds' => 'signatures_alert', ]; } if (Rrd::checkRrdExists($rrd_filename_signatures_total)) { $rrd_list[] = [ 'filename' => $rrd_filename_signatures_total, - 'descr' => 'signatures_total', - 'ds' => 'signatures_total', + 'descr' => 'signatures_total', + 'ds' => 'signatures_total', ]; } diff --git a/includes/html/graphs/application/cape_running_processes.inc.php b/includes/html/graphs/application/cape_running_processes.inc.php index a52da7ff81..70f36c9527 100644 --- a/includes/html/graphs/application/cape_running_processes.inc.php +++ b/includes/html/graphs/application/cape_running_processes.inc.php @@ -20,38 +20,38 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Min', - 'ds' => 's0running_processes', + 'descr' => 'Min', + 'ds' => 's0running_processes', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Max', - 'ds' => 's1running_processes', + 'descr' => 'Max', + 'ds' => 's1running_processes', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Mean', - 'ds' => 's3running_processes', + 'descr' => 'Mean', + 'ds' => 's3running_processes', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Median', - 'ds' => 's4running_processes', + 'descr' => 'Median', + 'ds' => 's4running_processes', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Mode', - 'ds' => 's5running_processes', + 'descr' => 'Mode', + 'ds' => 's5running_processes', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'StdDev', - 'ds' => 's7running_processes', + 'descr' => 'StdDev', + 'ds' => 's7running_processes', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'StdDevP', - 'ds' => 's9running_processes', + 'descr' => 'StdDevP', + 'ds' => 's9running_processes', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/cape_running_processes_pkg.inc.php b/includes/html/graphs/application/cape_running_processes_pkg.inc.php index 367460d0de..8edff4baed 100644 --- a/includes/html/graphs/application/cape_running_processes_pkg.inc.php +++ b/includes/html/graphs/application/cape_running_processes_pkg.inc.php @@ -19,8 +19,8 @@ foreach ($packages as $index => $package) { $rrd_filename = Rrd::name($device['hostname'], ['app', $name, $app['app_id'], $package]); $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => $label, - 'ds' => 'running_processes', + 'descr' => $label, + 'ds' => 'running_processes', ]; $packages_int++; diff --git a/includes/html/graphs/application/cape_signatures_alert.inc.php b/includes/html/graphs/application/cape_signatures_alert.inc.php index 771f40cc94..e9be15e8c3 100644 --- a/includes/html/graphs/application/cape_signatures_alert.inc.php +++ b/includes/html/graphs/application/cape_signatures_alert.inc.php @@ -28,39 +28,39 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Min', - 'ds' => 's0signatures_alert', + 'descr' => 'Min', + 'ds' => 's0signatures_alert', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Max', - 'ds' => 's1signatures_alert', + 'descr' => 'Max', + 'ds' => 's1signatures_alert', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Mean', - 'ds' => 's3signatures_alert', + 'descr' => 'Mean', + 'ds' => 's3signatures_alert', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Median', - 'ds' => 's4signatures_alert', + 'descr' => 'Median', + 'ds' => 's4signatures_alert', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Mode', - 'ds' => 's5signatures_alert', + 'descr' => 'Mode', + 'ds' => 's5signatures_alert', ]; if ($vars['stddev'] == 'on') { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'StdDev', - 'ds' => 's7signatures_alert', + 'descr' => 'StdDev', + 'ds' => 's7signatures_alert', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'StdDevP', - 'ds' => 's9signatures_alert', + 'descr' => 'StdDevP', + 'ds' => 's9signatures_alert', ]; } } else { diff --git a/includes/html/graphs/application/cape_signatures_alert_pkg.inc.php b/includes/html/graphs/application/cape_signatures_alert_pkg.inc.php index befef1f2a8..fa82d96c3b 100644 --- a/includes/html/graphs/application/cape_signatures_alert_pkg.inc.php +++ b/includes/html/graphs/application/cape_signatures_alert_pkg.inc.php @@ -19,8 +19,8 @@ foreach ($packages as $index => $package) { $rrd_filename = Rrd::name($device['hostname'], ['app', $name, $app['app_id'], $package]); $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => $label, - 'ds' => 'signatures_alert', + 'descr' => $label, + 'ds' => 'signatures_alert', ]; $packages_int++; diff --git a/includes/html/graphs/application/cape_signatures_total.inc.php b/includes/html/graphs/application/cape_signatures_total.inc.php index b4f0f06ce8..21639a9f01 100644 --- a/includes/html/graphs/application/cape_signatures_total.inc.php +++ b/includes/html/graphs/application/cape_signatures_total.inc.php @@ -28,39 +28,39 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Min', - 'ds' => 's0signatures_total', + 'descr' => 'Min', + 'ds' => 's0signatures_total', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Max', - 'ds' => 's1signatures_total', + 'descr' => 'Max', + 'ds' => 's1signatures_total', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Mean', - 'ds' => 's3signatures_total', + 'descr' => 'Mean', + 'ds' => 's3signatures_total', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Median', - 'ds' => 's4signatures_total', + 'descr' => 'Median', + 'ds' => 's4signatures_total', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Mode', - 'ds' => 's5signatures_total', + 'descr' => 'Mode', + 'ds' => 's5signatures_total', ]; if ($vars['stddev'] == 'on') { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'StdDev', - 'ds' => 's7signatures_total', + 'descr' => 'StdDev', + 'ds' => 's7signatures_total', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'StdDevP', - 'ds' => 's9signatures_total', + 'descr' => 'StdDevP', + 'ds' => 's9signatures_total', ]; } } else { diff --git a/includes/html/graphs/application/cape_signatures_total_pkg.inc.php b/includes/html/graphs/application/cape_signatures_total_pkg.inc.php index 17c101aaa7..7fa86cbc34 100644 --- a/includes/html/graphs/application/cape_signatures_total_pkg.inc.php +++ b/includes/html/graphs/application/cape_signatures_total_pkg.inc.php @@ -19,8 +19,8 @@ foreach ($packages as $index => $package) { $rrd_filename = Rrd::name($device['hostname'], ['app', $name, $app['app_id'], $package]); $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => $label, - 'ds' => 'signatures_total', + 'descr' => $label, + 'ds' => 'signatures_total', ]; $packages_int++; diff --git a/includes/html/graphs/application/cape_status.inc.php b/includes/html/graphs/application/cape_status.inc.php index 8e6958babe..360aad79f8 100644 --- a/includes/html/graphs/application/cape_status.inc.php +++ b/includes/html/graphs/application/cape_status.inc.php @@ -16,8 +16,8 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'banned', - 'ds' => 'banned', + 'descr' => 'banned', + 'ds' => 'banned', ]; // $rrd_list[] = [ // 'filename' => $rrd_filename, @@ -26,43 +26,43 @@ if (Rrd::checkRrdExists($rrd_filename)) { // ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'running', - 'ds' => 'running', + 'descr' => 'running', + 'ds' => 'running', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'completed', - 'ds' => 'completed', + 'descr' => 'completed', + 'ds' => 'completed', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'distributed', - 'ds' => 'distributed', + 'descr' => 'distributed', + 'ds' => 'distributed', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'reported', - 'ds' => 'reported', + 'descr' => 'reported', + 'ds' => 'reported', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'recovered', - 'ds' => 'recovered', + 'descr' => 'recovered', + 'ds' => 'recovered', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'failed_analysis', - 'ds' => 'failed_analysis', + 'descr' => 'failed_analysis', + 'ds' => 'failed_analysis', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'failed_processing', - 'ds' => 'failed_processing', + 'descr' => 'failed_processing', + 'ds' => 'failed_processing', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'failed_reporting', - 'ds' => 'failed_reporting', + 'descr' => 'failed_reporting', + 'ds' => 'failed_reporting', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/certificate-common.inc.php b/includes/html/graphs/application/certificate-common.inc.php index 2cf95b5bd7..f36b2a1b7d 100644 --- a/includes/html/graphs/application/certificate-common.inc.php +++ b/includes/html/graphs/application/certificate-common.inc.php @@ -23,8 +23,8 @@ while (isset($cert_name_list[$int])) { if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => $cert_name, - 'ds' => $rrdVar, + 'descr' => $cert_name, + 'ds' => $rrdVar, ]; } $int++; diff --git a/includes/html/graphs/application/chronyd_frequency.inc.php b/includes/html/graphs/application/chronyd_frequency.inc.php index 3ec42e8c12..e8b5eaaafb 100644 --- a/includes/html/graphs/application/chronyd_frequency.inc.php +++ b/includes/html/graphs/application/chronyd_frequency.inc.php @@ -7,9 +7,9 @@ $nototal = (($width < 224) ? 1 : 0); $unit_text = 'Seconds PPM'; $rrd_filename = Rrd::name($device['hostname'], ['app', 'chronyd', $app->app_id]); $array = [ - 'frequency' => ['descr' => 'Error rate'], - 'residual_frequency' => ['descr' => 'Ref clk offset'], - 'skew' => ['descr' => 'Sys clk skew'], + 'frequency' => ['descr' => 'Error rate'], + 'residual_frequency' => ['descr' => 'Ref clk offset'], + 'skew' => ['descr' => 'Sys clk skew'], ]; $i = 0; diff --git a/includes/html/graphs/application/chronyd_root.inc.php b/includes/html/graphs/application/chronyd_root.inc.php index 2ab341e1b9..817ac3412d 100644 --- a/includes/html/graphs/application/chronyd_root.inc.php +++ b/includes/html/graphs/application/chronyd_root.inc.php @@ -7,8 +7,8 @@ $nototal = (($width < 224) ? 1 : 0); $unit_text = 'Seconds'; $rrd_filename = Rrd::name($device['hostname'], ['app', 'chronyd', $app->app_id]); $array = [ - 'root_delay' => ['descr' => 'Root clk delay'], - 'root_dispersion' => ['descr' => 'Root clk disp.'], + 'root_delay' => ['descr' => 'Root clk delay'], + 'root_dispersion' => ['descr' => 'Root clk disp.'], ]; $i = 0; diff --git a/includes/html/graphs/application/chronyd_source_frequency.inc.php b/includes/html/graphs/application/chronyd_source_frequency.inc.php index 99c3dba756..9b8a986bdc 100644 --- a/includes/html/graphs/application/chronyd_source_frequency.inc.php +++ b/includes/html/graphs/application/chronyd_source_frequency.inc.php @@ -7,8 +7,8 @@ $nototal = (($width < 224) ? 1 : 0); $unit_text = 'Seconds PPM'; $rrd_filename = Rrd::name($device['hostname'], ['app', 'chronyd', $app->app_id, $vars['source']]); $array = [ - 'frequency' => ['descr' => 'Estimated'], - 'frequency_skew' => ['descr' => 'Est. error'], + 'frequency' => ['descr' => 'Estimated'], + 'frequency_skew' => ['descr' => 'Est. error'], ]; $rrd_list = []; diff --git a/includes/html/graphs/application/chronyd_source_polling.inc.php b/includes/html/graphs/application/chronyd_source_polling.inc.php index 97e3c7d50c..fec58df0b2 100644 --- a/includes/html/graphs/application/chronyd_source_polling.inc.php +++ b/includes/html/graphs/application/chronyd_source_polling.inc.php @@ -6,11 +6,11 @@ $colours = 'mixed'; $nototal = (($width < 224) ? 1 : 0); $rrd_filename = Rrd::name($device['hostname'], ['app', 'chronyd', $app->app_id, $vars['source']]); $array = [ - 'polling_rate' => ['descr' => 'Polling rate'], - 'last_rx' => ['descr' => 'Last RX'], - 'number_samplepoints' => ['descr' => '# sample pts'], - 'number_runs' => ['descr' => '# runs'], - 'span' => ['descr' => 'Sample span'], + 'polling_rate' => ['descr' => 'Polling rate'], + 'last_rx' => ['descr' => 'Last RX'], + 'number_samplepoints' => ['descr' => '# sample pts'], + 'number_runs' => ['descr' => '# runs'], + 'span' => ['descr' => 'Sample span'], ]; $rrd_list = []; diff --git a/includes/html/graphs/application/chronyd_source_sampling.inc.php b/includes/html/graphs/application/chronyd_source_sampling.inc.php index 97335bd9bd..aabbf5c0db 100644 --- a/includes/html/graphs/application/chronyd_source_sampling.inc.php +++ b/includes/html/graphs/application/chronyd_source_sampling.inc.php @@ -7,11 +7,11 @@ $nototal = (($width < 224) ? 1 : 0); $unit_text = 'Seconds'; $rrd_filename = Rrd::name($device['hostname'], ['app', 'chronyd', $app->app_id, $vars['source']]); $array = [ - 'adjusted_offset' => ['descr' => 'Adjusted'], - 'measured_offset' => ['descr' => 'Measured'], - 'offset' => ['descr' => 'Estimated'], - 'estimated_error' => ['descr' => 'Est. error'], - 'stddev' => ['descr' => 'Std dev'], + 'adjusted_offset' => ['descr' => 'Adjusted'], + 'measured_offset' => ['descr' => 'Measured'], + 'offset' => ['descr' => 'Estimated'], + 'estimated_error' => ['descr' => 'Est. error'], + 'stddev' => ['descr' => 'Std dev'], ]; $rrd_list = []; diff --git a/includes/html/graphs/application/chronyd_stratum.inc.php b/includes/html/graphs/application/chronyd_stratum.inc.php index 3ad795afb7..64cc751b08 100644 --- a/includes/html/graphs/application/chronyd_stratum.inc.php +++ b/includes/html/graphs/application/chronyd_stratum.inc.php @@ -7,7 +7,7 @@ $nototal = (($width < 224) ? 1 : 0); $unit_text = 'Level'; $rrd_filename = Rrd::name($device['hostname'], ['app', 'chronyd', $app->app_id]); $array = [ - 'stratum' => ['descr' => 'Stratum'], + 'stratum' => ['descr' => 'Stratum'], ]; $rrd_list = []; diff --git a/includes/html/graphs/application/chronyd_time.inc.php b/includes/html/graphs/application/chronyd_time.inc.php index 4ee7a38b8f..e5f4dad492 100644 --- a/includes/html/graphs/application/chronyd_time.inc.php +++ b/includes/html/graphs/application/chronyd_time.inc.php @@ -7,9 +7,9 @@ $nototal = (($width < 224) ? 1 : 0); $unit_text = 'Seconds'; $rrd_filename = Rrd::name($device['hostname'], ['app', 'chronyd', $app->app_id]); $array = [ - 'system_time' => ['descr' => 'Clock lag'], - 'last_offset' => ['descr' => 'Last offset'], - 'rms_offset' => ['descr' => 'Avg offset'], + 'system_time' => ['descr' => 'Clock lag'], + 'last_offset' => ['descr' => 'Last offset'], + 'rms_offset' => ['descr' => 'Avg offset'], ]; $i = 0; diff --git a/includes/html/graphs/application/dhcp-stats_networks_current.inc.php b/includes/html/graphs/application/dhcp-stats_networks_current.inc.php index 8936de7f85..e77ae4168d 100644 --- a/includes/html/graphs/application/dhcp-stats_networks_current.inc.php +++ b/includes/html/graphs/application/dhcp-stats_networks_current.inc.php @@ -27,8 +27,8 @@ while (isset($arrays[$int])) { [$net, $subnet] = explode('_', str_replace($category . '-', '', $array)); $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => $net . '/' . $subnet, - 'ds' => $rrdVar, + 'descr' => $net . '/' . $subnet, + 'ds' => $rrdVar, ]; } $int++; diff --git a/includes/html/graphs/application/dhcp-stats_networks_max.inc.php b/includes/html/graphs/application/dhcp-stats_networks_max.inc.php index 5538746a6e..66f662cebc 100644 --- a/includes/html/graphs/application/dhcp-stats_networks_max.inc.php +++ b/includes/html/graphs/application/dhcp-stats_networks_max.inc.php @@ -27,8 +27,8 @@ while (isset($arrays[$int])) { [$net, $subnet] = explode('_', str_replace($category . '-', '', $array)); $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => $net . '/' . $subnet, - 'ds' => $rrdVar, + 'descr' => $net . '/' . $subnet, + 'ds' => $rrdVar, ]; } $int++; diff --git a/includes/html/graphs/application/dhcp-stats_networks_percent.inc.php b/includes/html/graphs/application/dhcp-stats_networks_percent.inc.php index f8c13e47fb..f49535378e 100644 --- a/includes/html/graphs/application/dhcp-stats_networks_percent.inc.php +++ b/includes/html/graphs/application/dhcp-stats_networks_percent.inc.php @@ -27,8 +27,8 @@ while (isset($arrays[$int])) { [$net, $subnet] = explode('_', str_replace($category . '-', '', $array)); $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => $net . '/' . $subnet, - 'ds' => $rrdVar, + 'descr' => $net . '/' . $subnet, + 'ds' => $rrdVar, ]; } $int++; diff --git a/includes/html/graphs/application/dhcp-stats_pools_current.inc.php b/includes/html/graphs/application/dhcp-stats_pools_current.inc.php index 814e0bc786..f14f82d848 100644 --- a/includes/html/graphs/application/dhcp-stats_pools_current.inc.php +++ b/includes/html/graphs/application/dhcp-stats_pools_current.inc.php @@ -26,8 +26,8 @@ while (isset($arrays[$int])) { if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => str_replace($category . '-', '', $array), - 'ds' => $rrdVar, + 'descr' => str_replace($category . '-', '', $array), + 'ds' => $rrdVar, ]; } diff --git a/includes/html/graphs/application/dhcp-stats_pools_max.inc.php b/includes/html/graphs/application/dhcp-stats_pools_max.inc.php index 0e7f71143f..1744e142d7 100644 --- a/includes/html/graphs/application/dhcp-stats_pools_max.inc.php +++ b/includes/html/graphs/application/dhcp-stats_pools_max.inc.php @@ -26,8 +26,8 @@ while (isset($arrays[$int])) { if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => str_replace($category . '-', '', $array), - 'ds' => $rrdVar, + 'descr' => str_replace($category . '-', '', $array), + 'ds' => $rrdVar, ]; } diff --git a/includes/html/graphs/application/dhcp-stats_pools_percent.inc.php b/includes/html/graphs/application/dhcp-stats_pools_percent.inc.php index 6671014e69..b2214c1148 100644 --- a/includes/html/graphs/application/dhcp-stats_pools_percent.inc.php +++ b/includes/html/graphs/application/dhcp-stats_pools_percent.inc.php @@ -26,8 +26,8 @@ while (isset($arrays[$int])) { if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => str_replace($category . '-', '', $array), - 'ds' => $rrdVar, + 'descr' => str_replace($category . '-', '', $array), + 'ds' => $rrdVar, ]; } diff --git a/includes/html/graphs/application/docker-common.inc.php b/includes/html/graphs/application/docker-common.inc.php index e2fcf8b17c..639d49d961 100644 --- a/includes/html/graphs/application/docker-common.inc.php +++ b/includes/html/graphs/application/docker-common.inc.php @@ -25,8 +25,8 @@ while (isset($containers[$int])) { if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => $container_name, - 'ds' => $rrdVar, + 'descr' => $container_name, + 'ds' => $rrdVar, ]; } $int++; diff --git a/includes/html/graphs/application/fbsd-nfs-client_cache.inc.php b/includes/html/graphs/application/fbsd-nfs-client_cache.inc.php index 58f050c847..c423335636 100644 --- a/includes/html/graphs/application/fbsd-nfs-client_cache.inc.php +++ b/includes/html/graphs/application/fbsd-nfs-client_cache.inc.php @@ -18,99 +18,99 @@ if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list = [ [ 'filename' => $rrd_filename, - 'descr' => 'attr hits', - 'ds' => 'attrhits', - 'colour' => '582a72', + 'descr' => 'attr hits', + 'ds' => 'attrhits', + 'colour' => '582a72', ], [ 'filename' => $rrd_filename, - 'descr' => 'attr misses', - 'ds' => 'attrmisses', - 'colour' => '28774f', + 'descr' => 'attr misses', + 'ds' => 'attrmisses', + 'colour' => '28774f', ], [ 'filename' => $rrd_filename, - 'descr' => 'lkup hits', - 'ds' => 'lkuphits', - 'colour' => 'aa6c39', + 'descr' => 'lkup hits', + 'ds' => 'lkuphits', + 'colour' => 'aa6c39', ], [ 'filename' => $rrd_filename, - 'descr' => 'lkup misses', - 'ds' => 'lkupmisses', - 'colour' => '88cc88', + 'descr' => 'lkup misses', + 'ds' => 'lkupmisses', + 'colour' => '88cc88', ], [ 'filename' => $rrd_filename, - 'descr' => 'bioR hits', - 'ds' => 'biorhits', - 'colour' => 'd46a6a', + 'descr' => 'bioR hits', + 'ds' => 'biorhits', + 'colour' => 'd46a6a', ], [ 'filename' => $rrd_filename, - 'descr' => 'bioR misses', - 'ds' => 'biormisses', - 'colour' => 'ffd1aa', + 'descr' => 'bioR misses', + 'ds' => 'biormisses', + 'colour' => 'ffd1aa', ], [ 'filename' => $rrd_filename, - 'descr' => 'bioW hits', - 'ds' => 'biowhits', - 'colour' => '582a72', + 'descr' => 'bioW hits', + 'ds' => 'biowhits', + 'colour' => '582a72', ], [ 'filename' => $rrd_filename, - 'descr' => 'bioW misses', - 'ds' => 'biowmisses', - 'colour' => 'aa8839', + 'descr' => 'bioW misses', + 'ds' => 'biowmisses', + 'colour' => 'aa8839', ], [ 'filename' => $rrd_filename, - 'descr' => 'biorRL hits', - 'ds' => 'biorlhits', - 'colour' => '28536c', + 'descr' => 'biorRL hits', + 'ds' => 'biorlhits', + 'colour' => '28536c', ], [ 'filename' => $rrd_filename, - 'descr' => 'bioRL misses', - 'ds' => 'biorlmisses', - 'colour' => '880000', + 'descr' => 'bioRL misses', + 'ds' => 'biorlmisses', + 'colour' => '880000', ], [ 'filename' => $rrd_filename, - 'descr' => 'bioD hits', - 'ds' => 'biodhits', - 'colour' => 'ff0000', + 'descr' => 'bioD hits', + 'ds' => 'biodhits', + 'colour' => 'ff0000', ], [ 'filename' => $rrd_filename, - 'descr' => 'bioD misses', - 'ds' => 'biodmisses', - 'colour' => '285300', + 'descr' => 'bioD misses', + 'ds' => 'biodmisses', + 'colour' => '285300', ], [ 'filename' => $rrd_filename, - 'descr' => 'dirE hits', - 'ds' => 'direhits', - 'colour' => '2800ff', + 'descr' => 'dirE hits', + 'ds' => 'direhits', + 'colour' => '2800ff', ], [ 'filename' => $rrd_filename, - 'descr' => 'dirE misses', - 'ds' => 'diremisses', - 'colour' => '000080', + 'descr' => 'dirE misses', + 'ds' => 'diremisses', + 'colour' => '000080', ], [ 'filename' => $rrd_filename, - 'descr' => 'accs hits', - 'ds' => 'accshits', - 'colour' => '500000', + 'descr' => 'accs hits', + 'ds' => 'accshits', + 'colour' => '500000', ], [ 'filename' => $rrd_filename, - 'descr' => 'accs misses', - 'ds' => 'accsmisses', - 'colour' => 'aa6511', + 'descr' => 'accs misses', + 'ds' => 'accsmisses', + 'colour' => 'aa6511', ], ]; } else { diff --git a/includes/html/graphs/application/fbsd-nfs-client_rpc.inc.php b/includes/html/graphs/application/fbsd-nfs-client_rpc.inc.php index 8b81384e72..0d29d0b943 100644 --- a/includes/html/graphs/application/fbsd-nfs-client_rpc.inc.php +++ b/includes/html/graphs/application/fbsd-nfs-client_rpc.inc.php @@ -18,33 +18,33 @@ if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list = [ [ 'filename' => $rrd_filename, - 'descr' => 'timed out', - 'ds' => 'timedout', - 'colour' => '582a72', + 'descr' => 'timed out', + 'ds' => 'timedout', + 'colour' => '582a72', ], [ 'filename' => $rrd_filename, - 'descr' => 'invalid', - 'ds' => 'invalid', - 'colour' => 'ffd1aa', + 'descr' => 'invalid', + 'ds' => 'invalid', + 'colour' => 'ffd1aa', ], [ 'filename' => $rrd_filename, - 'descr' => 'x replies', - 'ds' => 'xreplies', - 'colour' => 'aa6c39', + 'descr' => 'x replies', + 'ds' => 'xreplies', + 'colour' => 'aa6c39', ], [ 'filename' => $rrd_filename, - 'descr' => 'retries', - 'ds' => 'retries', - 'colour' => '28536c', + 'descr' => 'retries', + 'ds' => 'retries', + 'colour' => '28536c', ], [ 'filename' => $rrd_filename, - 'descr' => 'requests', - 'ds' => 'requests', - 'colour' => 'ff11bb', + 'descr' => 'requests', + 'ds' => 'requests', + 'colour' => 'ff11bb', ], ]; } else { diff --git a/includes/html/graphs/application/fbsd-nfs-client_stats.inc.php b/includes/html/graphs/application/fbsd-nfs-client_stats.inc.php index 3341701b93..99b9bbcda4 100644 --- a/includes/html/graphs/application/fbsd-nfs-client_stats.inc.php +++ b/includes/html/graphs/application/fbsd-nfs-client_stats.inc.php @@ -18,129 +18,129 @@ if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list = [ [ 'filename' => $rrd_filename, - 'descr' => 'getattr', - 'ds' => 'getattr', - 'colour' => '582a72', + 'descr' => 'getattr', + 'ds' => 'getattr', + 'colour' => '582a72', ], [ 'filename' => $rrd_filename, - 'descr' => 'setattr', - 'ds' => 'setattr', - 'colour' => '28774f', + 'descr' => 'setattr', + 'ds' => 'setattr', + 'colour' => '28774f', ], [ 'filename' => $rrd_filename, - 'descr' => 'lookup', - 'ds' => 'lookup', - 'colour' => 'aa6c39', + 'descr' => 'lookup', + 'ds' => 'lookup', + 'colour' => 'aa6c39', ], [ 'filename' => $rrd_filename, - 'descr' => 'readlink', - 'ds' => 'readlink', - 'colour' => '88cc88', + 'descr' => 'readlink', + 'ds' => 'readlink', + 'colour' => '88cc88', ], [ 'filename' => $rrd_filename, - 'descr' => 'read', - 'ds' => 'read', - 'colour' => 'd46a6a', + 'descr' => 'read', + 'ds' => 'read', + 'colour' => 'd46a6a', ], [ 'filename' => $rrd_filename, - 'descr' => 'write', - 'ds' => 'write', - 'colour' => 'ffd1aa', + 'descr' => 'write', + 'ds' => 'write', + 'colour' => 'ffd1aa', ], [ 'filename' => $rrd_filename, - 'descr' => 'create', - 'ds' => 'create', - 'colour' => '582a72', + 'descr' => 'create', + 'ds' => 'create', + 'colour' => '582a72', ], [ 'filename' => $rrd_filename, - 'descr' => 'remove', - 'ds' => 'remove', - 'colour' => 'aa8839', + 'descr' => 'remove', + 'ds' => 'remove', + 'colour' => 'aa8839', ], [ 'filename' => $rrd_filename, - 'descr' => 'rename', - 'ds' => 'rename', - 'colour' => '28536c', + 'descr' => 'rename', + 'ds' => 'rename', + 'colour' => '28536c', ], [ 'filename' => $rrd_filename, - 'descr' => 'link', - 'ds' => 'link', - 'colour' => '880000', + 'descr' => 'link', + 'ds' => 'link', + 'colour' => '880000', ], [ 'filename' => $rrd_filename, - 'descr' => 'symlink', - 'ds' => 'symlink', - 'colour' => 'ff0000', + 'descr' => 'symlink', + 'ds' => 'symlink', + 'colour' => 'ff0000', ], [ 'filename' => $rrd_filename, - 'descr' => 'mkdir', - 'ds' => 'mkdir', - 'colour' => '285300', + 'descr' => 'mkdir', + 'ds' => 'mkdir', + 'colour' => '285300', ], [ 'filename' => $rrd_filename, - 'descr' => 'rmdir', - 'ds' => 'rmdir', - 'colour' => '2800ff', + 'descr' => 'rmdir', + 'ds' => 'rmdir', + 'colour' => '2800ff', ], [ 'filename' => $rrd_filename, - 'descr' => 'readdir', - 'ds' => 'readdir', - 'colour' => '000080', + 'descr' => 'readdir', + 'ds' => 'readdir', + 'colour' => '000080', ], [ 'filename' => $rrd_filename, - 'descr' => 'rdirplus', - 'ds' => 'rdirplus', - 'colour' => '500000', + 'descr' => 'rdirplus', + 'ds' => 'rdirplus', + 'colour' => '500000', ], [ 'filename' => $rrd_filename, - 'descr' => 'access', - 'ds' => 'access', - 'colour' => 'aa6511', + 'descr' => 'access', + 'ds' => 'access', + 'colour' => 'aa6511', ], [ 'filename' => $rrd_filename, - 'descr' => 'mknod', - 'ds' => 'mknod', - 'colour' => '98139c', + 'descr' => 'mknod', + 'ds' => 'mknod', + 'colour' => '98139c', ], [ 'filename' => $rrd_filename, - 'descr' => 'fsstat', - 'ds' => 'fsstat', - 'colour' => 'd853dc', + 'descr' => 'fsstat', + 'ds' => 'fsstat', + 'colour' => 'd853dc', ], [ 'filename' => $rrd_filename, - 'descr' => 'fsinfo', - 'ds' => 'fsinfo', - 'colour' => 'd853dc', + 'descr' => 'fsinfo', + 'ds' => 'fsinfo', + 'colour' => 'd853dc', ], [ 'filename' => $rrd_filename, - 'descr' => 'pathconf', - 'ds' => 'pathconf', - 'colour' => 'f8f36c', + 'descr' => 'pathconf', + 'ds' => 'pathconf', + 'colour' => 'f8f36c', ], [ 'filename' => $rrd_filename, - 'descr' => 'commit', - 'ds' => 'commit', - 'colour' => 'ff536c', + 'descr' => 'commit', + 'ds' => 'commit', + 'colour' => 'ff536c', ], ]; } else { diff --git a/includes/html/graphs/application/fbsd-nfs-server_cache.inc.php b/includes/html/graphs/application/fbsd-nfs-server_cache.inc.php index ce4794a87d..bff9a61c1d 100644 --- a/includes/html/graphs/application/fbsd-nfs-server_cache.inc.php +++ b/includes/html/graphs/application/fbsd-nfs-server_cache.inc.php @@ -18,27 +18,27 @@ if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list = [ [ 'filename' => $rrd_filename, - 'descr' => 'inprog', - 'ds' => 'inprog', - 'colour' => '582a72', + 'descr' => 'inprog', + 'ds' => 'inprog', + 'colour' => '582a72', ], [ 'filename' => $rrd_filename, - 'descr' => 'idem', - 'ds' => 'idem', - 'colour' => 'ffd1aa', + 'descr' => 'idem', + 'ds' => 'idem', + 'colour' => 'ffd1aa', ], [ 'filename' => $rrd_filename, - 'descr' => 'nonidem', - 'ds' => 'nonidem', - 'colour' => 'aa6c39', + 'descr' => 'nonidem', + 'ds' => 'nonidem', + 'colour' => 'aa6c39', ], [ 'filename' => $rrd_filename, - 'descr' => 'misses', - 'ds' => 'misses', - 'colour' => '28536c', + 'descr' => 'misses', + 'ds' => 'misses', + 'colour' => '28536c', ], ]; } else { diff --git a/includes/html/graphs/application/fbsd-nfs-server_gathering.inc.php b/includes/html/graphs/application/fbsd-nfs-server_gathering.inc.php index 1047484c1a..bdb69398f3 100644 --- a/includes/html/graphs/application/fbsd-nfs-server_gathering.inc.php +++ b/includes/html/graphs/application/fbsd-nfs-server_gathering.inc.php @@ -18,21 +18,21 @@ if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list = [ [ 'filename' => $rrd_filename, - 'descr' => 'write ops', - 'ds' => 'writeops', - 'colour' => 'aa6c39', + 'descr' => 'write ops', + 'ds' => 'writeops', + 'colour' => 'aa6c39', ], [ 'filename' => $rrd_filename, - 'descr' => 'write rpc', - 'ds' => 'writerpc', - 'colour' => '582a72', + 'descr' => 'write rpc', + 'ds' => 'writerpc', + 'colour' => '582a72', ], [ 'filename' => $rrd_filename, - 'descr' => 'ops saved', - 'ds' => 'opsaved', - 'colour' => '28536c', + 'descr' => 'ops saved', + 'ds' => 'opsaved', + 'colour' => '28536c', ], ]; } else { diff --git a/includes/html/graphs/application/fbsd-nfs-server_stats.inc.php b/includes/html/graphs/application/fbsd-nfs-server_stats.inc.php index 681cd9059c..473c03e6dd 100644 --- a/includes/html/graphs/application/fbsd-nfs-server_stats.inc.php +++ b/includes/html/graphs/application/fbsd-nfs-server_stats.inc.php @@ -18,129 +18,129 @@ if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list = [ [ 'filename' => $rrd_filename, - 'descr' => 'getattr', - 'ds' => 'getattr', - 'colour' => '582a72', + 'descr' => 'getattr', + 'ds' => 'getattr', + 'colour' => '582a72', ], [ 'filename' => $rrd_filename, - 'descr' => 'setattr', - 'ds' => 'setattr', - 'colour' => '28774f', + 'descr' => 'setattr', + 'ds' => 'setattr', + 'colour' => '28774f', ], [ 'filename' => $rrd_filename, - 'descr' => 'lookup', - 'ds' => 'lookup', - 'colour' => 'aa6c39', + 'descr' => 'lookup', + 'ds' => 'lookup', + 'colour' => 'aa6c39', ], [ 'filename' => $rrd_filename, - 'descr' => 'readlink', - 'ds' => 'readlink', - 'colour' => '88cc88', + 'descr' => 'readlink', + 'ds' => 'readlink', + 'colour' => '88cc88', ], [ 'filename' => $rrd_filename, - 'descr' => 'read', - 'ds' => 'read', - 'colour' => 'd46a6a', + 'descr' => 'read', + 'ds' => 'read', + 'colour' => 'd46a6a', ], [ 'filename' => $rrd_filename, - 'descr' => 'write', - 'ds' => 'write', - 'colour' => 'ffd1aa', + 'descr' => 'write', + 'ds' => 'write', + 'colour' => 'ffd1aa', ], [ 'filename' => $rrd_filename, - 'descr' => 'create', - 'ds' => 'create', - 'colour' => '582a72', + 'descr' => 'create', + 'ds' => 'create', + 'colour' => '582a72', ], [ 'filename' => $rrd_filename, - 'descr' => 'remove', - 'ds' => 'remove', - 'colour' => 'aa8839', + 'descr' => 'remove', + 'ds' => 'remove', + 'colour' => 'aa8839', ], [ 'filename' => $rrd_filename, - 'descr' => 'rename', - 'ds' => 'rename', - 'colour' => '28536c', + 'descr' => 'rename', + 'ds' => 'rename', + 'colour' => '28536c', ], [ 'filename' => $rrd_filename, - 'descr' => 'link', - 'ds' => 'link', - 'colour' => '880000', + 'descr' => 'link', + 'ds' => 'link', + 'colour' => '880000', ], [ 'filename' => $rrd_filename, - 'descr' => 'symlink', - 'ds' => 'symlink', - 'colour' => 'ff0000', + 'descr' => 'symlink', + 'ds' => 'symlink', + 'colour' => 'ff0000', ], [ 'filename' => $rrd_filename, - 'descr' => 'mkdir', - 'ds' => 'mkdir', - 'colour' => '285300', + 'descr' => 'mkdir', + 'ds' => 'mkdir', + 'colour' => '285300', ], [ 'filename' => $rrd_filename, - 'descr' => 'rmdir', - 'ds' => 'rmdir', - 'colour' => '2800ff', + 'descr' => 'rmdir', + 'ds' => 'rmdir', + 'colour' => '2800ff', ], [ 'filename' => $rrd_filename, - 'descr' => 'readdir', - 'ds' => 'readdir', - 'colour' => '000080', + 'descr' => 'readdir', + 'ds' => 'readdir', + 'colour' => '000080', ], [ 'filename' => $rrd_filename, - 'descr' => 'rdirplus', - 'ds' => 'rdirplus', - 'colour' => '500000', + 'descr' => 'rdirplus', + 'ds' => 'rdirplus', + 'colour' => '500000', ], [ 'filename' => $rrd_filename, - 'descr' => 'access', - 'ds' => 'access', - 'colour' => 'aa6511', + 'descr' => 'access', + 'ds' => 'access', + 'colour' => 'aa6511', ], [ 'filename' => $rrd_filename, - 'descr' => 'mknod', - 'ds' => 'mknod', - 'colour' => '98139c', + 'descr' => 'mknod', + 'ds' => 'mknod', + 'colour' => '98139c', ], [ 'filename' => $rrd_filename, - 'descr' => 'fsstat', - 'ds' => 'fsstat', - 'colour' => 'd853dc', + 'descr' => 'fsstat', + 'ds' => 'fsstat', + 'colour' => 'd853dc', ], [ 'filename' => $rrd_filename, - 'descr' => 'fsinfo', - 'ds' => 'fsinfo', - 'colour' => 'd853dc', + 'descr' => 'fsinfo', + 'ds' => 'fsinfo', + 'colour' => 'd853dc', ], [ 'filename' => $rrd_filename, - 'descr' => 'pathconf', - 'ds' => 'pathconf', - 'colour' => 'f8f36c', + 'descr' => 'pathconf', + 'ds' => 'pathconf', + 'colour' => 'f8f36c', ], [ 'filename' => $rrd_filename, - 'descr' => 'commit', - 'ds' => 'commit', - 'colour' => 'ff536c', + 'descr' => 'commit', + 'ds' => 'commit', + 'colour' => 'ff536c', ], ]; } else { diff --git a/includes/html/graphs/application/freeradius_access.inc.php b/includes/html/graphs/application/freeradius_access.inc.php index 9358b42fcb..b8061972d1 100644 --- a/includes/html/graphs/application/freeradius_access.inc.php +++ b/includes/html/graphs/application/freeradius_access.inc.php @@ -9,7 +9,7 @@ $rrd_filename = Rrd::name($device['hostname'], ['app', 'freeradius-access', $app $fr_access_array = [ 'requests' => 'Requests', 'accepts' => 'Accepts', - 'rejects'=> 'Rejects', + 'rejects' => 'Rejects', 'challenges' => 'Challenges', ]; $colours = 'mixed'; diff --git a/includes/html/graphs/application/freeradius_proxy_access.inc.php b/includes/html/graphs/application/freeradius_proxy_access.inc.php index 45702e8c26..ae45b8d5ec 100644 --- a/includes/html/graphs/application/freeradius_proxy_access.inc.php +++ b/includes/html/graphs/application/freeradius_proxy_access.inc.php @@ -9,7 +9,7 @@ $rrd_filename = Rrd::name($device['hostname'], ['app', 'freeradius-proxy_access' $fr_proxy_access_array = [ 'requests' => 'Requests', 'accepts' => 'Accepts', - 'rejects'=> 'Rejects', + 'rejects' => 'Rejects', 'challenges' => 'Challenges', ]; $colours = 'mixed'; diff --git a/includes/html/graphs/application/freeswitch_callsIn.inc.php b/includes/html/graphs/application/freeswitch_callsIn.inc.php index 77ac999d0b..07a30d3d7c 100644 --- a/includes/html/graphs/application/freeswitch_callsIn.inc.php +++ b/includes/html/graphs/application/freeswitch_callsIn.inc.php @@ -8,12 +8,12 @@ $nototal = (($width < 224) ? 1 : 0); $unit_text = 'Inbound Calls/sec'; $rrd_filename = Rrd::name($device['hostname'], ['app', 'freeswitch', 'stats', $app->app_id]); $array = [ - 'in_okay' => [ - 'descr' => 'Okay', + 'in_okay' => [ + 'descr' => 'Okay', 'colour' => '008800FF', ], 'in_failed' => [ - 'descr' => 'Failed', + 'descr' => 'Failed', 'colour' => '880000FF', ], ]; diff --git a/includes/html/graphs/application/freeswitch_callsOut.inc.php b/includes/html/graphs/application/freeswitch_callsOut.inc.php index 6f20cc7d91..a74b73c58c 100644 --- a/includes/html/graphs/application/freeswitch_callsOut.inc.php +++ b/includes/html/graphs/application/freeswitch_callsOut.inc.php @@ -8,12 +8,12 @@ $nototal = (($width < 224) ? 1 : 0); $unit_text = 'Outbound Calls/sec'; $rrd_filename = Rrd::name($device['hostname'], ['app', 'freeswitch', 'stats', $app->app_id]); $array = [ - 'out_okay' => [ - 'descr' => 'Okay', + 'out_okay' => [ + 'descr' => 'Okay', 'colour' => '008800FF', ], 'out_failed' => [ - 'descr' => 'Failed', + 'descr' => 'Failed', 'colour' => '880000FF', ], ]; diff --git a/includes/html/graphs/application/hv-monitor_csw.inc.php b/includes/html/graphs/application/hv-monitor_csw.inc.php index 8d85b0d760..30c1ea96cc 100644 --- a/includes/html/graphs/application/hv-monitor_csw.inc.php +++ b/includes/html/graphs/application/hv-monitor_csw.inc.php @@ -18,13 +18,13 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Involuntary', - 'ds' => 'nivcsw', + 'descr' => 'Involuntary', + 'ds' => 'nivcsw', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Voluntary', - 'ds' => 'nvcsw', + 'descr' => 'Voluntary', + 'ds' => 'nvcsw', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/hv-monitor_disk-rw-blocks.inc.php b/includes/html/graphs/application/hv-monitor_disk-rw-blocks.inc.php index f63320194b..b97637b589 100644 --- a/includes/html/graphs/application/hv-monitor_disk-rw-blocks.inc.php +++ b/includes/html/graphs/application/hv-monitor_disk-rw-blocks.inc.php @@ -18,14 +18,14 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Read', - 'ds' => 'inblk', + 'descr' => 'Read', + 'ds' => 'inblk', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Write', - 'ds' => 'oublk', - 'invert' => true, + 'descr' => 'Write', + 'ds' => 'oublk', + 'invert' => true, ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/hv-monitor_disk-rw-bytes.inc.php b/includes/html/graphs/application/hv-monitor_disk-rw-bytes.inc.php index dfe0bf8aa5..9ac21c2696 100644 --- a/includes/html/graphs/application/hv-monitor_disk-rw-bytes.inc.php +++ b/includes/html/graphs/application/hv-monitor_disk-rw-bytes.inc.php @@ -20,14 +20,14 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Read', - 'ds' => 'rbytes', + 'descr' => 'Read', + 'ds' => 'rbytes', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Write', - 'ds' => 'wbytes', - 'invert' => true, + 'descr' => 'Write', + 'ds' => 'wbytes', + 'invert' => true, ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/hv-monitor_disk-rw-reqs.inc.php b/includes/html/graphs/application/hv-monitor_disk-rw-reqs.inc.php index b5a6e7099e..60ebe672fe 100644 --- a/includes/html/graphs/application/hv-monitor_disk-rw-reqs.inc.php +++ b/includes/html/graphs/application/hv-monitor_disk-rw-reqs.inc.php @@ -20,14 +20,14 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Read', - 'ds' => 'rreqs', + 'descr' => 'Read', + 'ds' => 'rreqs', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Write', - 'ds' => 'wreqs', - 'invert' => true, + 'descr' => 'Write', + 'ds' => 'wreqs', + 'invert' => true, ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/hv-monitor_disk-rw-time.inc.php b/includes/html/graphs/application/hv-monitor_disk-rw-time.inc.php index 432d0a2bbb..45ac3ace72 100644 --- a/includes/html/graphs/application/hv-monitor_disk-rw-time.inc.php +++ b/includes/html/graphs/application/hv-monitor_disk-rw-time.inc.php @@ -18,14 +18,14 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Read', - 'ds' => 'rtime', + 'descr' => 'Read', + 'ds' => 'rtime', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Write', - 'ds' => 'wtime', - 'invert' => true, + 'descr' => 'Write', + 'ds' => 'wtime', + 'invert' => true, ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/hv-monitor_disk-size.inc.php b/includes/html/graphs/application/hv-monitor_disk-size.inc.php index 370fcba4ea..aa3bf64de2 100644 --- a/includes/html/graphs/application/hv-monitor_disk-size.inc.php +++ b/includes/html/graphs/application/hv-monitor_disk-size.inc.php @@ -14,18 +14,18 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Allocated', - 'ds' => 'alloc', + 'descr' => 'Allocated', + 'ds' => 'alloc', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'In Use', - 'ds' => 'in_use', + 'descr' => 'In Use', + 'ds' => 'in_use', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'On Disk', - 'ds' => 'on_disk', + 'descr' => 'On Disk', + 'ds' => 'on_disk', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/hv-monitor_disk-size2.inc.php b/includes/html/graphs/application/hv-monitor_disk-size2.inc.php index 139c09892f..35c104feff 100644 --- a/includes/html/graphs/application/hv-monitor_disk-size2.inc.php +++ b/includes/html/graphs/application/hv-monitor_disk-size2.inc.php @@ -18,18 +18,18 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Allocated', - 'ds' => 'disk_alloc', + 'descr' => 'Allocated', + 'ds' => 'disk_alloc', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'In Use', - 'ds' => 'disk_in_use', + 'descr' => 'In Use', + 'ds' => 'disk_in_use', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'On Disk', - 'ds' => 'disk_on_disk', + 'descr' => 'On Disk', + 'ds' => 'disk_on_disk', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/hv-monitor_flt.inc.php b/includes/html/graphs/application/hv-monitor_flt.inc.php index 872b6f2d45..4138afa7fc 100644 --- a/includes/html/graphs/application/hv-monitor_flt.inc.php +++ b/includes/html/graphs/application/hv-monitor_flt.inc.php @@ -18,13 +18,13 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Major', - 'ds' => 'majflt', + 'descr' => 'Major', + 'ds' => 'majflt', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Minor', - 'ds' => 'minflt', + 'descr' => 'Minor', + 'ds' => 'minflt', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/hv-monitor_memory.inc.php b/includes/html/graphs/application/hv-monitor_memory.inc.php index a95584ede2..42426fb33b 100644 --- a/includes/html/graphs/application/hv-monitor_memory.inc.php +++ b/includes/html/graphs/application/hv-monitor_memory.inc.php @@ -18,13 +18,13 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Allocated', - 'ds' => 'mem_alloc', + 'descr' => 'Allocated', + 'ds' => 'mem_alloc', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'RSS', - 'ds' => 'rss', + 'descr' => 'RSS', + 'ds' => 'rss', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/hv-monitor_net-bytes.inc.php b/includes/html/graphs/application/hv-monitor_net-bytes.inc.php index e9253dee4a..7a527a395e 100644 --- a/includes/html/graphs/application/hv-monitor_net-bytes.inc.php +++ b/includes/html/graphs/application/hv-monitor_net-bytes.inc.php @@ -20,14 +20,14 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'In', - 'ds' => 'ibytes', + 'descr' => 'In', + 'ds' => 'ibytes', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Out', - 'ds' => 'obytes', - 'invert' => true, + 'descr' => 'Out', + 'ds' => 'obytes', + 'invert' => true, ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/hv-monitor_net-drops.inc.php b/includes/html/graphs/application/hv-monitor_net-drops.inc.php index 6129eb6248..265369a707 100644 --- a/includes/html/graphs/application/hv-monitor_net-drops.inc.php +++ b/includes/html/graphs/application/hv-monitor_net-drops.inc.php @@ -20,14 +20,14 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'In', - 'ds' => 'idrop', + 'descr' => 'In', + 'ds' => 'idrop', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Out', - 'ds' => 'odrop', - 'invert' => true, + 'descr' => 'Out', + 'ds' => 'odrop', + 'invert' => true, ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/hv-monitor_net-errs.inc.php b/includes/html/graphs/application/hv-monitor_net-errs.inc.php index 3de9ad7a99..ad9e06a708 100644 --- a/includes/html/graphs/application/hv-monitor_net-errs.inc.php +++ b/includes/html/graphs/application/hv-monitor_net-errs.inc.php @@ -20,14 +20,14 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'In', - 'ds' => 'ierrs', + 'descr' => 'In', + 'ds' => 'ierrs', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Out', - 'ds' => 'oerrs', - 'invert' => true, + 'descr' => 'Out', + 'ds' => 'oerrs', + 'invert' => true, ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/hv-monitor_net-pkts.inc.php b/includes/html/graphs/application/hv-monitor_net-pkts.inc.php index f1c2c007f6..0eff476fd3 100644 --- a/includes/html/graphs/application/hv-monitor_net-pkts.inc.php +++ b/includes/html/graphs/application/hv-monitor_net-pkts.inc.php @@ -20,14 +20,14 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'In', - 'ds' => 'ipkts', + 'descr' => 'In', + 'ds' => 'ipkts', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Out', - 'ds' => 'opkts', - 'invert' => true, + 'descr' => 'Out', + 'ds' => 'opkts', + 'invert' => true, ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/hv-monitor_pmem.inc.php b/includes/html/graphs/application/hv-monitor_pmem.inc.php index b3fb4190cb..9add8d522e 100644 --- a/includes/html/graphs/application/hv-monitor_pmem.inc.php +++ b/includes/html/graphs/application/hv-monitor_pmem.inc.php @@ -18,8 +18,8 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Mem%', - 'ds' => 'pmem', + 'descr' => 'Mem%', + 'ds' => 'pmem', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/hv-monitor_status-int.inc.php b/includes/html/graphs/application/hv-monitor_status-int.inc.php index cfacbf52de..a75055a000 100644 --- a/includes/html/graphs/application/hv-monitor_status-int.inc.php +++ b/includes/html/graphs/application/hv-monitor_status-int.inc.php @@ -18,8 +18,8 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Status', - 'ds' => 'status_int', + 'descr' => 'Status', + 'ds' => 'status_int', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/hv-monitor_status.inc.php b/includes/html/graphs/application/hv-monitor_status.inc.php index 50dce1a01e..4fe5177f8f 100644 --- a/includes/html/graphs/application/hv-monitor_status.inc.php +++ b/includes/html/graphs/application/hv-monitor_status.inc.php @@ -18,53 +18,53 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'On', - 'ds' => 'on', + 'descr' => 'On', + 'ds' => 'on', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Off', - 'ds' => 'off', + 'descr' => 'Off', + 'ds' => 'off', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Off, Hard', - 'ds' => 'off_hard', + 'descr' => 'Off, Hard', + 'ds' => 'off_hard', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Off, Soft', - 'ds' => 'off_soft', + 'descr' => 'Off, Soft', + 'ds' => 'off_soft', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Unknown', - 'ds' => 'unknown', + 'descr' => 'Unknown', + 'ds' => 'unknown', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Paused', - 'ds' => 'paused', + 'descr' => 'Paused', + 'ds' => 'paused', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Crashed', - 'ds' => 'crashed', + 'descr' => 'Crashed', + 'ds' => 'crashed', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Blocked', - 'ds' => 'blocked', + 'descr' => 'Blocked', + 'ds' => 'blocked', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'No State', - 'ds' => 'nostate', + 'descr' => 'No State', + 'ds' => 'nostate', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'PM Suspended', - 'ds' => 'pmsuspended', + 'descr' => 'PM Suspended', + 'ds' => 'pmsuspended', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/hv-monitor_time.inc.php b/includes/html/graphs/application/hv-monitor_time.inc.php index 49e7272639..13c573c27e 100644 --- a/includes/html/graphs/application/hv-monitor_time.inc.php +++ b/includes/html/graphs/application/hv-monitor_time.inc.php @@ -18,13 +18,13 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'User', - 'ds' => 'usertime', + 'descr' => 'User', + 'ds' => 'usertime', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Sys', - 'ds' => 'systime', + 'descr' => 'Sys', + 'ds' => 'systime', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/linux_config_files_number_of_confs.inc.php b/includes/html/graphs/application/linux_config_files_number_of_confs.inc.php index 677ab68f00..1408907fa1 100644 --- a/includes/html/graphs/application/linux_config_files_number_of_confs.inc.php +++ b/includes/html/graphs/application/linux_config_files_number_of_confs.inc.php @@ -20,12 +20,12 @@ $rrd_filename = Rrd::name($device['hostname'], [ if (Rrd::checkRrdExists($rrd_filename)) { foreach ($rrdArray as $rrdVar => $rrdValues) { $rrd_list[] = [ - 'cdef_rpn' => $rrdValues['cdef_rpn'] ?? null, - 'colour' => $rrdValues['colour'] ?? null, - 'descr' => $rrdValues['descr'], - 'divider' => $rrdValues['divider'] ?? null, - 'ds' => $rrdVar, - 'filename' => $rrd_filename, + 'cdef_rpn' => $rrdValues['cdef_rpn'] ?? null, + 'colour' => $rrdValues['colour'] ?? null, + 'descr' => $rrdValues['descr'], + 'divider' => $rrdValues['divider'] ?? null, + 'ds' => $rrdVar, + 'filename' => $rrd_filename, 'multiplier' => $rrdValues['multiplier'] ?? null, ]; } diff --git a/includes/html/graphs/application/linux_softnet_stat_budget.inc.php b/includes/html/graphs/application/linux_softnet_stat_budget.inc.php index ca03196a13..faba3819ac 100644 --- a/includes/html/graphs/application/linux_softnet_stat_budget.inc.php +++ b/includes/html/graphs/application/linux_softnet_stat_budget.inc.php @@ -14,13 +14,13 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Budget', - 'ds' => 'budget', + 'descr' => 'Budget', + 'ds' => 'budget', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Budget usecs', - 'ds' => 'budget_usecs', + 'descr' => 'Budget usecs', + 'ds' => 'budget_usecs', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/logsize_combined_stats.inc.php b/includes/html/graphs/application/logsize_combined_stats.inc.php index f3d50b25e9..c5ea1def4e 100644 --- a/includes/html/graphs/application/logsize_combined_stats.inc.php +++ b/includes/html/graphs/application/logsize_combined_stats.inc.php @@ -16,28 +16,28 @@ $rrd_list = []; if (Rrd::checkRrdExists($filename)) { $rrd_list[] = [ 'filename' => $filename, - 'descr' => 'Max Size', - 'ds' => 'max_size', + 'descr' => 'Max Size', + 'ds' => 'max_size', ]; $rrd_list[] = [ 'filename' => $filename, - 'descr' => 'Mean Size', - 'ds' => 'mean_size', + 'descr' => 'Mean Size', + 'ds' => 'mean_size', ]; $rrd_list[] = [ 'filename' => $filename, - 'descr' => 'Median Size', - 'ds' => 'median_size', + 'descr' => 'Median Size', + 'ds' => 'median_size', ]; $rrd_list[] = [ 'filename' => $filename, - 'descr' => 'Mode Size', - 'ds' => 'mode_size', + 'descr' => 'Mode Size', + 'ds' => 'mode_size', ]; $rrd_list[] = [ 'filename' => $filename, - 'descr' => 'Min Size', - 'ds' => 'min_size', + 'descr' => 'Min Size', + 'ds' => 'min_size', ]; } else { d_echo('RRD "' . $filename . '" not found'); diff --git a/includes/html/graphs/application/logsize_log_sizes.inc.php b/includes/html/graphs/application/logsize_log_sizes.inc.php index beedca7739..9aa239fd80 100644 --- a/includes/html/graphs/application/logsize_log_sizes.inc.php +++ b/includes/html/graphs/application/logsize_log_sizes.inc.php @@ -19,8 +19,8 @@ foreach ($log_files as $index => $log_file) { $rrd_filename = Rrd::name($device['hostname'], ['app', $name, $app['app_id'], $vars['log_set'] . '_____-_____' . $log_file]); $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => $log_file, - 'ds' => 'size', + 'descr' => $log_file, + 'ds' => 'size', ]; } diff --git a/includes/html/graphs/application/logsize_set_sizes.inc.php b/includes/html/graphs/application/logsize_set_sizes.inc.php index 4c32141e4f..cbeb8cbf6c 100644 --- a/includes/html/graphs/application/logsize_set_sizes.inc.php +++ b/includes/html/graphs/application/logsize_set_sizes.inc.php @@ -18,8 +18,8 @@ foreach ($log_sets as $index => $log_set) { $rrd_filename = Rrd::name($device['hostname'], ['app', $name, $app['app_id'], $log_set]); $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => $log_set, - 'ds' => 'size', + 'descr' => $log_set, + 'ds' => 'size', ]; } } diff --git a/includes/html/graphs/application/mailscanner_reject.inc.php b/includes/html/graphs/application/mailscanner_reject.inc.php index efcfc0dbcb..a94fd0a2f3 100644 --- a/includes/html/graphs/application/mailscanner_reject.inc.php +++ b/includes/html/graphs/application/mailscanner_reject.inc.php @@ -9,8 +9,8 @@ $unit_text = 'Messages/sec'; $rrd_filename = Rrd::name($device['hostname'], ['app', 'mailscannerV2', $app->app_id]); $array = [ 'msg_rejected' => ['descr' => 'Rejected'], - 'msg_relay' => ['descr' => 'Relayed'], - 'msg_waiting' => ['descr' => 'Waiting'], + 'msg_relay' => ['descr' => 'Relayed'], + 'msg_waiting' => ['descr' => 'Waiting'], ]; $i = 0; diff --git a/includes/html/graphs/application/mailscanner_spam.inc.php b/includes/html/graphs/application/mailscanner_spam.inc.php index 921b37ee6c..efa60eea06 100644 --- a/includes/html/graphs/application/mailscanner_spam.inc.php +++ b/includes/html/graphs/application/mailscanner_spam.inc.php @@ -7,12 +7,12 @@ $nototal = (($width < 550) ? 1 : 0); $unit_text = 'Messages/sec'; $rrd_filename = Rrd::name($device['hostname'], ['app', 'mailscannerV2', $app->app_id]); $array = [ - 'spam' => [ - 'descr' => 'Spam', + 'spam' => [ + 'descr' => 'Spam', 'colour' => 'FF8800', ], 'virus' => [ - 'descr' => 'Virus', + 'descr' => 'Virus', 'colour' => 'FF0000', ], ]; diff --git a/includes/html/graphs/application/mdadm-common.inc.php b/includes/html/graphs/application/mdadm-common.inc.php index 8cba1bbe12..b7a5bb44d0 100644 --- a/includes/html/graphs/application/mdadm-common.inc.php +++ b/includes/html/graphs/application/mdadm-common.inc.php @@ -23,8 +23,8 @@ while (isset($arrays[$int])) { if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => $array, - 'ds' => $rrdVar, + 'descr' => $array, + 'ds' => $rrdVar, ]; } $int++; diff --git a/includes/html/graphs/application/memcached_data.inc.php b/includes/html/graphs/application/memcached_data.inc.php index 944bf59a4f..36e57a2c21 100644 --- a/includes/html/graphs/application/memcached_data.inc.php +++ b/includes/html/graphs/application/memcached_data.inc.php @@ -9,12 +9,12 @@ $nototal = 0; $unit_text = 'Packets/sec'; $array = [ 'limit_maxbytes' => [ - 'descr' => 'Capacity', + 'descr' => 'Capacity', 'colour' => '555555', ], - 'bytes' => [ - 'descr' => 'Used', - 'colour' => 'cc0000', + 'bytes' => [ + 'descr' => 'Used', + 'colour' => 'cc0000', 'areacolour' => 'ff999955', ], ]; diff --git a/includes/html/graphs/application/memcached_hitmiss.inc.php b/includes/html/graphs/application/memcached_hitmiss.inc.php index df5a7423be..95272f66e0 100644 --- a/includes/html/graphs/application/memcached_hitmiss.inc.php +++ b/includes/html/graphs/application/memcached_hitmiss.inc.php @@ -8,12 +8,12 @@ $colours = 'mixed'; $nototal = 0; $unit_text = 'Hits/Misses'; $array = [ - 'get_hits' => [ - 'descr' => 'Hits', + 'get_hits' => [ + 'descr' => 'Hits', 'colour' => '555555', ], 'get_misses' => [ - 'descr' => 'Misses', + 'descr' => 'Misses', 'colour' => 'cc0000', ], ]; diff --git a/includes/html/graphs/application/memcached_items.inc.php b/includes/html/graphs/application/memcached_items.inc.php index 44cc5fe2de..b269b4618d 100644 --- a/includes/html/graphs/application/memcached_items.inc.php +++ b/includes/html/graphs/application/memcached_items.inc.php @@ -9,7 +9,7 @@ $nototal = 0; $unit_text = 'Items'; $array = [ 'curr_items' => [ - 'descr' => 'Items', + 'descr' => 'Items', 'colour' => '555555', ], ]; diff --git a/includes/html/graphs/application/mojo_cape_submit-size_stats.inc.php b/includes/html/graphs/application/mojo_cape_submit-size_stats.inc.php index fa3bc03512..067e621334 100644 --- a/includes/html/graphs/application/mojo_cape_submit-size_stats.inc.php +++ b/includes/html/graphs/application/mojo_cape_submit-size_stats.inc.php @@ -18,28 +18,28 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Max', - 'ds' => 'size_max', + 'descr' => 'Max', + 'ds' => 'size_max', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Mean', - 'ds' => 'size_mean', + 'descr' => 'Mean', + 'ds' => 'size_mean', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Median', - 'ds' => 'size_median', + 'descr' => 'Median', + 'ds' => 'size_median', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Mode', - 'ds' => 'size_mode', + 'descr' => 'Mode', + 'ds' => 'size_mode', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Min', - 'ds' => 'size_min', + 'descr' => 'Min', + 'ds' => 'size_min', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/mojo_cape_submit-subs_top12.inc.php b/includes/html/graphs/application/mojo_cape_submit-subs_top12.inc.php index e3c56a9737..5ed0000798 100644 --- a/includes/html/graphs/application/mojo_cape_submit-subs_top12.inc.php +++ b/includes/html/graphs/application/mojo_cape_submit-subs_top12.inc.php @@ -19,8 +19,8 @@ foreach ($slugs as $index => $slug) { $rrd_filename = Rrd::name($device['hostname'], ['app', $name, $app->app_id, 'slugs___-___' . $slug]); $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => $slug, - 'ds' => 'sub_count', + 'descr' => $slug, + 'ds' => 'sub_count', ]; } diff --git a/includes/html/graphs/application/mysql_command_counters.inc.php b/includes/html/graphs/application/mysql_command_counters.inc.php index a1f5ed4352..960c699d5a 100644 --- a/includes/html/graphs/application/mysql_command_counters.inc.php +++ b/includes/html/graphs/application/mysql_command_counters.inc.php @@ -5,40 +5,40 @@ require 'includes/html/graphs/common.inc.php'; $rrd_filename = Rrd::name($device['hostname'], ['app', 'mysql', $app->app_id]); $array = [ - 'CDe' => [ - 'descr' => 'Delete', + 'CDe' => [ + 'descr' => 'Delete', 'colour' => '22FF22', ], - 'CIt' => [ - 'descr' => 'Insert', + 'CIt' => [ + 'descr' => 'Insert', 'colour' => '0022FF', ], 'CISt' => [ - 'descr' => 'Insert Select', + 'descr' => 'Insert Select', 'colour' => 'FF0000', ], - 'CLd' => [ - 'descr' => 'Load Data', + 'CLd' => [ + 'descr' => 'Load Data', 'colour' => '00AAAA', ], - 'CRe' => [ - 'descr' => 'Replace', + 'CRe' => [ + 'descr' => 'Replace', 'colour' => 'FF00FF', ], 'CRSt' => [ - 'descr' => 'Replace Select', + 'descr' => 'Replace Select', 'colour' => 'FFA500', ], - 'CSt' => [ - 'descr' => 'Select', + 'CSt' => [ + 'descr' => 'Select', 'colour' => 'CC0000', ], - 'CUe' => [ - 'descr' => 'Update', + 'CUe' => [ + 'descr' => 'Update', 'colour' => '0000CC', ], 'CUMi' => [ - 'descr' => 'Update Multiple', + 'descr' => 'Update Multiple', 'colour' => '0080C0', ], ]; diff --git a/includes/html/graphs/application/mysql_connections.inc.php b/includes/html/graphs/application/mysql_connections.inc.php index 7c0f2bbdb9..ea7af0036e 100644 --- a/includes/html/graphs/application/mysql_connections.inc.php +++ b/includes/html/graphs/application/mysql_connections.inc.php @@ -7,27 +7,27 @@ $rrd_filename = Rrd::name($device['hostname'], ['app', 'mysql', $app->app_id]); $array = [ 'MaCs' => [ - 'descr' => 'Max Connections', + 'descr' => 'Max Connections', 'colour' => '22FF22', ], 'MUCs' => [ - 'descr' => 'Max Used Connections', + 'descr' => 'Max Used Connections', 'colour' => '0022FF', ], - 'ACs' => [ - 'descr' => 'Aborted Clients', + 'ACs' => [ + 'descr' => 'Aborted Clients', 'colour' => 'FF0000', ], 'AdCs' => [ - 'descr' => 'Aborted Connects', + 'descr' => 'Aborted Connects', 'colour' => '0080C0', ], - 'TCd' => [ - 'descr' => 'Threads Connected', + 'TCd' => [ + 'descr' => 'Threads Connected', 'colour' => 'FF0000', ], - 'Cs' => [ - 'descr' => 'New Connections', + 'Cs' => [ + 'descr' => 'New Connections', 'colour' => '0080C0', ], ]; diff --git a/includes/html/graphs/application/mysql_files_tables.inc.php b/includes/html/graphs/application/mysql_files_tables.inc.php index d46066c285..fda56cf704 100644 --- a/includes/html/graphs/application/mysql_files_tables.inc.php +++ b/includes/html/graphs/application/mysql_files_tables.inc.php @@ -5,9 +5,9 @@ require 'includes/html/graphs/common.inc.php'; $rrd_filename = Rrd::name($device['hostname'], ['app', 'mysql', $app->app_id]); $array = [ - 'TOC' => ['descr' => 'Table Cache'], - 'OFs' => ['descr' => 'Open Files'], - 'OTs' => ['descr' => 'Open Tables'], + 'TOC' => ['descr' => 'Table Cache'], + 'OFs' => ['descr' => 'Open Files'], + 'OTs' => ['descr' => 'Open Tables'], 'OdTs' => ['descr' => 'Opened Tables'], ]; diff --git a/includes/html/graphs/application/mysql_innodb_buffer_pool.inc.php b/includes/html/graphs/application/mysql_innodb_buffer_pool.inc.php index dc1f7a1416..b330724f28 100644 --- a/includes/html/graphs/application/mysql_innodb_buffer_pool.inc.php +++ b/includes/html/graphs/application/mysql_innodb_buffer_pool.inc.php @@ -5,9 +5,9 @@ require 'includes/html/graphs/common.inc.php'; $rrd_filename = Rrd::name($device['hostname'], ['app', 'mysql', $app->app_id]); $array = [ - 'IBPse' => 'Buffer Pool Size', + 'IBPse' => 'Buffer Pool Size', 'IBPDBp' => 'Database Pages', - 'IBPFe' => 'Free Pages', + 'IBPFe' => 'Free Pages', 'IBPMps' => 'Modified Pages', ]; diff --git a/includes/html/graphs/application/mysql_innodb_insert_buffer.inc.php b/includes/html/graphs/application/mysql_innodb_insert_buffer.inc.php index 08c300a486..7c263aa8b8 100644 --- a/includes/html/graphs/application/mysql_innodb_insert_buffer.inc.php +++ b/includes/html/graphs/application/mysql_innodb_insert_buffer.inc.php @@ -5,9 +5,9 @@ require 'includes/html/graphs/common.inc.php'; $rrd_filename = Rrd::name($device['hostname'], ['app', 'mysql', $app->app_id]); $array = [ - 'IBIIs' => 'Inserts', + 'IBIIs' => 'Inserts', 'IBIMRd' => 'Merged Records', - 'IBIMs' => 'Merges', + 'IBIMs' => 'Merges', ]; $i = 0; diff --git a/includes/html/graphs/application/mysql_innodb_io_pending.inc.php b/includes/html/graphs/application/mysql_innodb_io_pending.inc.php index d73d4377eb..547303b43e 100644 --- a/includes/html/graphs/application/mysql_innodb_io_pending.inc.php +++ b/includes/html/graphs/application/mysql_innodb_io_pending.inc.php @@ -7,12 +7,12 @@ $rrd_filename = Rrd::name($device['hostname'], ['app', 'mysql', $app->app_id]); $array = [ 'IBILog' => 'AIO Log', - 'IBISc' => 'AIO Sync', + 'IBISc' => 'AIO Sync', 'IBIFLg' => 'Buf Pool Flush', - 'IBFBl' => 'Log Flushes', + 'IBFBl' => 'Log Flushes', 'IBIIAo' => 'Insert Buf AIO Read', - 'IBIAd' => 'Normal AIO Read', - 'IBIAe' => 'Normal AIO Writes', + 'IBIAd' => 'Normal AIO Read', + 'IBIAe' => 'Normal AIO Writes', ]; $i = 0; diff --git a/includes/html/graphs/application/mysql_myisam_indexes.inc.php b/includes/html/graphs/application/mysql_myisam_indexes.inc.php index 91a2656633..f235a9c4a2 100644 --- a/includes/html/graphs/application/mysql_myisam_indexes.inc.php +++ b/includes/html/graphs/application/mysql_myisam_indexes.inc.php @@ -6,9 +6,9 @@ $rrd_filename = Rrd::name($device['hostname'], ['app', 'mysql', $app->app_id]); $array = [ 'KRRs' => 'read requests', - 'KRs' => 'reads', - 'KWR' => 'write requests', - 'KWs' => 'writes', + 'KRs' => 'reads', + 'KWR' => 'write requests', + 'KWs' => 'writes', ]; $i = 0; diff --git a/includes/html/graphs/application/mysql_query_cache_memory.inc.php b/includes/html/graphs/application/mysql_query_cache_memory.inc.php index 797fa07b9a..379f61f2b1 100644 --- a/includes/html/graphs/application/mysql_query_cache_memory.inc.php +++ b/includes/html/graphs/application/mysql_query_cache_memory.inc.php @@ -5,7 +5,7 @@ require 'includes/html/graphs/common.inc.php'; $rrd_filename = Rrd::name($device['hostname'], ['app', 'mysql', $app->app_id]); $array = [ - 'QCs' => 'Cache size', + 'QCs' => 'Cache size', 'QCeFy' => 'Free mem', ]; diff --git a/includes/html/graphs/application/mysql_select_types.inc.php b/includes/html/graphs/application/mysql_select_types.inc.php index 037115dda2..a255442d80 100644 --- a/includes/html/graphs/application/mysql_select_types.inc.php +++ b/includes/html/graphs/application/mysql_select_types.inc.php @@ -5,11 +5,11 @@ require 'includes/html/graphs/common.inc.php'; $rrd_filename = Rrd::name($device['hostname'], ['app', 'mysql', $app->app_id]); $array = [ - 'SFJn' => 'Full Join', + 'SFJn' => 'Full Join', 'SFRJn' => 'Full Range', - 'SRe' => 'Range', - 'SRCk' => 'Range Check', - 'SSn' => 'Scan', + 'SRe' => 'Range', + 'SRCk' => 'Range Check', + 'SSn' => 'Scan', ]; $i = 0; diff --git a/includes/html/graphs/application/mysql_sorts.inc.php b/includes/html/graphs/application/mysql_sorts.inc.php index d1b2340c69..74020641e3 100644 --- a/includes/html/graphs/application/mysql_sorts.inc.php +++ b/includes/html/graphs/application/mysql_sorts.inc.php @@ -5,10 +5,10 @@ require 'includes/html/graphs/common.inc.php'; $rrd_filename = Rrd::name($device['hostname'], ['app', 'mysql', $app->app_id]); $array = [ - 'SRows' => 'Rows Sorted', + 'SRows' => 'Rows Sorted', 'SRange' => 'Range', - 'SMPs' => 'Merge Passes', - 'SScan' => 'Scan', + 'SMPs' => 'Merge Passes', + 'SScan' => 'Scan', ]; $i = 0; diff --git a/includes/html/graphs/application/mysql_status.inc.php b/includes/html/graphs/application/mysql_status.inc.php index c45f02e468..5b082ecbe8 100644 --- a/includes/html/graphs/application/mysql_status.inc.php +++ b/includes/html/graphs/application/mysql_status.inc.php @@ -5,22 +5,22 @@ require 'includes/html/graphs/common.inc.php'; $rrd_filename = Rrd::name($device['hostname'], ['app', 'mysql', $app->app_id, 'status']); $array = [ - 'State_closing_tables' => 'd2', + 'State_closing_tables' => 'd2', 'State_copying_to_tmp_table' => 'd3', - 'State_end' => 'd4', - 'State_freeing_items' => 'd5', - 'State_init' => 'd6', - 'State_locked' => 'd7', - 'State_login' => 'd8', - 'State_preparing' => 'd9', - 'State_reading_from_net' => 'da', - 'State_sending_data' => 'db', - 'State_sorting_result' => 'dc', - 'State_statistics' => 'dd', - 'State_updating' => 'de', - 'State_writing_to_net' => 'df', - 'State_none' => 'dg', - 'State_other' => 'dh', + 'State_end' => 'd4', + 'State_freeing_items' => 'd5', + 'State_init' => 'd6', + 'State_locked' => 'd7', + 'State_login' => 'd8', + 'State_preparing' => 'd9', + 'State_reading_from_net' => 'da', + 'State_sending_data' => 'db', + 'State_sorting_result' => 'dc', + 'State_statistics' => 'dd', + 'State_updating' => 'de', + 'State_writing_to_net' => 'df', + 'State_none' => 'dg', + 'State_other' => 'dh', ]; $i = 0; diff --git a/includes/html/graphs/application/mysql_temporary_objects.inc.php b/includes/html/graphs/application/mysql_temporary_objects.inc.php index 87f24ba290..bb8fc88ce8 100644 --- a/includes/html/graphs/application/mysql_temporary_objects.inc.php +++ b/includes/html/graphs/application/mysql_temporary_objects.inc.php @@ -6,8 +6,8 @@ $rrd_filename = Rrd::name($device['hostname'], ['app', 'mysql', $app->app_id]); $array = [ 'CTMPDTs' => 'disk tables', - 'CTMPTs' => 'tables', - 'CTMPFs' => 'files', + 'CTMPTs' => 'tables', + 'CTMPFs' => 'files', ]; $i = 0; diff --git a/includes/html/graphs/application/nfs-stats.inc.php b/includes/html/graphs/application/nfs-stats.inc.php index 7bffaa6ff2..3f140a031e 100644 --- a/includes/html/graphs/application/nfs-stats.inc.php +++ b/includes/html/graphs/application/nfs-stats.inc.php @@ -12,63 +12,63 @@ $printtotal = 0; $rrd_filename = Rrd::dirFromHost($device['hostname']) . '/app-nfsstats-' . $app->app_id . '.rrd'; $array = [ 'total' => [ - 'descr' => 'Total', + 'descr' => 'Total', 'colour' => '000000', ], 'null' => [ - 'descr' => 'NULL', + 'descr' => 'NULL', 'colour' => '630606', ], 'getattr' => [ - 'descr' => 'Get attributes', + 'descr' => 'Get attributes', 'colour' => '50C150', ], 'setattr' => [ - 'descr' => 'Set attributes', + 'descr' => 'Set attributes', 'colour' => '4D65A2', ], 'lookup' => [ - 'descr' => 'Lookup', + 'descr' => 'Lookup', 'colour' => '8B64A1', ], 'access' => [ - 'descr' => 'Access', + 'descr' => 'Access', 'colour' => 'AAAA39', ], 'read' => [ - 'descr' => 'Read', + 'descr' => 'Read', 'colour' => '', ], 'write' => [ - 'descr' => 'Write', + 'descr' => 'Write', 'colour' => '457A9A', ], 'create' => [ - 'descr' => 'Create', + 'descr' => 'Create', 'colour' => '690D87', ], 'mkdir' => [ - 'descr' => 'Make dir', + 'descr' => 'Make dir', 'colour' => '072A3F', ], 'remove' => [ - 'descr' => 'Remove', + 'descr' => 'Remove', 'colour' => 'F16464', ], 'rmdir' => [ - 'descr' => 'Remove dir', + 'descr' => 'Remove dir', 'colour' => '57162D', ], 'rename' => [ - 'descr' => 'Rename', + 'descr' => 'Rename', 'colour' => 'A40B62', ], 'readdirplus' => [ - 'descr' => 'Read dir plus', + 'descr' => 'Read dir plus', 'colour' => 'F1F164', ], 'fsstat' => [ - 'descr' => 'FS stat', + 'descr' => 'FS stat', 'colour' => 'F1F191', ], ]; diff --git a/includes/html/graphs/application/nginx_connections.inc.php b/includes/html/graphs/application/nginx_connections.inc.php index b81279b3ff..6729d6aa38 100644 --- a/includes/html/graphs/application/nginx_connections.inc.php +++ b/includes/html/graphs/application/nginx_connections.inc.php @@ -8,19 +8,19 @@ $rrd_filename = Rrd::name($device['hostname'], ['app', 'nginx', $app->app_id]); $array = [ 'Reading' => [ - 'descr' => 'Reading', + 'descr' => 'Reading', 'colour' => '750F7DFF', ], 'Writing' => [ - 'descr' => 'Writing', + 'descr' => 'Writing', 'colour' => '00FF00FF', ], 'Waiting' => [ - 'descr' => 'Waiting', + 'descr' => 'Waiting', 'colour' => '4444FFFF', ], - 'Active' => [ - 'descr' => 'Starting', + 'Active' => [ + 'descr' => 'Starting', 'colour' => '157419FF', ], ]; diff --git a/includes/html/graphs/application/ntp-client_stats.inc.php b/includes/html/graphs/application/ntp-client_stats.inc.php index 0a276a36f5..3149a2064a 100644 --- a/includes/html/graphs/application/ntp-client_stats.inc.php +++ b/includes/html/graphs/application/ntp-client_stats.inc.php @@ -7,9 +7,9 @@ $nototal = (($width < 224) ? 1 : 0); $unit_text = 'Milliseconds'; $rrd_filename = Rrd::name($device['hostname'], ['app', 'ntp-client', $app->app_id]); $array = [ - 'offset' => ['descr' => 'Offset'], - 'jitter' => ['descr' => 'Jitter'], - 'noise' => ['descr' => 'Noise'], + 'offset' => ['descr' => 'Offset'], + 'jitter' => ['descr' => 'Jitter'], + 'noise' => ['descr' => 'Noise'], 'stability' => ['descr' => 'Stability'], ]; diff --git a/includes/html/graphs/application/ntp-server_packets.inc.php b/includes/html/graphs/application/ntp-server_packets.inc.php index ad3f2466a0..f8bec12123 100644 --- a/includes/html/graphs/application/ntp-server_packets.inc.php +++ b/includes/html/graphs/application/ntp-server_packets.inc.php @@ -7,12 +7,12 @@ $nototal = (($width < 224) ? 1 : 0); $unit_text = 'Packets'; $rrd_filename = Rrd::name($device['hostname'], ['app', 'ntp-server', $app->app_id]); $array = [ - 'packets_drop' => [ - 'descr' => 'Dropped', + 'packets_drop' => [ + 'descr' => 'Dropped', 'colour' => '880000FF', ], 'packets_ignore' => [ - 'descr' => 'Ignored', + 'descr' => 'Ignored', 'colour' => 'FF8800FF', ], ]; diff --git a/includes/html/graphs/application/ntp-server_stats.inc.php b/includes/html/graphs/application/ntp-server_stats.inc.php index f389fce999..e489eba740 100644 --- a/includes/html/graphs/application/ntp-server_stats.inc.php +++ b/includes/html/graphs/application/ntp-server_stats.inc.php @@ -7,9 +7,9 @@ $nototal = (($width < 224) ? 1 : 0); $unit_text = 'Milliseconds'; $rrd_filename = Rrd::name($device['hostname'], ['app', 'ntp-server', $app->app_id]); $array = [ - 'offset' => ['descr' => 'Offset'], - 'jitter' => ['descr' => 'Jitter'], - 'noise' => ['descr' => 'Noise'], + 'offset' => ['descr' => 'Offset'], + 'jitter' => ['descr' => 'Jitter'], + 'noise' => ['descr' => 'Noise'], 'stability' => ['descr' => 'Stability'], ]; diff --git a/includes/html/graphs/application/nvidia-common.inc.php b/includes/html/graphs/application/nvidia-common.inc.php index 6f3213d191..aeb168b1e7 100644 --- a/includes/html/graphs/application/nvidia-common.inc.php +++ b/includes/html/graphs/application/nvidia-common.inc.php @@ -18,8 +18,8 @@ if (! Rrd::checkRrdExists($rrd_filename)) { while (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'GPU ' . $int, - 'ds' => $rrdVar, + 'descr' => 'GPU ' . $int, + 'ds' => $rrdVar, ]; $int++; diff --git a/includes/html/graphs/application/opensearch_c_act_pri_shards.inc.php b/includes/html/graphs/application/opensearch_c_act_pri_shards.inc.php index 663f4b9f0e..9edd143b6d 100644 --- a/includes/html/graphs/application/opensearch_c_act_pri_shards.inc.php +++ b/includes/html/graphs/application/opensearch_c_act_pri_shards.inc.php @@ -14,8 +14,8 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'ActPri Shards', - 'ds' => 'c_act_pri_shards', + 'descr' => 'ActPri Shards', + 'ds' => 'c_act_pri_shards', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/opensearch_c_act_shards.inc.php b/includes/html/graphs/application/opensearch_c_act_shards.inc.php index e33cddf0ec..6b52f53653 100644 --- a/includes/html/graphs/application/opensearch_c_act_shards.inc.php +++ b/includes/html/graphs/application/opensearch_c_act_shards.inc.php @@ -14,8 +14,8 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Act Shards', - 'ds' => 'c_act_pri_shards', + 'descr' => 'Act Shards', + 'ds' => 'c_act_pri_shards', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/opensearch_c_act_shards_perc.inc.php b/includes/html/graphs/application/opensearch_c_act_shards_perc.inc.php index 51f19fac94..1f7c740770 100644 --- a/includes/html/graphs/application/opensearch_c_act_shards_perc.inc.php +++ b/includes/html/graphs/application/opensearch_c_act_shards_perc.inc.php @@ -14,8 +14,8 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Act Shards %', - 'ds' => 'c_act_shards_perc', + 'descr' => 'Act Shards %', + 'ds' => 'c_act_shards_perc', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/opensearch_c_all_shards.inc.php b/includes/html/graphs/application/opensearch_c_all_shards.inc.php index 63f887c7bc..07fa0dc2a9 100644 --- a/includes/html/graphs/application/opensearch_c_all_shards.inc.php +++ b/includes/html/graphs/application/opensearch_c_all_shards.inc.php @@ -14,33 +14,33 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Active Primary', - 'ds' => 'c_act_pri_shards', + 'descr' => 'Active Primary', + 'ds' => 'c_act_pri_shards', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Active', - 'ds' => 'c_act_shards', + 'descr' => 'Active', + 'ds' => 'c_act_shards', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Relocating', - 'ds' => 'c_rel_shards', + 'descr' => 'Relocating', + 'ds' => 'c_rel_shards', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Initializing', - 'ds' => 'c_init_shards', + 'descr' => 'Initializing', + 'ds' => 'c_init_shards', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Delayed Unass.', - 'ds' => 'c_delayed_shards', + 'descr' => 'Delayed Unass.', + 'ds' => 'c_delayed_shards', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Unassigned', - 'ds' => 'c_unass_shards', + 'descr' => 'Unassigned', + 'ds' => 'c_unass_shards', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/opensearch_c_data_nodes.inc.php b/includes/html/graphs/application/opensearch_c_data_nodes.inc.php index 2e8c4f8302..c7063c0cb6 100644 --- a/includes/html/graphs/application/opensearch_c_data_nodes.inc.php +++ b/includes/html/graphs/application/opensearch_c_data_nodes.inc.php @@ -14,8 +14,8 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Data Nodes', - 'ds' => 'c_data_nodes', + 'descr' => 'Data Nodes', + 'ds' => 'c_data_nodes', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/opensearch_c_delayed_shards.inc.php b/includes/html/graphs/application/opensearch_c_delayed_shards.inc.php index fa2b2ae087..ddbee237d1 100644 --- a/includes/html/graphs/application/opensearch_c_delayed_shards.inc.php +++ b/includes/html/graphs/application/opensearch_c_delayed_shards.inc.php @@ -14,8 +14,8 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Delayed Shards', - 'ds' => 'c_delayed_shards', + 'descr' => 'Delayed Shards', + 'ds' => 'c_delayed_shards', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/opensearch_c_in_fl_fetch.inc.php b/includes/html/graphs/application/opensearch_c_in_fl_fetch.inc.php index 0b5a42bee0..dd4878fbf0 100644 --- a/includes/html/graphs/application/opensearch_c_in_fl_fetch.inc.php +++ b/includes/html/graphs/application/opensearch_c_in_fl_fetch.inc.php @@ -14,8 +14,8 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'In Fl. Fetches', - 'ds' => 'c_in_fl_fetch', + 'descr' => 'In Fl. Fetches', + 'ds' => 'c_in_fl_fetch', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/opensearch_c_init_shards.inc.php b/includes/html/graphs/application/opensearch_c_init_shards.inc.php index 7b31a3ab69..5c59493346 100644 --- a/includes/html/graphs/application/opensearch_c_init_shards.inc.php +++ b/includes/html/graphs/application/opensearch_c_init_shards.inc.php @@ -14,8 +14,8 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Init Shards', - 'ds' => 'c_init_shards', + 'descr' => 'Init Shards', + 'ds' => 'c_init_shards', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/opensearch_c_nodes.inc.php b/includes/html/graphs/application/opensearch_c_nodes.inc.php index f15d147c0c..c986405b38 100644 --- a/includes/html/graphs/application/opensearch_c_nodes.inc.php +++ b/includes/html/graphs/application/opensearch_c_nodes.inc.php @@ -14,8 +14,8 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Nodes', - 'ds' => 'c_nodes', + 'descr' => 'Nodes', + 'ds' => 'c_nodes', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/opensearch_c_pending_tasks.inc.php b/includes/html/graphs/application/opensearch_c_pending_tasks.inc.php index 12bfc2e604..ef8463ef02 100644 --- a/includes/html/graphs/application/opensearch_c_pending_tasks.inc.php +++ b/includes/html/graphs/application/opensearch_c_pending_tasks.inc.php @@ -14,8 +14,8 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Pending Tasks', - 'ds' => 'c_pending_tasks', + 'descr' => 'Pending Tasks', + 'ds' => 'c_pending_tasks', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/opensearch_c_rel_shards.inc.php b/includes/html/graphs/application/opensearch_c_rel_shards.inc.php index 76ab3d8b92..119006335c 100644 --- a/includes/html/graphs/application/opensearch_c_rel_shards.inc.php +++ b/includes/html/graphs/application/opensearch_c_rel_shards.inc.php @@ -14,8 +14,8 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Rel Shards', - 'ds' => 'c_rel_shards', + 'descr' => 'Rel Shards', + 'ds' => 'c_rel_shards', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/opensearch_c_task_max_in_time.inc.php b/includes/html/graphs/application/opensearch_c_task_max_in_time.inc.php index 4842982420..eb515c25a0 100644 --- a/includes/html/graphs/application/opensearch_c_task_max_in_time.inc.php +++ b/includes/html/graphs/application/opensearch_c_task_max_in_time.inc.php @@ -14,8 +14,8 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Task Max In Time', - 'ds' => 'c_task_max_in_time', + 'descr' => 'Task Max In Time', + 'ds' => 'c_task_max_in_time', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/opensearch_c_unass_shards.inc.php b/includes/html/graphs/application/opensearch_c_unass_shards.inc.php index 6886bb6bab..e26b1a88ab 100644 --- a/includes/html/graphs/application/opensearch_c_unass_shards.inc.php +++ b/includes/html/graphs/application/opensearch_c_unass_shards.inc.php @@ -14,8 +14,8 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Unassigned', - 'ds' => 'c_unass_shards', + 'descr' => 'Unassigned', + 'ds' => 'c_unass_shards', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/opensearch_mem_all.inc.php b/includes/html/graphs/application/opensearch_mem_all.inc.php index 8fa366d998..8768b809d6 100644 --- a/includes/html/graphs/application/opensearch_mem_all.inc.php +++ b/includes/html/graphs/application/opensearch_mem_all.inc.php @@ -17,68 +17,68 @@ $tseg_rrd_filename = Rrd::name($device['hostname'], ['app', $name, $app->app_id, $rrd_list = []; $rrd_list[] = [ 'filename' => $tqc_rrd_filename, - 'descr' => 'Query Cache', - 'ds' => 'tqc_size', + 'descr' => 'Query Cache', + 'ds' => 'tqc_size', ]; $rrd_list[] = [ 'filename' => $trc_rrd_filename, - 'descr' => 'Request Cache', - 'ds' => 'trc_size', + 'descr' => 'Request Cache', + 'ds' => 'trc_size', ]; $rrd_list[] = [ 'filename' => $tfd_rrd_filename, - 'descr' => 'Fielddata', - 'ds' => 'tfd_size', + 'descr' => 'Fielddata', + 'ds' => 'tfd_size', ]; $rrd_list[] = [ 'filename' => $tseg_rrd_filename, - 'descr' => 'Segments', - 'ds' => 'tseg_size', + 'descr' => 'Segments', + 'ds' => 'tseg_size', ]; $rrd_list[] = [ 'filename' => $tseg_rrd_filename, - 'descr' => 'Seg. Terms', - 'ds' => 'tseg_terms_size', + 'descr' => 'Seg. Terms', + 'ds' => 'tseg_terms_size', ]; $rrd_list[] = [ 'filename' => $tseg_rrd_filename, - 'descr' => 'Seg. Fields', - 'ds' => 'tseg_fields_size', + 'descr' => 'Seg. Fields', + 'ds' => 'tseg_fields_size', ]; $rrd_list[] = [ 'filename' => $tseg_rrd_filename, - 'descr' => 'Seg.Term.Vectors', - 'ds' => 'tseg_tvector_size', + 'descr' => 'Seg.Term.Vectors', + 'ds' => 'tseg_tvector_size', ]; $rrd_list[] = [ 'filename' => $tseg_rrd_filename, - 'descr' => 'Seg. Norms', - 'ds' => 'tseg_norms_size', + 'descr' => 'Seg. Norms', + 'ds' => 'tseg_norms_size', ]; $rrd_list[] = [ 'filename' => $tseg_rrd_filename, - 'descr' => 'Seg. Points', - 'ds' => 'tseg_points_size', + 'descr' => 'Seg. Points', + 'ds' => 'tseg_points_size', ]; $rrd_list[] = [ 'filename' => $tseg_rrd_filename, - 'descr' => 'Seg. Doc Vals', - 'ds' => 'tseg_docval_size', + 'descr' => 'Seg. Doc Vals', + 'ds' => 'tseg_docval_size', ]; $rrd_list[] = [ 'filename' => $tseg_rrd_filename, - 'descr' => 'Seg.Ind.Wrt.', - 'ds' => 'tseg_indwrt_size', + 'descr' => 'Seg.Ind.Wrt.', + 'ds' => 'tseg_indwrt_size', ]; $rrd_list[] = [ 'filename' => $tseg_rrd_filename, - 'descr' => 'Seg. Ver. Map.', - 'ds' => 'tseg_vermap_size', + 'descr' => 'Seg. Ver. Map.', + 'ds' => 'tseg_vermap_size', ]; $rrd_list[] = [ 'filename' => $tseg_rrd_filename, - 'descr' => 'Seg. Fixed Bit Set', - 'ds' => 'tseg_fbs_size', + 'descr' => 'Seg. Fixed Bit Set', + 'ds' => 'tseg_fbs_size', ]; require 'includes/html/graphs/generic_multi_line.inc.php'; diff --git a/includes/html/graphs/application/opensearch_status.inc.php b/includes/html/graphs/application/opensearch_status.inc.php index 412999c35b..429c579da7 100644 --- a/includes/html/graphs/application/opensearch_status.inc.php +++ b/includes/html/graphs/application/opensearch_status.inc.php @@ -14,8 +14,8 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Status', - 'ds' => 'status', + 'descr' => 'Status', + 'ds' => 'status', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/opensearch_tf_periodic.inc.php b/includes/html/graphs/application/opensearch_tf_periodic.inc.php index 1a7167665c..5a602ce23f 100644 --- a/includes/html/graphs/application/opensearch_tf_periodic.inc.php +++ b/includes/html/graphs/application/opensearch_tf_periodic.inc.php @@ -14,8 +14,8 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Periodic Flush', - 'ds' => 'tf_periodic', + 'descr' => 'Periodic Flush', + 'ds' => 'tf_periodic', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/opensearch_tf_time.inc.php b/includes/html/graphs/application/opensearch_tf_time.inc.php index 7cfe105233..5ebf04dc76 100644 --- a/includes/html/graphs/application/opensearch_tf_time.inc.php +++ b/includes/html/graphs/application/opensearch_tf_time.inc.php @@ -14,8 +14,8 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Flush Time', - 'ds' => 'tf_time', + 'descr' => 'Flush Time', + 'ds' => 'tf_time', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/opensearch_tf_total.inc.php b/includes/html/graphs/application/opensearch_tf_total.inc.php index bd991aaa36..e49359ac57 100644 --- a/includes/html/graphs/application/opensearch_tf_total.inc.php +++ b/includes/html/graphs/application/opensearch_tf_total.inc.php @@ -14,8 +14,8 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Flush', - 'ds' => 'tf_total', + 'descr' => 'Flush', + 'ds' => 'tf_total', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/opensearch_tfd_evictions.inc.php b/includes/html/graphs/application/opensearch_tfd_evictions.inc.php index b5836d89e0..956856bf51 100644 --- a/includes/html/graphs/application/opensearch_tfd_evictions.inc.php +++ b/includes/html/graphs/application/opensearch_tfd_evictions.inc.php @@ -14,8 +14,8 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'FD Evictions', - 'ds' => 'tfd_evictions', + 'descr' => 'FD Evictions', + 'ds' => 'tfd_evictions', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/opensearch_tfd_size.inc.php b/includes/html/graphs/application/opensearch_tfd_size.inc.php index 76a9514da0..1bad7607f3 100644 --- a/includes/html/graphs/application/opensearch_tfd_size.inc.php +++ b/includes/html/graphs/application/opensearch_tfd_size.inc.php @@ -14,8 +14,8 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Fielddata', - 'ds' => 'tfd_size', + 'descr' => 'Fielddata', + 'ds' => 'tfd_size', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/opensearch_tg_exists_time.inc.php b/includes/html/graphs/application/opensearch_tg_exists_time.inc.php index 4393835bfb..eb0c66ac82 100644 --- a/includes/html/graphs/application/opensearch_tg_exists_time.inc.php +++ b/includes/html/graphs/application/opensearch_tg_exists_time.inc.php @@ -14,8 +14,8 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Get Exists Time', - 'ds' => 'tg_exists_time', + 'descr' => 'Get Exists Time', + 'ds' => 'tg_exists_time', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/opensearch_tg_exists_total.inc.php b/includes/html/graphs/application/opensearch_tg_exists_total.inc.php index 90fb7b6f05..6e1a805ffa 100644 --- a/includes/html/graphs/application/opensearch_tg_exists_total.inc.php +++ b/includes/html/graphs/application/opensearch_tg_exists_total.inc.php @@ -14,8 +14,8 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Get Exists', - 'ds' => 'tg_exists_total', + 'descr' => 'Get Exists', + 'ds' => 'tg_exists_total', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/opensearch_tg_missing_time.inc.php b/includes/html/graphs/application/opensearch_tg_missing_time.inc.php index 5c09f274d4..2ef0a07455 100644 --- a/includes/html/graphs/application/opensearch_tg_missing_time.inc.php +++ b/includes/html/graphs/application/opensearch_tg_missing_time.inc.php @@ -14,8 +14,8 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Get Missing Time', - 'ds' => 'tg_missing_time', + 'descr' => 'Get Missing Time', + 'ds' => 'tg_missing_time', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/opensearch_tg_missing_total.inc.php b/includes/html/graphs/application/opensearch_tg_missing_total.inc.php index b138f2874c..c220e540a3 100644 --- a/includes/html/graphs/application/opensearch_tg_missing_total.inc.php +++ b/includes/html/graphs/application/opensearch_tg_missing_total.inc.php @@ -14,8 +14,8 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Get Missing', - 'ds' => 'tg_missing_total', + 'descr' => 'Get Missing', + 'ds' => 'tg_missing_total', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/opensearch_tg_time.inc.php b/includes/html/graphs/application/opensearch_tg_time.inc.php index 6433ad6a82..0af31c2cf5 100644 --- a/includes/html/graphs/application/opensearch_tg_time.inc.php +++ b/includes/html/graphs/application/opensearch_tg_time.inc.php @@ -14,8 +14,8 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Get Time', - 'ds' => 'tg_time', + 'descr' => 'Get Time', + 'ds' => 'tg_time', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/opensearch_tg_total.inc.php b/includes/html/graphs/application/opensearch_tg_total.inc.php index 475d337c50..6fc5bc3995 100644 --- a/includes/html/graphs/application/opensearch_tg_total.inc.php +++ b/includes/html/graphs/application/opensearch_tg_total.inc.php @@ -14,8 +14,8 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Gets', - 'ds' => 'tg_total', + 'descr' => 'Gets', + 'ds' => 'tg_total', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/opensearch_ti_del_time.inc.php b/includes/html/graphs/application/opensearch_ti_del_time.inc.php index 10970f0288..adb1d88d5d 100644 --- a/includes/html/graphs/application/opensearch_ti_del_time.inc.php +++ b/includes/html/graphs/application/opensearch_ti_del_time.inc.php @@ -14,8 +14,8 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Delete Time', - 'ds' => 'ti_del_time', + 'descr' => 'Delete Time', + 'ds' => 'ti_del_time', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/opensearch_ti_del_total.inc.php b/includes/html/graphs/application/opensearch_ti_del_total.inc.php index f18bd6e48b..a8b2b27bd6 100644 --- a/includes/html/graphs/application/opensearch_ti_del_total.inc.php +++ b/includes/html/graphs/application/opensearch_ti_del_total.inc.php @@ -14,8 +14,8 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Index Deletes', - 'ds' => 'ti_del_total', + 'descr' => 'Index Deletes', + 'ds' => 'ti_del_total', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/opensearch_ti_failed.inc.php b/includes/html/graphs/application/opensearch_ti_failed.inc.php index 4d21403429..df3a7fb212 100644 --- a/includes/html/graphs/application/opensearch_ti_failed.inc.php +++ b/includes/html/graphs/application/opensearch_ti_failed.inc.php @@ -14,8 +14,8 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Index Failed', - 'ds' => 'ti_failed', + 'descr' => 'Index Failed', + 'ds' => 'ti_failed', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/opensearch_ti_noop_up_total.inc.php b/includes/html/graphs/application/opensearch_ti_noop_up_total.inc.php index 5991e8410d..124a669c4d 100644 --- a/includes/html/graphs/application/opensearch_ti_noop_up_total.inc.php +++ b/includes/html/graphs/application/opensearch_ti_noop_up_total.inc.php @@ -14,8 +14,8 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'NoOP Updates', - 'ds' => 'ti_noop_up_total', + 'descr' => 'NoOP Updates', + 'ds' => 'ti_noop_up_total', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/opensearch_ti_throttled.inc.php b/includes/html/graphs/application/opensearch_ti_throttled.inc.php index ee136ce991..2cb825580a 100644 --- a/includes/html/graphs/application/opensearch_ti_throttled.inc.php +++ b/includes/html/graphs/application/opensearch_ti_throttled.inc.php @@ -14,8 +14,8 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Throttled', - 'ds' => 'ti_throttled', + 'descr' => 'Throttled', + 'ds' => 'ti_throttled', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/opensearch_ti_throttled_time.inc.php b/includes/html/graphs/application/opensearch_ti_throttled_time.inc.php index a8ee2a6c46..8474c55fbb 100644 --- a/includes/html/graphs/application/opensearch_ti_throttled_time.inc.php +++ b/includes/html/graphs/application/opensearch_ti_throttled_time.inc.php @@ -14,8 +14,8 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Throttled Time', - 'ds' => 'ti_throttled_time', + 'descr' => 'Throttled Time', + 'ds' => 'ti_throttled_time', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/opensearch_ti_time.inc.php b/includes/html/graphs/application/opensearch_ti_time.inc.php index 59bf1022c7..f45fc6df0a 100644 --- a/includes/html/graphs/application/opensearch_ti_time.inc.php +++ b/includes/html/graphs/application/opensearch_ti_time.inc.php @@ -14,8 +14,8 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Index Time', - 'ds' => 'ti_time', + 'descr' => 'Index Time', + 'ds' => 'ti_time', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/opensearch_ti_total.inc.php b/includes/html/graphs/application/opensearch_ti_total.inc.php index 36a5e9e3c8..6b2e719fec 100644 --- a/includes/html/graphs/application/opensearch_ti_total.inc.php +++ b/includes/html/graphs/application/opensearch_ti_total.inc.php @@ -14,8 +14,8 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Index', - 'ds' => 'ti_total', + 'descr' => 'Index', + 'ds' => 'ti_total', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/opensearch_time_all.inc.php b/includes/html/graphs/application/opensearch_time_all.inc.php index 35f0ae93da..a8d6a0d324 100644 --- a/includes/html/graphs/application/opensearch_time_all.inc.php +++ b/includes/html/graphs/application/opensearch_time_all.inc.php @@ -18,73 +18,73 @@ $tw_rrd_filename = Rrd::name($device['hostname'], ['app', $name, $app->app_id, ' $rrd_list[] = [ 'filename' => $ti_rrd_filename, - 'descr' => 'Index', - 'ds' => 'ti_time', + 'descr' => 'Index', + 'ds' => 'ti_time', ]; $rrd_list[] = [ 'filename' => $ti_rrd_filename, - 'descr' => 'Delete', - 'ds' => 'ti_del_time', + 'descr' => 'Delete', + 'ds' => 'ti_del_time', ]; $rrd_list[] = [ 'filename' => $ts_rrd_filename, - 'descr' => 'Query', - 'ds' => 'ts_q_time', + 'descr' => 'Query', + 'ds' => 'ts_q_time', ]; $rrd_list[] = [ 'filename' => $ts_rrd_filename, - 'descr' => 'Fetch', - 'ds' => 'ts_f_time', + 'descr' => 'Fetch', + 'ds' => 'ts_f_time', ]; $rrd_list[] = [ 'filename' => $ts_rrd_filename, - 'descr' => 'Scroll', - 'ds' => 'ts_sc_time', + 'descr' => 'Scroll', + 'ds' => 'ts_sc_time', ]; $rrd_list[] = [ 'filename' => $ts_rrd_filename, - 'descr' => 'Suggest', - 'ds' => 'ts_su_time', + 'descr' => 'Suggest', + 'ds' => 'ts_su_time', ]; $rrd_list[] = [ 'filename' => $tr_rrd_filename, - 'descr' => 'Refresh', - 'ds' => 'tr_time', + 'descr' => 'Refresh', + 'ds' => 'tr_time', ]; $rrd_list[] = [ 'filename' => $tr_rrd_filename, - 'descr' => 'Ext. Refresh', - 'ds' => 'tr_ext_time', + 'descr' => 'Ext. Refresh', + 'ds' => 'tr_ext_time', ]; $rrd_list[] = [ 'filename' => $tf_rrd_filename, - 'descr' => 'Flush', - 'ds' => 'tf_time', + 'descr' => 'Flush', + 'ds' => 'tf_time', ]; $rrd_list[] = [ 'filename' => $tg_rrd_filename, - 'descr' => 'Get', - 'ds' => 'tg_time', + 'descr' => 'Get', + 'ds' => 'tg_time', ]; $rrd_list[] = [ 'filename' => $tg_rrd_filename, - 'descr' => 'Get Exists', - 'ds' => 'tg_exists_time', + 'descr' => 'Get Exists', + 'ds' => 'tg_exists_time', ]; $rrd_list[] = [ 'filename' => $tg_rrd_filename, - 'descr' => 'Get Missing', - 'ds' => 'tg_missing_time', + 'descr' => 'Get Missing', + 'ds' => 'tg_missing_time', ]; $rrd_list[] = [ 'filename' => $tm_rrd_filename, - 'descr' => 'Merges', - 'ds' => 'tm_time', + 'descr' => 'Merges', + 'ds' => 'tm_time', ]; $rrd_list[] = [ 'filename' => $tw_rrd_filename, - 'descr' => 'Warmer', - 'ds' => 'tw_time', + 'descr' => 'Warmer', + 'ds' => 'tw_time', ]; require 'includes/html/graphs/generic_multi_line.inc.php'; diff --git a/includes/html/graphs/application/opensearch_tm_docs.inc.php b/includes/html/graphs/application/opensearch_tm_docs.inc.php index d8908485b9..b5146a1186 100644 --- a/includes/html/graphs/application/opensearch_tm_docs.inc.php +++ b/includes/html/graphs/application/opensearch_tm_docs.inc.php @@ -14,8 +14,8 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Merged Docs', - 'ds' => 'tm_docs', + 'descr' => 'Merged Docs', + 'ds' => 'tm_docs', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/opensearch_tm_size.inc.php b/includes/html/graphs/application/opensearch_tm_size.inc.php index c349697d66..88659ee385 100644 --- a/includes/html/graphs/application/opensearch_tm_size.inc.php +++ b/includes/html/graphs/application/opensearch_tm_size.inc.php @@ -14,8 +14,8 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Merges Size', - 'ds' => 'tm_size', + 'descr' => 'Merges Size', + 'ds' => 'tm_size', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/opensearch_tm_throttled_size.inc.php b/includes/html/graphs/application/opensearch_tm_throttled_size.inc.php index 5189ac971c..1c63fcebce 100644 --- a/includes/html/graphs/application/opensearch_tm_throttled_size.inc.php +++ b/includes/html/graphs/application/opensearch_tm_throttled_size.inc.php @@ -14,8 +14,8 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'M.Throt.Size', - 'ds' => 'tm_throttled_size', + 'descr' => 'M.Throt.Size', + 'ds' => 'tm_throttled_size', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/opensearch_tm_throttled_time.inc.php b/includes/html/graphs/application/opensearch_tm_throttled_time.inc.php index 4d0eac869a..6db14b7ca1 100644 --- a/includes/html/graphs/application/opensearch_tm_throttled_time.inc.php +++ b/includes/html/graphs/application/opensearch_tm_throttled_time.inc.php @@ -14,8 +14,8 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'M.Throt.Time', - 'ds' => 'tm_throttled_time', + 'descr' => 'M.Throt.Time', + 'ds' => 'tm_throttled_time', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/opensearch_tm_time.inc.php b/includes/html/graphs/application/opensearch_tm_time.inc.php index 8f7d49a0cf..bde02b72fd 100644 --- a/includes/html/graphs/application/opensearch_tm_time.inc.php +++ b/includes/html/graphs/application/opensearch_tm_time.inc.php @@ -14,8 +14,8 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Merges Time', - 'ds' => 'tm_time', + 'descr' => 'Merges Time', + 'ds' => 'tm_time', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/opensearch_tm_total.inc.php b/includes/html/graphs/application/opensearch_tm_total.inc.php index 0bf3984357..ca28a73f40 100644 --- a/includes/html/graphs/application/opensearch_tm_total.inc.php +++ b/includes/html/graphs/application/opensearch_tm_total.inc.php @@ -14,8 +14,8 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Merges', - 'ds' => 'tm_total', + 'descr' => 'Merges', + 'ds' => 'tm_total', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/opensearch_tqc_cache_count.inc.php b/includes/html/graphs/application/opensearch_tqc_cache_count.inc.php index fa8b16aad8..696a5674f8 100644 --- a/includes/html/graphs/application/opensearch_tqc_cache_count.inc.php +++ b/includes/html/graphs/application/opensearch_tqc_cache_count.inc.php @@ -14,8 +14,8 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'QC Cache Count', - 'ds' => 'tqc_cache_count', + 'descr' => 'QC Cache Count', + 'ds' => 'tqc_cache_count', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/opensearch_tqc_cache_size.inc.php b/includes/html/graphs/application/opensearch_tqc_cache_size.inc.php index 1d97b89983..c50175ba87 100644 --- a/includes/html/graphs/application/opensearch_tqc_cache_size.inc.php +++ b/includes/html/graphs/application/opensearch_tqc_cache_size.inc.php @@ -14,8 +14,8 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'QC Size', - 'ds' => 'tqc_cache_size', + 'descr' => 'QC Size', + 'ds' => 'tqc_cache_size', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/opensearch_tqc_evictions.inc.php b/includes/html/graphs/application/opensearch_tqc_evictions.inc.php index a129313dc2..f8f45a13fd 100644 --- a/includes/html/graphs/application/opensearch_tqc_evictions.inc.php +++ b/includes/html/graphs/application/opensearch_tqc_evictions.inc.php @@ -14,8 +14,8 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'QC Evictions', - 'ds' => 'tqc_evictions', + 'descr' => 'QC Evictions', + 'ds' => 'tqc_evictions', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/opensearch_tqc_hit.inc.php b/includes/html/graphs/application/opensearch_tqc_hit.inc.php index 59d5bb3367..5f7fe615cb 100644 --- a/includes/html/graphs/application/opensearch_tqc_hit.inc.php +++ b/includes/html/graphs/application/opensearch_tqc_hit.inc.php @@ -14,8 +14,8 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'QC Hits', - 'ds' => 'tqc_hit', + 'descr' => 'QC Hits', + 'ds' => 'tqc_hit', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/opensearch_tqc_miss.inc.php b/includes/html/graphs/application/opensearch_tqc_miss.inc.php index fa1cfa3ea5..aca5375384 100644 --- a/includes/html/graphs/application/opensearch_tqc_miss.inc.php +++ b/includes/html/graphs/application/opensearch_tqc_miss.inc.php @@ -14,8 +14,8 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'QC Misses', - 'ds' => 'tqc_miss', + 'descr' => 'QC Misses', + 'ds' => 'tqc_miss', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/opensearch_tqc_size.inc.php b/includes/html/graphs/application/opensearch_tqc_size.inc.php index d3da925326..543a123311 100644 --- a/includes/html/graphs/application/opensearch_tqc_size.inc.php +++ b/includes/html/graphs/application/opensearch_tqc_size.inc.php @@ -14,8 +14,8 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'QC Size', - 'ds' => 'tqc_size', + 'descr' => 'QC Size', + 'ds' => 'tqc_size', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/opensearch_tqc_total.inc.php b/includes/html/graphs/application/opensearch_tqc_total.inc.php index 4ba45d2e00..92f918f93f 100644 --- a/includes/html/graphs/application/opensearch_tqc_total.inc.php +++ b/includes/html/graphs/application/opensearch_tqc_total.inc.php @@ -14,8 +14,8 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Queries', - 'ds' => 'tqc_total', + 'descr' => 'Queries', + 'ds' => 'tqc_total', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/opensearch_tr_ext_time.inc.php b/includes/html/graphs/application/opensearch_tr_ext_time.inc.php index 6a08055fdb..3d9a6585d6 100644 --- a/includes/html/graphs/application/opensearch_tr_ext_time.inc.php +++ b/includes/html/graphs/application/opensearch_tr_ext_time.inc.php @@ -14,8 +14,8 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'External Refresh', - 'ds' => 'tr_ext_time', + 'descr' => 'External Refresh', + 'ds' => 'tr_ext_time', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/opensearch_tr_ext_total.inc.php b/includes/html/graphs/application/opensearch_tr_ext_total.inc.php index 1f004815c9..87b5d1290e 100644 --- a/includes/html/graphs/application/opensearch_tr_ext_total.inc.php +++ b/includes/html/graphs/application/opensearch_tr_ext_total.inc.php @@ -14,8 +14,8 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Ext Refreshes', - 'ds' => 'tr_ext_total', + 'descr' => 'Ext Refreshes', + 'ds' => 'tr_ext_total', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/opensearch_tr_time.inc.php b/includes/html/graphs/application/opensearch_tr_time.inc.php index 878f7d621f..6e6d97883e 100644 --- a/includes/html/graphs/application/opensearch_tr_time.inc.php +++ b/includes/html/graphs/application/opensearch_tr_time.inc.php @@ -14,8 +14,8 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Index Time', - 'ds' => 'tr_time', + 'descr' => 'Index Time', + 'ds' => 'tr_time', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/opensearch_tr_total.inc.php b/includes/html/graphs/application/opensearch_tr_total.inc.php index f6873a3e5a..2a79b8b8a4 100644 --- a/includes/html/graphs/application/opensearch_tr_total.inc.php +++ b/includes/html/graphs/application/opensearch_tr_total.inc.php @@ -14,8 +14,8 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Refreshes', - 'ds' => 'tr_total', + 'descr' => 'Refreshes', + 'ds' => 'tr_total', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/opensearch_trc_evictions.inc.php b/includes/html/graphs/application/opensearch_trc_evictions.inc.php index 8511b08551..d653264634 100644 --- a/includes/html/graphs/application/opensearch_trc_evictions.inc.php +++ b/includes/html/graphs/application/opensearch_trc_evictions.inc.php @@ -14,8 +14,8 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'RC Evictions', - 'ds' => 'trc_evictions', + 'descr' => 'RC Evictions', + 'ds' => 'trc_evictions', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/opensearch_trc_hits.inc.php b/includes/html/graphs/application/opensearch_trc_hits.inc.php index a39cd9f275..1eb00fdb41 100644 --- a/includes/html/graphs/application/opensearch_trc_hits.inc.php +++ b/includes/html/graphs/application/opensearch_trc_hits.inc.php @@ -14,8 +14,8 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'RC Hits', - 'ds' => 'trc_hits', + 'descr' => 'RC Hits', + 'ds' => 'trc_hits', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/opensearch_trc_misses.inc.php b/includes/html/graphs/application/opensearch_trc_misses.inc.php index 521e7d8ba3..973fb1a039 100644 --- a/includes/html/graphs/application/opensearch_trc_misses.inc.php +++ b/includes/html/graphs/application/opensearch_trc_misses.inc.php @@ -14,8 +14,8 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'RC Misses', - 'ds' => 'trc_misses', + 'descr' => 'RC Misses', + 'ds' => 'trc_misses', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/opensearch_trc_size.inc.php b/includes/html/graphs/application/opensearch_trc_size.inc.php index 78ffabb80f..faf8cf7377 100644 --- a/includes/html/graphs/application/opensearch_trc_size.inc.php +++ b/includes/html/graphs/application/opensearch_trc_size.inc.php @@ -14,8 +14,8 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Request Cache', - 'ds' => 'trc_size', + 'descr' => 'Request Cache', + 'ds' => 'trc_size', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/opensearch_ts_f_time.inc.php b/includes/html/graphs/application/opensearch_ts_f_time.inc.php index 6ccf4218d5..5a4aff0cc3 100644 --- a/includes/html/graphs/application/opensearch_ts_f_time.inc.php +++ b/includes/html/graphs/application/opensearch_ts_f_time.inc.php @@ -14,8 +14,8 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Fetch Time', - 'ds' => 'ts_f_time', + 'descr' => 'Fetch Time', + 'ds' => 'ts_f_time', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/opensearch_ts_f_total.inc.php b/includes/html/graphs/application/opensearch_ts_f_total.inc.php index 3cadf59a06..afee8de310 100644 --- a/includes/html/graphs/application/opensearch_ts_f_total.inc.php +++ b/includes/html/graphs/application/opensearch_ts_f_total.inc.php @@ -14,8 +14,8 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Fetches', - 'ds' => 'ts_f_total', + 'descr' => 'Fetches', + 'ds' => 'ts_f_total', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/opensearch_ts_q_time.inc.php b/includes/html/graphs/application/opensearch_ts_q_time.inc.php index a7314fffe3..720bf6eab5 100644 --- a/includes/html/graphs/application/opensearch_ts_q_time.inc.php +++ b/includes/html/graphs/application/opensearch_ts_q_time.inc.php @@ -14,8 +14,8 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Query Time', - 'ds' => 'ts_q_time', + 'descr' => 'Query Time', + 'ds' => 'ts_q_time', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/opensearch_ts_q_total.inc.php b/includes/html/graphs/application/opensearch_ts_q_total.inc.php index 29f472819e..e404ba2866 100644 --- a/includes/html/graphs/application/opensearch_ts_q_total.inc.php +++ b/includes/html/graphs/application/opensearch_ts_q_total.inc.php @@ -14,8 +14,8 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Queries', - 'ds' => 'ts_q_total', + 'descr' => 'Queries', + 'ds' => 'ts_q_total', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/opensearch_ts_sc_time.inc.php b/includes/html/graphs/application/opensearch_ts_sc_time.inc.php index 83f2c7ccbe..38d8bbf602 100644 --- a/includes/html/graphs/application/opensearch_ts_sc_time.inc.php +++ b/includes/html/graphs/application/opensearch_ts_sc_time.inc.php @@ -14,8 +14,8 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Scroll Time', - 'ds' => 'ts_sc_time', + 'descr' => 'Scroll Time', + 'ds' => 'ts_sc_time', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/opensearch_ts_sc_total.inc.php b/includes/html/graphs/application/opensearch_ts_sc_total.inc.php index 58d773c55a..afcdbeb539 100644 --- a/includes/html/graphs/application/opensearch_ts_sc_total.inc.php +++ b/includes/html/graphs/application/opensearch_ts_sc_total.inc.php @@ -14,8 +14,8 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Scrolls', - 'ds' => 'ts_sc_total', + 'descr' => 'Scrolls', + 'ds' => 'ts_sc_total', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/opensearch_ts_su_time.inc.php b/includes/html/graphs/application/opensearch_ts_su_time.inc.php index 36d0487385..0b3ef1b126 100644 --- a/includes/html/graphs/application/opensearch_ts_su_time.inc.php +++ b/includes/html/graphs/application/opensearch_ts_su_time.inc.php @@ -14,8 +14,8 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Suggest Time', - 'ds' => 'ts_su_time', + 'descr' => 'Suggest Time', + 'ds' => 'ts_su_time', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/opensearch_ts_su_total.inc.php b/includes/html/graphs/application/opensearch_ts_su_total.inc.php index c5b6fa103a..a8be1ebc33 100644 --- a/includes/html/graphs/application/opensearch_ts_su_total.inc.php +++ b/includes/html/graphs/application/opensearch_ts_su_total.inc.php @@ -14,8 +14,8 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Suggests', - 'ds' => 'ts_su_total', + 'descr' => 'Suggests', + 'ds' => 'ts_su_total', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/opensearch_tseg_count.inc.php b/includes/html/graphs/application/opensearch_tseg_count.inc.php index d52a03d8b3..9126b2ef26 100644 --- a/includes/html/graphs/application/opensearch_tseg_count.inc.php +++ b/includes/html/graphs/application/opensearch_tseg_count.inc.php @@ -14,8 +14,8 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Segments Count', - 'ds' => 'tseg_count', + 'descr' => 'Segments Count', + 'ds' => 'tseg_count', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/opensearch_tseg_docval_size.inc.php b/includes/html/graphs/application/opensearch_tseg_docval_size.inc.php index 1001ef390e..a1cf9e4faf 100644 --- a/includes/html/graphs/application/opensearch_tseg_docval_size.inc.php +++ b/includes/html/graphs/application/opensearch_tseg_docval_size.inc.php @@ -14,8 +14,8 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Seg. Doc Val. Size', - 'ds' => 'tseg_docval_size', + 'descr' => 'Seg. Doc Val. Size', + 'ds' => 'tseg_docval_size', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/opensearch_tseg_fbs_size.inc.php b/includes/html/graphs/application/opensearch_tseg_fbs_size.inc.php index 880f620604..8d2d0d6abd 100644 --- a/includes/html/graphs/application/opensearch_tseg_fbs_size.inc.php +++ b/includes/html/graphs/application/opensearch_tseg_fbs_size.inc.php @@ -14,8 +14,8 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Seg. Fixed Bit Set Size', - 'ds' => 'tseg_fbs_size', + 'descr' => 'Seg. Fixed Bit Set Size', + 'ds' => 'tseg_fbs_size', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/opensearch_tseg_fields_size.inc.php b/includes/html/graphs/application/opensearch_tseg_fields_size.inc.php index 388ef03676..cb6f9af01f 100644 --- a/includes/html/graphs/application/opensearch_tseg_fields_size.inc.php +++ b/includes/html/graphs/application/opensearch_tseg_fields_size.inc.php @@ -14,8 +14,8 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Seg. Fields Size', - 'ds' => 'tseg_fields_size', + 'descr' => 'Seg. Fields Size', + 'ds' => 'tseg_fields_size', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/opensearch_tseg_indwrt_size.inc.php b/includes/html/graphs/application/opensearch_tseg_indwrt_size.inc.php index e6525d551d..c788cc645f 100644 --- a/includes/html/graphs/application/opensearch_tseg_indwrt_size.inc.php +++ b/includes/html/graphs/application/opensearch_tseg_indwrt_size.inc.php @@ -14,8 +14,8 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Seg.Ind.Wrt.Size', - 'ds' => 'tseg_indwrt_size', + 'descr' => 'Seg.Ind.Wrt.Size', + 'ds' => 'tseg_indwrt_size', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/opensearch_tseg_norms_size.inc.php b/includes/html/graphs/application/opensearch_tseg_norms_size.inc.php index b423cee0fc..155ff0807d 100644 --- a/includes/html/graphs/application/opensearch_tseg_norms_size.inc.php +++ b/includes/html/graphs/application/opensearch_tseg_norms_size.inc.php @@ -14,8 +14,8 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Seg. Norms Size', - 'ds' => 'tseg_norms_size', + 'descr' => 'Seg. Norms Size', + 'ds' => 'tseg_norms_size', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/opensearch_tseg_points_size.inc.php b/includes/html/graphs/application/opensearch_tseg_points_size.inc.php index 2562a05408..057394a641 100644 --- a/includes/html/graphs/application/opensearch_tseg_points_size.inc.php +++ b/includes/html/graphs/application/opensearch_tseg_points_size.inc.php @@ -14,8 +14,8 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Seg. Points Size', - 'ds' => 'tseg_points_size', + 'descr' => 'Seg. Points Size', + 'ds' => 'tseg_points_size', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/opensearch_tseg_size.inc.php b/includes/html/graphs/application/opensearch_tseg_size.inc.php index 240c05dc12..4151da2029 100644 --- a/includes/html/graphs/application/opensearch_tseg_size.inc.php +++ b/includes/html/graphs/application/opensearch_tseg_size.inc.php @@ -14,8 +14,8 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Segment Size', - 'ds' => 'tseg_size', + 'descr' => 'Segment Size', + 'ds' => 'tseg_size', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/opensearch_tseg_terms_size.inc.php b/includes/html/graphs/application/opensearch_tseg_terms_size.inc.php index 2296994ae1..56d4338e2b 100644 --- a/includes/html/graphs/application/opensearch_tseg_terms_size.inc.php +++ b/includes/html/graphs/application/opensearch_tseg_terms_size.inc.php @@ -14,8 +14,8 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Seg. Terms Size', - 'ds' => 'tseg_terms_size', + 'descr' => 'Seg. Terms Size', + 'ds' => 'tseg_terms_size', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/opensearch_tseg_tvector_size.inc.php b/includes/html/graphs/application/opensearch_tseg_tvector_size.inc.php index d095065001..83c5f4313b 100644 --- a/includes/html/graphs/application/opensearch_tseg_tvector_size.inc.php +++ b/includes/html/graphs/application/opensearch_tseg_tvector_size.inc.php @@ -14,8 +14,8 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Seg.Term.Vect.Size', - 'ds' => 'tseg_tvector_size', + 'descr' => 'Seg.Term.Vect.Size', + 'ds' => 'tseg_tvector_size', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/opensearch_tseg_vermap_size.inc.php b/includes/html/graphs/application/opensearch_tseg_vermap_size.inc.php index 4320b92688..27f533b6bb 100644 --- a/includes/html/graphs/application/opensearch_tseg_vermap_size.inc.php +++ b/includes/html/graphs/application/opensearch_tseg_vermap_size.inc.php @@ -14,8 +14,8 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Seg.Ver.Map Size', - 'ds' => 'tseg_vermap_size', + 'descr' => 'Seg.Ver.Map Size', + 'ds' => 'tseg_vermap_size', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/opensearch_tst_res_size.inc.php b/includes/html/graphs/application/opensearch_tst_res_size.inc.php index 8e0edbbf30..ebb22f9974 100644 --- a/includes/html/graphs/application/opensearch_tst_res_size.inc.php +++ b/includes/html/graphs/application/opensearch_tst_res_size.inc.php @@ -14,8 +14,8 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Store Reserved', - 'ds' => 'tst_res_size', + 'descr' => 'Store Reserved', + 'ds' => 'tst_res_size', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/opensearch_tst_size.inc.php b/includes/html/graphs/application/opensearch_tst_size.inc.php index c015ef062f..e2be8c16e2 100644 --- a/includes/html/graphs/application/opensearch_tst_size.inc.php +++ b/includes/html/graphs/application/opensearch_tst_size.inc.php @@ -14,8 +14,8 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Store', - 'ds' => 'tst_size', + 'descr' => 'Store', + 'ds' => 'tst_size', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/opensearch_ttl_last_mod_age.inc.php b/includes/html/graphs/application/opensearch_ttl_last_mod_age.inc.php index 9faf357dcb..af0343098e 100644 --- a/includes/html/graphs/application/opensearch_ttl_last_mod_age.inc.php +++ b/includes/html/graphs/application/opensearch_ttl_last_mod_age.inc.php @@ -14,8 +14,8 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Last Mod Age', - 'ds' => 'ttl_last_mod_age', + 'descr' => 'Last Mod Age', + 'ds' => 'ttl_last_mod_age', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/opensearch_ttl_ops.inc.php b/includes/html/graphs/application/opensearch_ttl_ops.inc.php index 9e4cd5477e..680100263d 100644 --- a/includes/html/graphs/application/opensearch_ttl_ops.inc.php +++ b/includes/html/graphs/application/opensearch_ttl_ops.inc.php @@ -14,8 +14,8 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Translog Ops', - 'ds' => 'ttl_ops', + 'descr' => 'Translog Ops', + 'ds' => 'ttl_ops', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/opensearch_ttl_size.inc.php b/includes/html/graphs/application/opensearch_ttl_size.inc.php index b2baa4c950..4af5c64664 100644 --- a/includes/html/graphs/application/opensearch_ttl_size.inc.php +++ b/includes/html/graphs/application/opensearch_ttl_size.inc.php @@ -14,8 +14,8 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Translog Size', - 'ds' => 'ttl_size', + 'descr' => 'Translog Size', + 'ds' => 'ttl_size', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/opensearch_ttl_uncom_ops.inc.php b/includes/html/graphs/application/opensearch_ttl_uncom_ops.inc.php index efcdebec6a..32b88d783d 100644 --- a/includes/html/graphs/application/opensearch_ttl_uncom_ops.inc.php +++ b/includes/html/graphs/application/opensearch_ttl_uncom_ops.inc.php @@ -14,8 +14,8 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Uncom Ops', - 'ds' => 'ttl_uncom_ops', + 'descr' => 'Uncom Ops', + 'ds' => 'ttl_uncom_ops', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/opensearch_ttl_uncom_size.inc.php b/includes/html/graphs/application/opensearch_ttl_uncom_size.inc.php index b7cc33b97f..0d62d6c296 100644 --- a/includes/html/graphs/application/opensearch_ttl_uncom_size.inc.php +++ b/includes/html/graphs/application/opensearch_ttl_uncom_size.inc.php @@ -14,8 +14,8 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Uncom Size', - 'ds' => 'ttl_uncom_size', + 'descr' => 'Uncom Size', + 'ds' => 'ttl_uncom_size', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/opensearch_tw_time.inc.php b/includes/html/graphs/application/opensearch_tw_time.inc.php index fb72d462e0..d9d3e971dc 100644 --- a/includes/html/graphs/application/opensearch_tw_time.inc.php +++ b/includes/html/graphs/application/opensearch_tw_time.inc.php @@ -14,8 +14,8 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Warmer Time', - 'ds' => 'tw_time', + 'descr' => 'Warmer Time', + 'ds' => 'tw_time', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/opensearch_tw_total.inc.php b/includes/html/graphs/application/opensearch_tw_total.inc.php index ffdfe42b29..7f8e271391 100644 --- a/includes/html/graphs/application/opensearch_tw_total.inc.php +++ b/includes/html/graphs/application/opensearch_tw_total.inc.php @@ -14,8 +14,8 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Warmer', - 'ds' => 'tw_total', + 'descr' => 'Warmer', + 'ds' => 'tw_total', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/opensips_memory.inc.php b/includes/html/graphs/application/opensips_memory.inc.php index e8a371a8a0..745946dd64 100644 --- a/includes/html/graphs/application/opensips_memory.inc.php +++ b/includes/html/graphs/application/opensips_memory.inc.php @@ -7,11 +7,11 @@ $rrd_filename = Rrd::name($device['hostname'], ['app', 'opensips', $app->app_id] $array = [ 'total_memory' => [ - 'descr' => 'Total', + 'descr' => 'Total', 'colour' => '22FF22', ], 'used_memory' => [ - 'descr' => 'Used', + 'descr' => 'Used', 'colour' => '0022FF', ], ]; diff --git a/includes/html/graphs/application/pi-hole_destinations.inc.php b/includes/html/graphs/application/pi-hole_destinations.inc.php index cc2443c19a..e3d29ef492 100644 --- a/includes/html/graphs/application/pi-hole_destinations.inc.php +++ b/includes/html/graphs/application/pi-hole_destinations.inc.php @@ -36,7 +36,7 @@ $rrd_filename = Rrd::name($device['hostname'], ['app', $app->app_type, $app->app $array = [ 'queries_forwarded' => ['descr' => 'Queries forwarded', 'colour' => '1F35A5'], - 'queries_cached' => ['descr' => 'Queries cached', 'colour' => '137C21'], + 'queries_cached' => ['descr' => 'Queries cached', 'colour' => '137C21'], ]; $i = 0; diff --git a/includes/html/graphs/application/portactivity_from.inc.php b/includes/html/graphs/application/portactivity_from.inc.php index b26819f48f..2173e9bd14 100644 --- a/includes/html/graphs/application/portactivity_from.inc.php +++ b/includes/html/graphs/application/portactivity_from.inc.php @@ -14,63 +14,63 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'CLOSED', - 'ds' => 'fromCLOSED', + 'descr' => 'CLOSED', + 'ds' => 'fromCLOSED', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'SYN_SENT', - 'ds' => 'fromSYN_SENT', + 'descr' => 'SYN_SENT', + 'ds' => 'fromSYN_SENT', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'SYN_RECEIVED', - 'ds' => 'fromSYN_RECEIVED', + 'descr' => 'SYN_RECEIVED', + 'ds' => 'fromSYN_RECEIVED', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'ESTABLISHED', - 'ds' => 'fromESTABLISHED', + 'descr' => 'ESTABLISHED', + 'ds' => 'fromESTABLISHED', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'CLOSE_WAIT', - 'ds' => 'fromCLOSE_WAIT', + 'descr' => 'CLOSE_WAIT', + 'ds' => 'fromCLOSE_WAIT', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'FIN_WAIT_1', - 'ds' => 'fromFIN_WAIT_1', + 'descr' => 'FIN_WAIT_1', + 'ds' => 'fromFIN_WAIT_1', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'CLOSING', - 'ds' => 'fromCLOSING', + 'descr' => 'CLOSING', + 'ds' => 'fromCLOSING', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'LAST_ACK', - 'ds' => 'fromLAST_ACK', + 'descr' => 'LAST_ACK', + 'ds' => 'fromLAST_ACK', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'FIN_WAIT_2', - 'ds' => 'fromFIN_WAIT_2', + 'descr' => 'FIN_WAIT_2', + 'ds' => 'fromFIN_WAIT_2', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'TIME_WAIT', - 'ds' => 'fromTIME_WAIT', + 'descr' => 'TIME_WAIT', + 'ds' => 'fromTIME_WAIT', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'UNKNOWN', - 'ds' => 'fromUNKNOWN', + 'descr' => 'UNKNOWN', + 'ds' => 'fromUNKNOWN', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'other', - 'ds' => 'fromother', + 'descr' => 'other', + 'ds' => 'fromother', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/portactivity_to.inc.php b/includes/html/graphs/application/portactivity_to.inc.php index d1fc5e4477..8b2c1baaa2 100644 --- a/includes/html/graphs/application/portactivity_to.inc.php +++ b/includes/html/graphs/application/portactivity_to.inc.php @@ -14,63 +14,63 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'CLOSED', - 'ds' => 'toCLOSED', + 'descr' => 'CLOSED', + 'ds' => 'toCLOSED', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'SYN_SENT', - 'ds' => 'toSYN_SENT', + 'descr' => 'SYN_SENT', + 'ds' => 'toSYN_SENT', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'SYN_RECEIVED', - 'ds' => 'toSYN_RECEIVED', + 'descr' => 'SYN_RECEIVED', + 'ds' => 'toSYN_RECEIVED', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'ESTABLISHED', - 'ds' => 'toESTABLISHED', + 'descr' => 'ESTABLISHED', + 'ds' => 'toESTABLISHED', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'CLOSE_WAIT', - 'ds' => 'toCLOSE_WAIT', + 'descr' => 'CLOSE_WAIT', + 'ds' => 'toCLOSE_WAIT', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'FIN_WAIT_1', - 'ds' => 'toFIN_WAIT_1', + 'descr' => 'FIN_WAIT_1', + 'ds' => 'toFIN_WAIT_1', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'CLOSING', - 'ds' => 'toCLOSING', + 'descr' => 'CLOSING', + 'ds' => 'toCLOSING', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'LAST_ACK', - 'ds' => 'toLAST_ACK', + 'descr' => 'LAST_ACK', + 'ds' => 'toLAST_ACK', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'FIN_WAIT_2', - 'ds' => 'toFIN_WAIT_2', + 'descr' => 'FIN_WAIT_2', + 'ds' => 'toFIN_WAIT_2', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'TIME_WAIT', - 'ds' => 'toTIME_WAIT', + 'descr' => 'TIME_WAIT', + 'ds' => 'toTIME_WAIT', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'UNKNOWN', - 'ds' => 'toUNKNOWN', + 'descr' => 'UNKNOWN', + 'ds' => 'toUNKNOWN', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'other', - 'ds' => 'toother', + 'descr' => 'other', + 'ds' => 'toother', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/portactivity_total_details.inc.php b/includes/html/graphs/application/portactivity_total_details.inc.php index 8c34b8e097..c77f313309 100644 --- a/includes/html/graphs/application/portactivity_total_details.inc.php +++ b/includes/html/graphs/application/portactivity_total_details.inc.php @@ -14,63 +14,63 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'CLOSED', - 'ds' => 'totalCLOSED', + 'descr' => 'CLOSED', + 'ds' => 'totalCLOSED', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'SYN_SENT', - 'ds' => 'totalSYN_SENT', + 'descr' => 'SYN_SENT', + 'ds' => 'totalSYN_SENT', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'SYN_RECEIVED', - 'ds' => 'totalSYN_RECEIVED', + 'descr' => 'SYN_RECEIVED', + 'ds' => 'totalSYN_RECEIVED', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'ESTABLISHED', - 'ds' => 'totalESTABLISHED', + 'descr' => 'ESTABLISHED', + 'ds' => 'totalESTABLISHED', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'CLOSE_WAIT', - 'ds' => 'totalCLOSE_WAIT', + 'descr' => 'CLOSE_WAIT', + 'ds' => 'totalCLOSE_WAIT', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'FIN_WAIT_1', - 'ds' => 'totalFIN_WAIT_1', + 'descr' => 'FIN_WAIT_1', + 'ds' => 'totalFIN_WAIT_1', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'CLOSING', - 'ds' => 'totalCLOSING', + 'descr' => 'CLOSING', + 'ds' => 'totalCLOSING', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'LAST_ACK', - 'ds' => 'totalLAST_ACK', + 'descr' => 'LAST_ACK', + 'ds' => 'totalLAST_ACK', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'FIN_WAIT_2', - 'ds' => 'totalFIN_WAIT_2', + 'descr' => 'FIN_WAIT_2', + 'ds' => 'totalFIN_WAIT_2', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'TIME_WAIT', - 'ds' => 'totalTIME_WAIT', + 'descr' => 'TIME_WAIT', + 'ds' => 'totalTIME_WAIT', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'UNKNOWN', - 'ds' => 'totalUNKNOWN', + 'descr' => 'UNKNOWN', + 'ds' => 'totalUNKNOWN', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'other', - 'ds' => 'totalother', + 'descr' => 'other', + 'ds' => 'totalother', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/portactivity_totals.inc.php b/includes/html/graphs/application/portactivity_totals.inc.php index 5d19c70f75..4f06c7d19e 100644 --- a/includes/html/graphs/application/portactivity_totals.inc.php +++ b/includes/html/graphs/application/portactivity_totals.inc.php @@ -14,18 +14,18 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Total', - 'ds' => 'total_conns', + 'descr' => 'Total', + 'ds' => 'total_conns', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'From', - 'ds' => 'total_from', + 'descr' => 'From', + 'ds' => 'total_from', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'To', - 'ds' => 'total_to', + 'descr' => 'To', + 'ds' => 'total_to', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/postfix_bytes.inc.php b/includes/html/graphs/application/postfix_bytes.inc.php index 4de4a102c0..5089215210 100644 --- a/includes/html/graphs/application/postfix_bytes.inc.php +++ b/includes/html/graphs/application/postfix_bytes.inc.php @@ -18,15 +18,15 @@ if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list = [ [ 'filename' => $rrd_filename, - 'descr' => 'Received', - 'ds' => 'bytesr', - 'colour' => '582A72', + 'descr' => 'Received', + 'ds' => 'bytesr', + 'colour' => '582A72', ], [ 'filename' => $rrd_filename, - 'descr' => 'Delivered', - 'ds' => 'bytesd', - 'colour' => '88CC88', + 'descr' => 'Delivered', + 'ds' => 'bytesd', + 'colour' => '88CC88', ], ]; } else { diff --git a/includes/html/graphs/application/postfix_deferral.inc.php b/includes/html/graphs/application/postfix_deferral.inc.php index 3d4aaac0e9..57b9fb8f7a 100644 --- a/includes/html/graphs/application/postfix_deferral.inc.php +++ b/includes/html/graphs/application/postfix_deferral.inc.php @@ -18,15 +18,15 @@ if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list = [ [ 'filename' => $rrd_filename, - 'descr' => 'Conn. Refused', - 'ds' => 'deferralcr', - 'colour' => '582A72', + 'descr' => 'Conn. Refused', + 'ds' => 'deferralcr', + 'colour' => '582A72', ], [ 'filename' => $rrd_filename, - 'descr' => 'Host Is Down', - 'ds' => 'deferralhid', - 'colour' => '88CC88', + 'descr' => 'Host Is Down', + 'ds' => 'deferralhid', + 'colour' => '88CC88', ], ]; } else { diff --git a/includes/html/graphs/application/postfix_messages.inc.php b/includes/html/graphs/application/postfix_messages.inc.php index fc9f43a4b5..b4fd4132cf 100644 --- a/includes/html/graphs/application/postfix_messages.inc.php +++ b/includes/html/graphs/application/postfix_messages.inc.php @@ -18,51 +18,51 @@ if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list = [ [ 'filename' => $rrd_filename, - 'descr' => 'Received', - 'ds' => 'received', - 'colour' => '582A72', + 'descr' => 'Received', + 'ds' => 'received', + 'colour' => '582A72', ], [ 'filename' => $rrd_filename, - 'descr' => 'Delivered', - 'ds' => 'delivered', - 'colour' => '28774F', + 'descr' => 'Delivered', + 'ds' => 'delivered', + 'colour' => '28774F', ], [ 'filename' => $rrd_filename, - 'descr' => 'Deferred', - 'ds' => 'deferred', - 'colour' => 'AA6C39', + 'descr' => 'Deferred', + 'ds' => 'deferred', + 'colour' => 'AA6C39', ], [ 'filename' => $rrd_filename, - 'descr' => 'Bounced', - 'ds' => 'bounced', - 'colour' => '88CC88', + 'descr' => 'Bounced', + 'ds' => 'bounced', + 'colour' => '88CC88', ], [ 'filename' => $rrd_filename, - 'descr' => 'Rejected', - 'ds' => 'rejected', - 'colour' => 'D46A6A', + 'descr' => 'Rejected', + 'ds' => 'rejected', + 'colour' => 'D46A6A', ], [ 'filename' => $rrd_filename, - 'descr' => 'Reject Warnings', - 'ds' => 'rejectw', - 'colour' => 'FFD1AA', + 'descr' => 'Reject Warnings', + 'ds' => 'rejectw', + 'colour' => 'FFD1AA', ], [ 'filename' => $rrd_filename, - 'descr' => 'Held', - 'ds' => 'held', - 'colour' => '582A72', + 'descr' => 'Held', + 'ds' => 'held', + 'colour' => '582A72', ], [ 'filename' => $rrd_filename, - 'descr' => 'Discarded', - 'ds' => 'discarded', - 'colour' => 'AA5439', + 'descr' => 'Discarded', + 'ds' => 'discarded', + 'colour' => 'AA5439', ], ]; } else { diff --git a/includes/html/graphs/application/postfix_qstats.inc.php b/includes/html/graphs/application/postfix_qstats.inc.php index 988855a706..fb18f883cb 100644 --- a/includes/html/graphs/application/postfix_qstats.inc.php +++ b/includes/html/graphs/application/postfix_qstats.inc.php @@ -18,27 +18,27 @@ if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list = [ [ 'filename' => $rrd_filename, - 'descr' => 'Incoming', - 'ds' => 'incomingq', - 'colour' => '582A72', + 'descr' => 'Incoming', + 'ds' => 'incomingq', + 'colour' => '582A72', ], [ 'filename' => $rrd_filename, - 'descr' => 'Active', - 'ds' => 'activeq', - 'colour' => '28774F', + 'descr' => 'Active', + 'ds' => 'activeq', + 'colour' => '28774F', ], [ 'filename' => $rrd_filename, - 'descr' => 'Deferred', - 'ds' => 'deferredq', - 'colour' => '88CC88', + 'descr' => 'Deferred', + 'ds' => 'deferredq', + 'colour' => '88CC88', ], [ 'filename' => $rrd_filename, - 'descr' => 'Hold', - 'ds' => 'holdq', - 'colour' => 'D46A6A', + 'descr' => 'Hold', + 'ds' => 'holdq', + 'colour' => 'D46A6A', ], ]; } else { diff --git a/includes/html/graphs/application/postfix_rejects.inc.php b/includes/html/graphs/application/postfix_rejects.inc.php index c7f91ef6f9..be675cc734 100644 --- a/includes/html/graphs/application/postfix_rejects.inc.php +++ b/includes/html/graphs/application/postfix_rejects.inc.php @@ -18,87 +18,87 @@ if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list = [ [ 'filename' => $rrd_filename, - 'descr' => 'Clnt Hst Rej', - 'ds' => 'chr', - 'colour' => '582A72', + 'descr' => 'Clnt Hst Rej', + 'ds' => 'chr', + 'colour' => '582A72', ], [ 'filename' => $rrd_filename, - 'descr' => 'Helo needs FQN', - 'ds' => 'hcrnfqh', - 'colour' => '28774F', + 'descr' => 'Helo needs FQN', + 'ds' => 'hcrnfqh', + 'colour' => '28774F', ], [ 'filename' => $rrd_filename, - 'descr' => 'Sndr Dmn Not Fnd', - 'ds' => 'sardnf', - 'colour' => 'AA6C39', + 'descr' => 'Sndr Dmn Not Fnd', + 'ds' => 'sardnf', + 'colour' => 'AA6C39', ], [ 'filename' => $rrd_filename, - 'descr' => 'Not Owned By User', - 'ds' => 'sarnobu', - 'colour' => '88CC88', + 'descr' => 'Not Owned By User', + 'ds' => 'sarnobu', + 'colour' => '88CC88', ], [ 'filename' => $rrd_filename, - 'descr' => 'RBL', - 'ds' => 'bu', - 'colour' => 'D46A6A', + 'descr' => 'RBL', + 'ds' => 'bu', + 'colour' => 'D46A6A', ], [ 'filename' => $rrd_filename, - 'descr' => 'Unknown Recpt', - 'ds' => 'raruu', - 'colour' => 'FFD1AA', + 'descr' => 'Unknown Recpt', + 'ds' => 'raruu', + 'colour' => 'FFD1AA', ], [ 'filename' => $rrd_filename, - 'descr' => 'Inv. Helo Name', - 'ds' => 'hcrin', - 'colour' => '582A00', + 'descr' => 'Inv. Helo Name', + 'ds' => 'hcrin', + 'colour' => '582A00', ], [ 'filename' => $rrd_filename, - 'descr' => 'Sender Needs FQA', - 'ds' => 'sarnfqa', - 'colour' => '005439', + 'descr' => 'Sender Needs FQA', + 'ds' => 'sarnfqa', + 'colour' => '005439', ], [ 'filename' => $rrd_filename, - 'descr' => 'Recp DNF', - 'ds' => 'rardnf', - 'colour' => '28006C', + 'descr' => 'Recp DNF', + 'ds' => 'rardnf', + 'colour' => '28006C', ], [ 'filename' => $rrd_filename, - 'descr' => 'Recp Needs FQA', - 'ds' => 'rarnfqa', - 'colour' => '00536C', + 'descr' => 'Recp Needs FQA', + 'ds' => 'rarnfqa', + 'colour' => '00536C', ], [ 'filename' => $rrd_filename, - 'descr' => 'Imp. Pipelining', - 'ds' => 'iuscp', - 'colour' => '853A6C', + 'descr' => 'Imp. Pipelining', + 'ds' => 'iuscp', + 'colour' => '853A6C', ], [ 'filename' => $rrd_filename, - 'descr' => 'Config Error', - 'ds' => 'sce', - 'colour' => '005300', + 'descr' => 'Config Error', + 'ds' => 'sce', + 'colour' => '005300', ], [ 'filename' => $rrd_filename, - 'descr' => 'Config Problem', - 'ds' => 'scp', - 'colour' => '28006C', + 'descr' => 'Config Problem', + 'ds' => 'scp', + 'colour' => '28006C', ], [ 'filename' => $rrd_filename, - 'descr' => 'Unknown', - 'ds' => 'urr', - 'colour' => '280090', + 'descr' => 'Unknown', + 'ds' => 'urr', + 'colour' => '280090', ], ]; } else { diff --git a/includes/html/graphs/application/postfix_sr.inc.php b/includes/html/graphs/application/postfix_sr.inc.php index 580eb36ff9..853e00be1a 100644 --- a/includes/html/graphs/application/postfix_sr.inc.php +++ b/includes/html/graphs/application/postfix_sr.inc.php @@ -18,27 +18,27 @@ if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list = [ [ 'filename' => $rrd_filename, - 'descr' => 'Senders', - 'ds' => 'senders', - 'colour' => '582A72', + 'descr' => 'Senders', + 'ds' => 'senders', + 'colour' => '582A72', ], [ 'filename' => $rrd_filename, - 'descr' => 'Sending H/D', - 'ds' => 'sendinghd', - 'colour' => '28774F', + 'descr' => 'Sending H/D', + 'ds' => 'sendinghd', + 'colour' => '28774F', ], [ 'filename' => $rrd_filename, - 'descr' => 'Recipients', - 'ds' => 'recipients', - 'colour' => '88CC88', + 'descr' => 'Recipients', + 'ds' => 'recipients', + 'colour' => '88CC88', ], [ 'filename' => $rrd_filename, - 'descr' => 'Recip H/D', - 'ds' => 'recipienthd', - 'colour' => 'D46A6A', + 'descr' => 'Recip H/D', + 'ds' => 'recipienthd', + 'colour' => 'D46A6A', ], ]; } else { diff --git a/includes/html/graphs/application/postgres_backends.inc.php b/includes/html/graphs/application/postgres_backends.inc.php index 50931cfe31..2ededc5319 100644 --- a/includes/html/graphs/application/postgres_backends.inc.php +++ b/includes/html/graphs/application/postgres_backends.inc.php @@ -24,9 +24,9 @@ if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list = [ [ 'filename' => $rrd_filename, - 'descr' => 'Backends', - 'ds' => 'backends', - 'colour' => '582A72', + 'descr' => 'Backends', + 'ds' => 'backends', + 'colour' => '582A72', ], ]; } else { diff --git a/includes/html/graphs/application/postgres_cr.inc.php b/includes/html/graphs/application/postgres_cr.inc.php index e4cbe9a439..d3312143da 100644 --- a/includes/html/graphs/application/postgres_cr.inc.php +++ b/includes/html/graphs/application/postgres_cr.inc.php @@ -24,15 +24,15 @@ if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list = [ [ 'filename' => $rrd_filename, - 'descr' => 'Rollbacks', - 'ds' => 'rollbacks', - 'colour' => '28774F', + 'descr' => 'Rollbacks', + 'ds' => 'rollbacks', + 'colour' => '28774F', ], [ 'filename' => $rrd_filename, - 'descr' => 'Commits', - 'ds' => 'commits', - 'colour' => '28774F', + 'descr' => 'Commits', + 'ds' => 'commits', + 'colour' => '28774F', ], ]; } else { diff --git a/includes/html/graphs/application/postgres_hr.inc.php b/includes/html/graphs/application/postgres_hr.inc.php index 4d31122ef7..cd19532b10 100644 --- a/includes/html/graphs/application/postgres_hr.inc.php +++ b/includes/html/graphs/application/postgres_hr.inc.php @@ -24,15 +24,15 @@ if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list = [ [ 'filename' => $rrd_filename, - 'descr' => 'Blocks Read', - 'ds' => 'read', - 'colour' => 'AA5439', + 'descr' => 'Blocks Read', + 'ds' => 'read', + 'colour' => 'AA5439', ], [ 'filename' => $rrd_filename, - 'descr' => 'Buffer Hits', - 'ds' => 'hit', - 'colour' => '28774F', + 'descr' => 'Buffer Hits', + 'ds' => 'hit', + 'colour' => '28774F', ], ]; } else { diff --git a/includes/html/graphs/application/postgres_index.inc.php b/includes/html/graphs/application/postgres_index.inc.php index 79c7a8eaae..e3211c2325 100644 --- a/includes/html/graphs/application/postgres_index.inc.php +++ b/includes/html/graphs/application/postgres_index.inc.php @@ -24,33 +24,33 @@ if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list = [ [ 'filename' => $rrd_filename, - 'descr' => 'Scans', - 'ds' => 'idxscan', - 'colour' => '582A72', + 'descr' => 'Scans', + 'ds' => 'idxscan', + 'colour' => '582A72', ], [ 'filename' => $rrd_filename, - 'descr' => 'Tuples Read', - 'ds' => 'idxtupread', - 'colour' => 'AA6C39', + 'descr' => 'Tuples Read', + 'ds' => 'idxtupread', + 'colour' => 'AA6C39', ], [ 'filename' => $rrd_filename, - 'descr' => 'Tuples Fetched', - 'ds' => 'idxtupfetch', - 'colour' => 'FFD1AA', + 'descr' => 'Tuples Fetched', + 'ds' => 'idxtupfetch', + 'colour' => 'FFD1AA', ], [ 'filename' => $rrd_filename, - 'descr' => 'Blocks Read', - 'ds' => 'idxblksread', - 'colour' => '88CC88', + 'descr' => 'Blocks Read', + 'ds' => 'idxblksread', + 'colour' => '88CC88', ], [ 'filename' => $rrd_filename, - 'descr' => 'Buffer Hits', - 'ds' => 'idxblkshit', - 'colour' => '28536C', + 'descr' => 'Buffer Hits', + 'ds' => 'idxblkshit', + 'colour' => '28536C', ], ]; } else { diff --git a/includes/html/graphs/application/postgres_rows.inc.php b/includes/html/graphs/application/postgres_rows.inc.php index 3e5a7e9153..e0f90c176d 100644 --- a/includes/html/graphs/application/postgres_rows.inc.php +++ b/includes/html/graphs/application/postgres_rows.inc.php @@ -24,33 +24,33 @@ if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list = [ [ 'filename' => $rrd_filename, - 'descr' => 'Returned', - 'ds' => 'ret', - 'colour' => '582A72', + 'descr' => 'Returned', + 'ds' => 'ret', + 'colour' => '582A72', ], [ 'filename' => $rrd_filename, - 'descr' => 'Fetched', - 'ds' => 'fetch', - 'colour' => 'AA6C39', + 'descr' => 'Fetched', + 'ds' => 'fetch', + 'colour' => 'AA6C39', ], [ 'filename' => $rrd_filename, - 'descr' => 'Inserted', - 'ds' => 'ins', - 'colour' => 'FFD1AA', + 'descr' => 'Inserted', + 'ds' => 'ins', + 'colour' => 'FFD1AA', ], [ 'filename' => $rrd_filename, - 'descr' => 'Updated', - 'ds' => 'upd', - 'colour' => '88CC88', + 'descr' => 'Updated', + 'ds' => 'upd', + 'colour' => '88CC88', ], [ 'filename' => $rrd_filename, - 'descr' => 'Deleted', - 'ds' => 'del', - 'colour' => '28536C', + 'descr' => 'Deleted', + 'ds' => 'del', + 'colour' => '28536C', ], ]; } else { diff --git a/includes/html/graphs/application/postgres_sequential.inc.php b/includes/html/graphs/application/postgres_sequential.inc.php index bdadab783f..0264d53131 100644 --- a/includes/html/graphs/application/postgres_sequential.inc.php +++ b/includes/html/graphs/application/postgres_sequential.inc.php @@ -24,15 +24,15 @@ if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list = [ [ 'filename' => $rrd_filename, - 'descr' => 'Scans', - 'ds' => 'seqscan', - 'colour' => '582A72', + 'descr' => 'Scans', + 'ds' => 'seqscan', + 'colour' => '582A72', ], [ 'filename' => $rrd_filename, - 'descr' => 'Tuples Read', - 'ds' => 'seqtupread', - 'colour' => '28536C', + 'descr' => 'Tuples Read', + 'ds' => 'seqtupread', + 'colour' => '28536C', ], ]; } else { diff --git a/includes/html/graphs/application/powerdns_fail.inc.php b/includes/html/graphs/application/powerdns_fail.inc.php index 6bde5388d8..410cec9886 100644 --- a/includes/html/graphs/application/powerdns_fail.inc.php +++ b/includes/html/graphs/application/powerdns_fail.inc.php @@ -8,16 +8,16 @@ $nototal = (($width < 224) ? 1 : 0); $unit_text = 'Packets/sec'; $rrd_filename = Rrd::name($device['hostname'], ['app', 'powerdns', $app->app_id]); $array = [ - 'corruptPackets' => [ - 'descr' => 'Corrupt', + 'corruptPackets' => [ + 'descr' => 'Corrupt', 'colour' => 'FF8800FF', ], 'servfailPackets' => [ - 'descr' => 'Failed', + 'descr' => 'Failed', 'colour' => 'FF0000FF', ], - 'q_timedout' => [ - 'descr' => 'Timedout', + 'q_timedout' => [ + 'descr' => 'Timedout', 'colour' => 'FFFF00FF', ], ]; diff --git a/includes/html/graphs/application/powerdns_packetcache.inc.php b/includes/html/graphs/application/powerdns_packetcache.inc.php index fc60ed9c37..da3a672f61 100644 --- a/includes/html/graphs/application/powerdns_packetcache.inc.php +++ b/includes/html/graphs/application/powerdns_packetcache.inc.php @@ -8,16 +8,16 @@ $nototal = (($width < 224) ? 1 : 0); $unit_text = 'Packets/sec'; $rrd_filename = Rrd::name($device['hostname'], ['app', 'powerdns', $app->app_id]); $array = [ - 'pc_hit' => [ - 'descr' => 'Hits', + 'pc_hit' => [ + 'descr' => 'Hits', 'colour' => '008800FF', ], 'pc_miss' => [ - 'descr' => 'Misses', + 'descr' => 'Misses', 'colour' => '880000FF', ], 'pc_size' => [ - 'descr' => 'Size', + 'descr' => 'Size', 'colour' => '006699FF', ], ]; diff --git a/includes/html/graphs/application/powerdns_queries.inc.php b/includes/html/graphs/application/powerdns_queries.inc.php index bd522792d3..89cae14a00 100644 --- a/includes/html/graphs/application/powerdns_queries.inc.php +++ b/includes/html/graphs/application/powerdns_queries.inc.php @@ -9,19 +9,19 @@ $unit_text = 'Packets/sec'; $rrd_filename = Rrd::name($device['hostname'], ['app', 'powerdns', $app->app_id]); $array = [ 'q_tcpAnswers' => [ - 'descr' => 'TCP Answers', + 'descr' => 'TCP Answers', 'colour' => '008800FF', ], 'q_tcpQueries' => [ - 'descr' => 'TCP Queries', + 'descr' => 'TCP Queries', 'colour' => '00FF00FF', ], 'q_udpAnswers' => [ - 'descr' => 'UDP Answers', + 'descr' => 'UDP Answers', 'colour' => '336699FF', ], 'q_udpQueries' => [ - 'descr' => 'UDP Queries', + 'descr' => 'UDP Queries', 'colour' => '6699CCFF', ], ]; diff --git a/includes/html/graphs/application/powerdns_queries_udp.inc.php b/includes/html/graphs/application/powerdns_queries_udp.inc.php index 6adf1a7458..e6a0ea0e87 100644 --- a/includes/html/graphs/application/powerdns_queries_udp.inc.php +++ b/includes/html/graphs/application/powerdns_queries_udp.inc.php @@ -9,19 +9,19 @@ $unit_text = 'Packets/sec'; $rrd_filename = Rrd::name($device['hostname'], ['app', 'powerdns', $app->app_id]); $array = [ 'q_udp4Answers' => [ - 'descr' => 'UDP4 Answers', + 'descr' => 'UDP4 Answers', 'colour' => '00008888', ], 'q_udp4Queries' => [ - 'descr' => 'UDP4 Queries', + 'descr' => 'UDP4 Queries', 'colour' => '000088FF', ], 'q_udp6Answers' => [ - 'descr' => 'UDP6 Answers', + 'descr' => 'UDP6 Answers', 'colour' => '88000088', ], 'q_udp6Queries' => [ - 'descr' => 'UDP6 Queries', + 'descr' => 'UDP6 Queries', 'colour' => '880000FF', ], ]; diff --git a/includes/html/graphs/application/powerdns_querycache.inc.php b/includes/html/graphs/application/powerdns_querycache.inc.php index 9c7a406573..226bf3922b 100644 --- a/includes/html/graphs/application/powerdns_querycache.inc.php +++ b/includes/html/graphs/application/powerdns_querycache.inc.php @@ -9,11 +9,11 @@ $unit_text = 'Packets/sec'; $rrd_filename = Rrd::name($device['hostname'], ['app', 'powerdns', $app->app_id]); $array = [ 'qc_miss' => [ - 'descr' => 'Misses', + 'descr' => 'Misses', 'colour' => '750F7DFF', ], - 'qc_hit' => [ - 'descr' => 'Hits', + 'qc_hit' => [ + 'descr' => 'Hits', 'colour' => '00FF00FF', ], ]; diff --git a/includes/html/graphs/application/powerdns_recursing.inc.php b/includes/html/graphs/application/powerdns_recursing.inc.php index c8ad63cfd1..b44dea29bb 100644 --- a/includes/html/graphs/application/powerdns_recursing.inc.php +++ b/includes/html/graphs/application/powerdns_recursing.inc.php @@ -9,11 +9,11 @@ $unit_text = 'Packets/sec'; $rrd_filename = Rrd::name($device['hostname'], ['app', 'powerdns', $app->app_id]); $array = [ 'rec_questions' => [ - 'descr' => 'Questions', + 'descr' => 'Questions', 'colour' => '6699CCFF', ], - 'rec_answers' => [ - 'descr' => 'Answers', + 'rec_answers' => [ + 'descr' => 'Answers', 'colour' => '336699FF', ], ]; diff --git a/includes/html/graphs/application/privoxy_req.inc.php b/includes/html/graphs/application/privoxy_req.inc.php index 0e3e007398..65f3fac609 100644 --- a/includes/html/graphs/application/privoxy_req.inc.php +++ b/includes/html/graphs/application/privoxy_req.inc.php @@ -14,48 +14,48 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'CONNECT', - 'ds' => 'req_connect', + 'descr' => 'CONNECT', + 'ds' => 'req_connect', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'DELETE', - 'ds' => 'req_delete', + 'descr' => 'DELETE', + 'ds' => 'req_delete', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'GET', - 'ds' => 'req_get', + 'descr' => 'GET', + 'ds' => 'req_get', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'HEAD', - 'ds' => 'req_head', + 'descr' => 'HEAD', + 'ds' => 'req_head', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'OPTIONS', - 'ds' => 'req_options', + 'descr' => 'OPTIONS', + 'ds' => 'req_options', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'PATCH', - 'ds' => 'req_patch', + 'descr' => 'PATCH', + 'ds' => 'req_patch', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'POST', - 'ds' => 'req_post', + 'descr' => 'POST', + 'ds' => 'req_post', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'PUT', - 'ds' => 'req_put', + 'descr' => 'PUT', + 'ds' => 'req_put', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'TRACE', - 'ds' => 'req_trace', + 'descr' => 'TRACE', + 'ds' => 'req_trace', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/privoxy_resp_xxx.inc.php b/includes/html/graphs/application/privoxy_resp_xxx.inc.php index 519f8138c2..69a7859a19 100644 --- a/includes/html/graphs/application/privoxy_resp_xxx.inc.php +++ b/includes/html/graphs/application/privoxy_resp_xxx.inc.php @@ -14,28 +14,28 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => '1xx', - 'ds' => 'resp_1xx', + 'descr' => '1xx', + 'ds' => 'resp_1xx', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => '2xx', - 'ds' => 'resp_2xx', + 'descr' => '2xx', + 'ds' => 'resp_2xx', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => '3xx', - 'ds' => 'resp_3xx', + 'descr' => '3xx', + 'ds' => 'resp_3xx', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => '4xx', - 'ds' => 'resp_4xx', + 'descr' => '4xx', + 'ds' => 'resp_4xx', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => '5xx', - 'ds' => 'resp_5xx', + 'descr' => '5xx', + 'ds' => 'resp_5xx', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/privoxy_ver.inc.php b/includes/html/graphs/application/privoxy_ver.inc.php index 7670064aaa..3a4e059373 100644 --- a/includes/html/graphs/application/privoxy_ver.inc.php +++ b/includes/html/graphs/application/privoxy_ver.inc.php @@ -14,23 +14,23 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => '1.0', - 'ds' => 'ver_1_0', + 'descr' => '1.0', + 'ds' => 'ver_1_0', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => '1.1', - 'ds' => 'ver_1_1', + 'descr' => '1.1', + 'ds' => 'ver_1_1', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => '2', - 'ds' => 'ver_2', + 'descr' => '2', + 'ds' => 'ver_2', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => '3', - 'ds' => 'ver_3', + 'descr' => '3', + 'ds' => 'ver_3', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/pureftpd_bitrate.inc.php b/includes/html/graphs/application/pureftpd_bitrate.inc.php index 5653c5a3b1..cccc7ae377 100644 --- a/includes/html/graphs/application/pureftpd_bitrate.inc.php +++ b/includes/html/graphs/application/pureftpd_bitrate.inc.php @@ -11,7 +11,7 @@ $colours = 'mixed'; $array = [ 'download' => 'Download', - 'upload' => 'Upload', + 'upload' => 'Upload', ]; $rrd_filename = Rrd::name($device['hostname'], ['app', 'pureftpd', $app->app_id, 'bitrate']); diff --git a/includes/html/graphs/application/pureftpd_connections.inc.php b/includes/html/graphs/application/pureftpd_connections.inc.php index 3cb3a9ec01..e5d06613c8 100644 --- a/includes/html/graphs/application/pureftpd_connections.inc.php +++ b/includes/html/graphs/application/pureftpd_connections.inc.php @@ -11,8 +11,8 @@ $colours = 'mixed'; $array = [ 'download' => 'Download', - 'upload' => 'Upload', - 'idle' => 'Idle', + 'upload' => 'Upload', + 'idle' => 'Idle', ]; $rrd_filename = Rrd::name($device['hostname'], ['app', 'pureftpd', $app->app_id, 'connections']); diff --git a/includes/html/graphs/application/pwrstatd_minutes.inc.php b/includes/html/graphs/application/pwrstatd_minutes.inc.php index 3cc739a95a..7432e4aacc 100644 --- a/includes/html/graphs/application/pwrstatd_minutes.inc.php +++ b/includes/html/graphs/application/pwrstatd_minutes.inc.php @@ -6,7 +6,7 @@ $bigdescrlen = 25; $smalldescrlen = 25; $rrdArray = [ - 'mruntime' => ['descr' => 'PSU Battery Runtime'], + 'mruntime' => ['descr' => 'PSU Battery Runtime'], ]; require 'pwrstatd-common.inc.php'; diff --git a/includes/html/graphs/application/pwrstatd_percentage.inc.php b/includes/html/graphs/application/pwrstatd_percentage.inc.php index 5527541668..9ecf98ea26 100644 --- a/includes/html/graphs/application/pwrstatd_percentage.inc.php +++ b/includes/html/graphs/application/pwrstatd_percentage.inc.php @@ -6,8 +6,8 @@ $bigdescrlen = 25; $smalldescrlen = 25; $rrdArray = [ - 'pcapacity' => ['descr' => 'PSU Battery Charge'], - 'pload' => ['descr' => 'PSU Load'], + 'pcapacity' => ['descr' => 'PSU Battery Charge'], + 'pload' => ['descr' => 'PSU Load'], ]; require 'pwrstatd-common.inc.php'; diff --git a/includes/html/graphs/application/pwrstatd_voltage.inc.php b/includes/html/graphs/application/pwrstatd_voltage.inc.php index 49c04b49e0..5e309cab67 100644 --- a/includes/html/graphs/application/pwrstatd_voltage.inc.php +++ b/includes/html/graphs/application/pwrstatd_voltage.inc.php @@ -6,9 +6,9 @@ $bigdescrlen = 25; $smalldescrlen = 25; $rrdArray = [ - 'voutput' => ['descr' => 'PSU Output'], - 'vrating' => ['descr' => 'PSU Rating'], - 'vutility' => ['descr' => 'Utility Output'], + 'voutput' => ['descr' => 'PSU Output'], + 'vrating' => ['descr' => 'PSU Rating'], + 'vutility' => ['descr' => 'Utility Output'], ]; require 'pwrstatd-common.inc.php'; diff --git a/includes/html/graphs/application/pwrstatd_wattage.inc.php b/includes/html/graphs/application/pwrstatd_wattage.inc.php index 33dbf1b559..63d1b008ba 100644 --- a/includes/html/graphs/application/pwrstatd_wattage.inc.php +++ b/includes/html/graphs/application/pwrstatd_wattage.inc.php @@ -6,8 +6,8 @@ $bigdescrlen = 25; $smalldescrlen = 25; $rrdArray = [ - 'wload' => ['descr' => 'PSU Load'], - 'wrating' => ['descr' => 'PSU Rating'], + 'wload' => ['descr' => 'PSU Load'], + 'wrating' => ['descr' => 'PSU Rating'], ]; require 'pwrstatd-common.inc.php'; diff --git a/includes/html/graphs/application/redis_clients.inc.php b/includes/html/graphs/application/redis_clients.inc.php index ccf8956805..fce1b37bdb 100644 --- a/includes/html/graphs/application/redis_clients.inc.php +++ b/includes/html/graphs/application/redis_clients.inc.php @@ -12,7 +12,7 @@ $colours = 'mixed'; $array = [ 'connected' => 'Connected', - 'blocked' => 'Blocked', + 'blocked' => 'Blocked', ]; $rrd_filename = Rrd::name($device['hostname'], ['app', 'redis', $app->app_id, 'clients']); diff --git a/includes/html/graphs/application/redis_defrag.inc.php b/includes/html/graphs/application/redis_defrag.inc.php index 51f579cc57..e2ee9cf085 100644 --- a/includes/html/graphs/application/redis_defrag.inc.php +++ b/includes/html/graphs/application/redis_defrag.inc.php @@ -13,9 +13,9 @@ $rrd_filename = Rrd::name($device['hostname'], ['app', 'redis', $app->app_id, 'd $array = [ 'hits' => 'Hits', - 'misses' => 'Misses', - 'key_hits' => 'Key Hits', - 'key_misses' => 'Key Misses', + 'misses' => 'Misses', + 'key_hits' => 'Key Hits', + 'key_misses' => 'Key Misses', ]; $rrd_list = []; diff --git a/includes/html/graphs/application/redis_fragmentation.inc.php b/includes/html/graphs/application/redis_fragmentation.inc.php index ee338b0493..02be71d0c9 100644 --- a/includes/html/graphs/application/redis_fragmentation.inc.php +++ b/includes/html/graphs/application/redis_fragmentation.inc.php @@ -13,7 +13,7 @@ $colours = 'mixed'; $rrd_filename = Rrd::name($device['hostname'], ['app', 'redis', $app->app_id, 'fragmentation']); $array = [ - 'bytes' => 'Bytes', + 'bytes' => 'Bytes', ]; $rrd_list = []; diff --git a/includes/html/graphs/application/redis_keyspace.inc.php b/includes/html/graphs/application/redis_keyspace.inc.php index 9c6679d887..78ba22c5e9 100644 --- a/includes/html/graphs/application/redis_keyspace.inc.php +++ b/includes/html/graphs/application/redis_keyspace.inc.php @@ -14,7 +14,7 @@ $rrd_filename = Rrd::name($device['hostname'], ['app', 'redis', $app->app_id, 'k $array = [ 'hits' => 'Hits', - 'misses' => 'Misses', + 'misses' => 'Misses', ]; $rrd_list = []; diff --git a/includes/html/graphs/application/redis_memory.inc.php b/includes/html/graphs/application/redis_memory.inc.php index 4db735a119..f68f3da4f7 100644 --- a/includes/html/graphs/application/redis_memory.inc.php +++ b/includes/html/graphs/application/redis_memory.inc.php @@ -14,10 +14,10 @@ $rrd_filename = Rrd::name($device['hostname'], ['app', 'redis', $app->app_id, 'm $array = [ 'active' => 'Active', - 'allocated' => 'Allocated', - 'resident' => 'Resident', - 'frag_bytes' => 'Frag Bytes', - 'rss_bytes' => 'RSS Bytes', + 'allocated' => 'Allocated', + 'resident' => 'Resident', + 'frag_bytes' => 'Frag Bytes', + 'rss_bytes' => 'RSS Bytes', ]; $rrd_list = []; diff --git a/includes/html/graphs/application/redis_net.inc.php b/includes/html/graphs/application/redis_net.inc.php index bf13a01d58..caca1ca8a1 100644 --- a/includes/html/graphs/application/redis_net.inc.php +++ b/includes/html/graphs/application/redis_net.inc.php @@ -14,7 +14,7 @@ $rrd_filename = Rrd::name($device['hostname'], ['app', 'redis', $app->app_id, 'n $array = [ 'input_bytes' => 'Input', - 'output_bytes' => 'Output', + 'output_bytes' => 'Output', ]; $rrd_list = []; diff --git a/includes/html/graphs/application/redis_sync.inc.php b/includes/html/graphs/application/redis_sync.inc.php index 2091116423..746fadc1bb 100644 --- a/includes/html/graphs/application/redis_sync.inc.php +++ b/includes/html/graphs/application/redis_sync.inc.php @@ -14,8 +14,8 @@ $rrd_filename = Rrd::name($device['hostname'], ['app', 'redis', $app->app_id, 's $array = [ 'full' => 'Full', - 'ok' => 'OK', - 'err' => 'Error', + 'ok' => 'OK', + 'err' => 'Error', ]; $rrd_list = []; diff --git a/includes/html/graphs/application/redis_usage.inc.php b/includes/html/graphs/application/redis_usage.inc.php index 74682aab63..838e17975b 100644 --- a/includes/html/graphs/application/redis_usage.inc.php +++ b/includes/html/graphs/application/redis_usage.inc.php @@ -14,13 +14,13 @@ $rrd_filename = Rrd::name($device['hostname'], ['app', 'redis', $app->app_id, 'u $array = [ 'allocated' => 'Allocated', - 'dataset' => 'Dataset', - 'lua' => 'LUA', - 'overhead' => 'Overhead', - 'peak' => 'Peak', - 'rss' => 'RSS', - 'scripts' => 'Scripts', - 'startup' => 'Startup', + 'dataset' => 'Dataset', + 'lua' => 'LUA', + 'overhead' => 'Overhead', + 'peak' => 'Peak', + 'rss' => 'RSS', + 'scripts' => 'Scripts', + 'startup' => 'Startup', ]; $rrd_list = []; diff --git a/includes/html/graphs/application/sagan_after.inc.php b/includes/html/graphs/application/sagan_after.inc.php index 308e8a7da4..c9a5eff812 100644 --- a/includes/html/graphs/application/sagan_after.inc.php +++ b/includes/html/graphs/application/sagan_after.inc.php @@ -18,8 +18,8 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'After', - 'ds' => 'after', + 'descr' => 'After', + 'ds' => 'after', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/sagan_alert.inc.php b/includes/html/graphs/application/sagan_alert.inc.php index 85c8567e79..e53bd3fb75 100644 --- a/includes/html/graphs/application/sagan_alert.inc.php +++ b/includes/html/graphs/application/sagan_alert.inc.php @@ -18,8 +18,8 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Alert', - 'ds' => 'alert', + 'descr' => 'Alert', + 'ds' => 'alert', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/sagan_bytes.inc.php b/includes/html/graphs/application/sagan_bytes.inc.php index 16e889c8a0..5323560d74 100644 --- a/includes/html/graphs/application/sagan_bytes.inc.php +++ b/includes/html/graphs/application/sagan_bytes.inc.php @@ -18,8 +18,8 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Bytes', - 'ds' => 'bytes', + 'descr' => 'Bytes', + 'ds' => 'bytes', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/sagan_bytes_ignored.inc.php b/includes/html/graphs/application/sagan_bytes_ignored.inc.php index b91cd7fe20..4cac0200a3 100644 --- a/includes/html/graphs/application/sagan_bytes_ignored.inc.php +++ b/includes/html/graphs/application/sagan_bytes_ignored.inc.php @@ -18,8 +18,8 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Bytes Ignores', - 'ds' => 'bytes_ignored', + 'descr' => 'Bytes Ignores', + 'ds' => 'bytes_ignored', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/sagan_drop.inc.php b/includes/html/graphs/application/sagan_drop.inc.php index 64265a6087..956f7dd54c 100644 --- a/includes/html/graphs/application/sagan_drop.inc.php +++ b/includes/html/graphs/application/sagan_drop.inc.php @@ -18,8 +18,8 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Drop', - 'ds' => 'drop', + 'descr' => 'Drop', + 'ds' => 'drop', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/sagan_drop_percent.inc.php b/includes/html/graphs/application/sagan_drop_percent.inc.php index e6a6889973..969431e359 100644 --- a/includes/html/graphs/application/sagan_drop_percent.inc.php +++ b/includes/html/graphs/application/sagan_drop_percent.inc.php @@ -18,8 +18,8 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Drop%', - 'ds' => 'drop_percent', + 'descr' => 'Drop%', + 'ds' => 'drop_percent', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/sagan_eps.inc.php b/includes/html/graphs/application/sagan_eps.inc.php index 4d5ce0b95e..9b2dd5aba1 100644 --- a/includes/html/graphs/application/sagan_eps.inc.php +++ b/includes/html/graphs/application/sagan_eps.inc.php @@ -18,8 +18,8 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'EPS', - 'ds' => 'eps', + 'descr' => 'EPS', + 'ds' => 'eps', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/sagan_f_drop_percent.inc.php b/includes/html/graphs/application/sagan_f_drop_percent.inc.php index 9521fd62c3..492ab63c9e 100644 --- a/includes/html/graphs/application/sagan_f_drop_percent.inc.php +++ b/includes/html/graphs/application/sagan_f_drop_percent.inc.php @@ -18,8 +18,8 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Flow Drop%', - 'ds' => 'f_drop_percent', + 'descr' => 'Flow Drop%', + 'ds' => 'f_drop_percent', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/sagan_f_dropped.inc.php b/includes/html/graphs/application/sagan_f_dropped.inc.php index 6494b5ece5..6ae4cdcd21 100644 --- a/includes/html/graphs/application/sagan_f_dropped.inc.php +++ b/includes/html/graphs/application/sagan_f_dropped.inc.php @@ -18,8 +18,8 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Flows Dropped', - 'ds' => 'f_dropped', + 'descr' => 'Flows Dropped', + 'ds' => 'f_dropped', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/sagan_f_total.inc.php b/includes/html/graphs/application/sagan_f_total.inc.php index 92c03c6444..9102551e57 100644 --- a/includes/html/graphs/application/sagan_f_total.inc.php +++ b/includes/html/graphs/application/sagan_f_total.inc.php @@ -18,8 +18,8 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Flows', - 'ds' => 'f_total', + 'descr' => 'Flows', + 'ds' => 'f_total', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/sagan_ignore.inc.php b/includes/html/graphs/application/sagan_ignore.inc.php index 731b226be3..1cf43da9f1 100644 --- a/includes/html/graphs/application/sagan_ignore.inc.php +++ b/includes/html/graphs/application/sagan_ignore.inc.php @@ -18,8 +18,8 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Ignored', - 'ds' => 'ignore', + 'descr' => 'Ignored', + 'ds' => 'ignore', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/sagan_match.inc.php b/includes/html/graphs/application/sagan_match.inc.php index 9319508e2e..39b1a5aee0 100644 --- a/includes/html/graphs/application/sagan_match.inc.php +++ b/includes/html/graphs/application/sagan_match.inc.php @@ -18,8 +18,8 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Matched', - 'ds' => 'match', + 'descr' => 'Matched', + 'ds' => 'match', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/sagan_max_bytes_log_line.inc.php b/includes/html/graphs/application/sagan_max_bytes_log_line.inc.php index 8c9fbb2adb..a3f1d8f703 100644 --- a/includes/html/graphs/application/sagan_max_bytes_log_line.inc.php +++ b/includes/html/graphs/application/sagan_max_bytes_log_line.inc.php @@ -18,8 +18,8 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Max Log Line', - 'ds' => 'max_bytes_log_line', + 'descr' => 'Max Log Line', + 'ds' => 'max_bytes_log_line', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/sagan_threshold.inc.php b/includes/html/graphs/application/sagan_threshold.inc.php index adc32d3e93..2248ef8eda 100644 --- a/includes/html/graphs/application/sagan_threshold.inc.php +++ b/includes/html/graphs/application/sagan_threshold.inc.php @@ -18,8 +18,8 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Threshold', - 'ds' => 'threshold', + 'descr' => 'Threshold', + 'ds' => 'threshold', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/sagan_total.inc.php b/includes/html/graphs/application/sagan_total.inc.php index 7f4246e9f7..007adf8b55 100644 --- a/includes/html/graphs/application/sagan_total.inc.php +++ b/includes/html/graphs/application/sagan_total.inc.php @@ -18,8 +18,8 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Total', - 'ds' => 'total', + 'descr' => 'Total', + 'ds' => 'total', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/sagan_uptime.inc.php b/includes/html/graphs/application/sagan_uptime.inc.php index 682bb58999..0ef11de6e6 100644 --- a/includes/html/graphs/application/sagan_uptime.inc.php +++ b/includes/html/graphs/application/sagan_uptime.inc.php @@ -18,8 +18,8 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Uptime', - 'ds' => 'uptime', + 'descr' => 'Uptime', + 'ds' => 'uptime', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/seafile-common.inc.php b/includes/html/graphs/application/seafile-common.inc.php index 3cf0a63352..14f2b8fe63 100644 --- a/includes/html/graphs/application/seafile-common.inc.php +++ b/includes/html/graphs/application/seafile-common.inc.php @@ -22,8 +22,8 @@ while (isset($arrays[$int])) { if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => str_replace($category . '-', '', $array), - 'ds' => $rrdVar, + 'descr' => str_replace($category . '-', '', $array), + 'ds' => $rrdVar, ]; } $int++; diff --git a/includes/html/graphs/application/shoutcast_multi_bits.inc.php b/includes/html/graphs/application/shoutcast_multi_bits.inc.php index b1e43dd659..f79f933840 100644 --- a/includes/html/graphs/application/shoutcast_multi_bits.inc.php +++ b/includes/html/graphs/application/shoutcast_multi_bits.inc.php @@ -28,9 +28,9 @@ foreach ($rrd_filenames as $file) { [$host, $port] = explode('_', $hostname, 2); $rrd_list[] = [ 'filename' => $file, - 'descr' => $host . ':' . $port, - 'ds_in' => $ds_in, - 'ds_out' => $ds_out, + 'descr' => $host . ':' . $port, + 'ds_in' => $ds_in, + 'ds_out' => $ds_out, ]; } diff --git a/includes/html/graphs/application/shoutcast_multi_stats.inc.php b/includes/html/graphs/application/shoutcast_multi_stats.inc.php index 4ecf7c5ad2..33f9a416b3 100644 --- a/includes/html/graphs/application/shoutcast_multi_stats.inc.php +++ b/includes/html/graphs/application/shoutcast_multi_stats.inc.php @@ -15,7 +15,7 @@ foreach ($rrd_filenames as $file) { [$host, $port] = explode('_', $hostname, 2); $rrd_list[] = [ 'filename' => $file, - 'descr' => $host . ':' . $port, + 'descr' => $host . ':' . $port, // 'colour' => $colour ]; } diff --git a/includes/html/graphs/application/smart-common.inc.php b/includes/html/graphs/application/smart-common.inc.php index 35b8113375..14f87bf7ea 100644 --- a/includes/html/graphs/application/smart-common.inc.php +++ b/includes/html/graphs/application/smart-common.inc.php @@ -30,8 +30,8 @@ while (isset($disks[$int])) { if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => $disk, - 'ds' => $rrdVar, + 'descr' => $disk, + 'ds' => $rrdVar, ]; } $int++; diff --git a/includes/html/graphs/application/smart_big5.inc.php b/includes/html/graphs/application/smart_big5.inc.php index 06b51ce0e4..fc5ad7204b 100644 --- a/includes/html/graphs/application/smart_big5.inc.php +++ b/includes/html/graphs/application/smart_big5.inc.php @@ -16,28 +16,28 @@ $rrd_filename = Rrd::name($device['hostname'], ['app', $name, $app->app_id, $var if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Reallocated_Sector_Ct', - 'ds' => 'id5', + 'descr' => 'Reallocated_Sector_Ct', + 'ds' => 'id5', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Reported_Uncorrect', - 'ds' => 'id187', + 'descr' => 'Reported_Uncorrect', + 'ds' => 'id187', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Command_Timeout', - 'ds' => 'id188', + 'descr' => 'Command_Timeout', + 'ds' => 'id188', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Current_Pending_Sector', - 'ds' => 'id197', + 'descr' => 'Current_Pending_Sector', + 'ds' => 'id197', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Offline_Uncorrectable', - 'ds' => 'id198', + 'descr' => 'Offline_Uncorrectable', + 'ds' => 'id198', ]; } diff --git a/includes/html/graphs/application/smart_other.inc.php b/includes/html/graphs/application/smart_other.inc.php index 4cc37a8989..2874068d3d 100644 --- a/includes/html/graphs/application/smart_other.inc.php +++ b/includes/html/graphs/application/smart_other.inc.php @@ -16,28 +16,28 @@ $rrd_filename = Rrd::name($device['hostname'], ['app', $name, $app->app_id, $var if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Spin_Retry_Count', - 'ds' => 'id10', + 'descr' => 'Spin_Retry_Count', + 'ds' => 'id10', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Runtime_Bad_Block', - 'ds' => 'id183', + 'descr' => 'Runtime_Bad_Block', + 'ds' => 'id183', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'End-to-End_Error', - 'ds' => 'id184', + 'descr' => 'End-to-End_Error', + 'ds' => 'id184', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Reallocated_Event_Count', - 'ds' => 'id197', + 'descr' => 'Reallocated_Event_Count', + 'ds' => 'id197', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'UDMA_CRC_Error_Count', - 'ds' => 'id199', + 'descr' => 'UDMA_CRC_Error_Count', + 'ds' => 'id199', ]; } diff --git a/includes/html/graphs/application/smart_runtime.inc.php b/includes/html/graphs/application/smart_runtime.inc.php index 96753d56e7..e7bce8a99e 100644 --- a/includes/html/graphs/application/smart_runtime.inc.php +++ b/includes/html/graphs/application/smart_runtime.inc.php @@ -16,8 +16,8 @@ $rrd_filename = Rrd::name($device['hostname'], ['app', $name, $app->app_id, $var if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Power On Hours', - 'ds' => 'id9', + 'descr' => 'Power On Hours', + 'ds' => 'id9', ]; } diff --git a/includes/html/graphs/application/smart_ssd.inc.php b/includes/html/graphs/application/smart_ssd.inc.php index e85238ca19..6c4b72042f 100644 --- a/includes/html/graphs/application/smart_ssd.inc.php +++ b/includes/html/graphs/application/smart_ssd.inc.php @@ -17,28 +17,28 @@ $rrd_filename_232 = Rrd::name($device['hostname'], ['app', $name . '_id232', $ap if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Worst_Case_Erase_Count', - 'ds' => 'id173', + 'descr' => 'Worst_Case_Erase_Count', + 'ds' => 'id173', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Wear_Leveling_Count', - 'ds' => 'id177', + 'descr' => 'Wear_Leveling_Count', + 'ds' => 'id177', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'SSD_Life_Left', - 'ds' => 'id231', + 'descr' => 'SSD_Life_Left', + 'ds' => 'id231', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Media_Wearout_Indicator', - 'ds' => 'id233', + 'descr' => 'Media_Wearout_Indicator', + 'ds' => 'id233', ]; $rrd_list[] = [ 'filename' => $rrd_filename_232, - 'descr' => 'Available_Reservd_Space', - 'ds' => 'id232', + 'descr' => 'Available_Reservd_Space', + 'ds' => 'id232', ]; } diff --git a/includes/html/graphs/application/smart_temp.inc.php b/includes/html/graphs/application/smart_temp.inc.php index 47946afc42..1608e021bd 100644 --- a/includes/html/graphs/application/smart_temp.inc.php +++ b/includes/html/graphs/application/smart_temp.inc.php @@ -16,13 +16,13 @@ $rrd_filename = Rrd::name($device['hostname'], ['app', $name, $app->app_id, $var if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Temperature_Celsius', - 'ds' => 'id194', + 'descr' => 'Temperature_Celsius', + 'ds' => 'id194', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Airflow_Temperature_Cel', - 'ds' => 'id190', + 'descr' => 'Airflow_Temperature_Cel', + 'ds' => 'id190', ]; } diff --git a/includes/html/graphs/application/smart_tests_ran.inc.php b/includes/html/graphs/application/smart_tests_ran.inc.php index 443ca0eee4..5ff83d4963 100644 --- a/includes/html/graphs/application/smart_tests_ran.inc.php +++ b/includes/html/graphs/application/smart_tests_ran.inc.php @@ -16,23 +16,23 @@ $rrd_filename = Rrd::name($device['hostname'], ['app', $name, $app->app_id, $var if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Extended', - 'ds' => 'extended', + 'descr' => 'Extended', + 'ds' => 'extended', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Short', - 'ds' => 'short', + 'descr' => 'Short', + 'ds' => 'short', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Selective', - 'ds' => 'selective', + 'descr' => 'Selective', + 'ds' => 'selective', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Conveyance', - 'ds' => 'conveyance', + 'descr' => 'Conveyance', + 'ds' => 'conveyance', ]; } diff --git a/includes/html/graphs/application/smart_tests_status.inc.php b/includes/html/graphs/application/smart_tests_status.inc.php index a7c0a23a58..0d13c65be5 100644 --- a/includes/html/graphs/application/smart_tests_status.inc.php +++ b/includes/html/graphs/application/smart_tests_status.inc.php @@ -16,23 +16,23 @@ $rrd_filename = Rrd::name($device['hostname'], ['app', $name, $app->app_id, $var if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Completed', - 'ds' => 'completed', + 'descr' => 'Completed', + 'ds' => 'completed', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Interrupted', - 'ds' => 'interrupted', + 'descr' => 'Interrupted', + 'ds' => 'interrupted', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Read Failure', - 'ds' => 'readfailure', + 'descr' => 'Read Failure', + 'ds' => 'readfailure', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Unknown Failure', - 'ds' => 'unknownfail', + 'descr' => 'Unknown Failure', + 'ds' => 'unknownfail', ]; } diff --git a/includes/html/graphs/application/sneck_results.inc.php b/includes/html/graphs/application/sneck_results.inc.php index 20f1f7b8c7..f2d9bbb99b 100644 --- a/includes/html/graphs/application/sneck_results.inc.php +++ b/includes/html/graphs/application/sneck_results.inc.php @@ -15,28 +15,28 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'OK', - 'ds' => 'ok', + 'descr' => 'OK', + 'ds' => 'ok', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Warning', - 'ds' => 'warning', + 'descr' => 'Warning', + 'ds' => 'warning', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Critical', - 'ds' => 'critical', + 'descr' => 'Critical', + 'ds' => 'critical', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Unknown', - 'ds' => 'unknown', + 'descr' => 'Unknown', + 'ds' => 'unknown', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Errored', - 'ds' => 'errored', + 'descr' => 'Errored', + 'ds' => 'errored', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/sneck_time.inc.php b/includes/html/graphs/application/sneck_time.inc.php index 93493acccf..d8a300e3c9 100644 --- a/includes/html/graphs/application/sneck_time.inc.php +++ b/includes/html/graphs/application/sneck_time.inc.php @@ -14,13 +14,13 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'On Dev', - 'ds' => 'time', + 'descr' => 'On Dev', + 'ds' => 'time', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'To Polling', - 'ds' => 'time_to_polling', + 'descr' => 'To Polling', + 'ds' => 'time_to_polling', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/squid_bytehit.inc.php b/includes/html/graphs/application/squid_bytehit.inc.php index 89f900f944..a06f08fe4b 100644 --- a/includes/html/graphs/application/squid_bytehit.inc.php +++ b/includes/html/graphs/application/squid_bytehit.inc.php @@ -17,21 +17,21 @@ if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list = [ [ 'filename' => $rrd_filename, - 'descr' => '1 minute', - 'ds' => 'reqbyteratio1', - 'colour' => '582a72', + 'descr' => '1 minute', + 'ds' => 'reqbyteratio1', + 'colour' => '582a72', ], [ 'filename' => $rrd_filename, - 'descr' => '5 minute', - 'ds' => 'reqbyteratio5', - 'colour' => '28774f', + 'descr' => '5 minute', + 'ds' => 'reqbyteratio5', + 'colour' => '28774f', ], [ 'filename' => $rrd_filename, - 'descr' => '60 minute', - 'ds' => 'reqbyteratio60', - 'colour' => '28536c', + 'descr' => '60 minute', + 'ds' => 'reqbyteratio60', + 'colour' => '28536c', ], ]; } else { diff --git a/includes/html/graphs/application/squid_clients.inc.php b/includes/html/graphs/application/squid_clients.inc.php index f6694dc4a0..e3b3e7ab64 100644 --- a/includes/html/graphs/application/squid_clients.inc.php +++ b/includes/html/graphs/application/squid_clients.inc.php @@ -17,9 +17,9 @@ if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list = [ [ 'filename' => $rrd_filename, - 'descr' => 'clients', - 'ds' => 'clients', - 'colour' => '582a72', + 'descr' => 'clients', + 'ds' => 'clients', + 'colour' => '582a72', ], ]; } else { diff --git a/includes/html/graphs/application/squid_cputime.inc.php b/includes/html/graphs/application/squid_cputime.inc.php index f8dd2dacb6..2575f1aa0b 100644 --- a/includes/html/graphs/application/squid_cputime.inc.php +++ b/includes/html/graphs/application/squid_cputime.inc.php @@ -17,9 +17,9 @@ if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list = [ [ 'filename' => $rrd_filename, - 'descr' => 'cpu time', - 'ds' => 'cputime', - 'colour' => '582a72', + 'descr' => 'cpu time', + 'ds' => 'cputime', + 'colour' => '582a72', ], ]; } else { diff --git a/includes/html/graphs/application/squid_cpuusage.inc.php b/includes/html/graphs/application/squid_cpuusage.inc.php index f247031270..28ad519ca6 100644 --- a/includes/html/graphs/application/squid_cpuusage.inc.php +++ b/includes/html/graphs/application/squid_cpuusage.inc.php @@ -17,9 +17,9 @@ if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list = [ [ 'filename' => $rrd_filename, - 'descr' => 'cpu usage', - 'ds' => 'cpuusage', - 'colour' => '582a72', + 'descr' => 'cpu usage', + 'ds' => 'cpuusage', + 'colour' => '582a72', ], ]; } else { diff --git a/includes/html/graphs/application/squid_filedescr.inc.php b/includes/html/graphs/application/squid_filedescr.inc.php index 4c663e8837..1443612c67 100644 --- a/includes/html/graphs/application/squid_filedescr.inc.php +++ b/includes/html/graphs/application/squid_filedescr.inc.php @@ -17,15 +17,15 @@ if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list = [ [ 'filename' => $rrd_filename, - 'descr' => 'in use', - 'ds' => 'curfiledescrcnt', - 'colour' => '28536c', + 'descr' => 'in use', + 'ds' => 'curfiledescrcnt', + 'colour' => '28536c', ], [ 'filename' => $rrd_filename, - 'descr' => 'max', - 'ds' => 'curfiledescrmax', - 'colour' => 'd46a6a', + 'descr' => 'max', + 'ds' => 'curfiledescrmax', + 'colour' => 'd46a6a', ], ]; } else { diff --git a/includes/html/graphs/application/squid_http.inc.php b/includes/html/graphs/application/squid_http.inc.php index 95453867df..c1411b4747 100644 --- a/includes/html/graphs/application/squid_http.inc.php +++ b/includes/html/graphs/application/squid_http.inc.php @@ -17,21 +17,21 @@ if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list = [ [ 'filename' => $rrd_filename, - 'descr' => 'requests', - 'ds' => 'protoclienthttpreq', - 'colour' => '582a72', + 'descr' => 'requests', + 'ds' => 'protoclienthttpreq', + 'colour' => '582a72', ], [ 'filename' => $rrd_filename, - 'descr' => 'hits', - 'ds' => 'httphits', - 'colour' => '28774f', + 'descr' => 'hits', + 'ds' => 'httphits', + 'colour' => '28774f', ], [ 'filename' => $rrd_filename, - 'descr' => 'errs to clnt', - 'ds' => 'httperrors', - 'colour' => '28536c', + 'descr' => 'errs to clnt', + 'ds' => 'httperrors', + 'colour' => '28536c', ], ]; } else { diff --git a/includes/html/graphs/application/squid_httpbw.inc.php b/includes/html/graphs/application/squid_httpbw.inc.php index 3b8437bcd5..182806fcdc 100644 --- a/includes/html/graphs/application/squid_httpbw.inc.php +++ b/includes/html/graphs/application/squid_httpbw.inc.php @@ -17,15 +17,15 @@ if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list = [ [ 'filename' => $rrd_filename, - 'descr' => 'HTTP in', - 'ds' => 'httpinkb', - 'colour' => 'd46a6a', + 'descr' => 'HTTP in', + 'ds' => 'httpinkb', + 'colour' => 'd46a6a', ], [ 'filename' => $rrd_filename, - 'descr' => 'HTTP out', - 'ds' => 'httpoutkb', - 'colour' => '28774f', + 'descr' => 'HTTP out', + 'ds' => 'httpoutkb', + 'colour' => '28774f', ], ]; } else { diff --git a/includes/html/graphs/application/squid_memory.inc.php b/includes/html/graphs/application/squid_memory.inc.php index 3a75a94e6a..7dc5ff0063 100644 --- a/includes/html/graphs/application/squid_memory.inc.php +++ b/includes/html/graphs/application/squid_memory.inc.php @@ -17,39 +17,39 @@ if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list = [ [ 'filename' => $rrd_filename, - 'descr' => 'max mem', - 'ds' => 'memmaxsize', - 'colour' => '582a72', + 'descr' => 'max mem', + 'ds' => 'memmaxsize', + 'colour' => '582a72', ], [ 'filename' => $rrd_filename, - 'descr' => 'max swap', - 'ds' => 'swapmaxsize', - 'colour' => '28774f', + 'descr' => 'max swap', + 'ds' => 'swapmaxsize', + 'colour' => '28774f', ], [ 'filename' => $rrd_filename, - 'descr' => 'high swap WM', - 'ds' => 'swaphighwm', - 'colour' => '28536c', + 'descr' => 'high swap WM', + 'ds' => 'swaphighwm', + 'colour' => '28536c', ], [ 'filename' => $rrd_filename, - 'descr' => 'low swap WM', - 'ds' => 'swaplowwm', - 'colour' => 'd46a6a', + 'descr' => 'low swap WM', + 'ds' => 'swaplowwm', + 'colour' => 'd46a6a', ], [ 'filename' => $rrd_filename, - 'descr' => 'swap usage', - 'ds' => 'currentswapsize', - 'colour' => 'ff11bb', + 'descr' => 'swap usage', + 'ds' => 'currentswapsize', + 'colour' => 'ff11bb', ], [ 'filename' => $rrd_filename, - 'descr' => 'memory usage', - 'ds' => 'memusage', - 'colour' => 'd853dc', + 'descr' => 'memory usage', + 'ds' => 'memusage', + 'colour' => 'd853dc', ], ]; } else { diff --git a/includes/html/graphs/application/squid_objcount.inc.php b/includes/html/graphs/application/squid_objcount.inc.php index 466be05424..fde9fd86da 100644 --- a/includes/html/graphs/application/squid_objcount.inc.php +++ b/includes/html/graphs/application/squid_objcount.inc.php @@ -17,9 +17,9 @@ if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list = [ [ 'filename' => $rrd_filename, - 'descr' => 'stored', - 'ds' => 'numobjcount', - 'colour' => '582a72', + 'descr' => 'stored', + 'ds' => 'numobjcount', + 'colour' => '582a72', ], ]; } else { diff --git a/includes/html/graphs/application/squid_pagefaults.inc.php b/includes/html/graphs/application/squid_pagefaults.inc.php index 6e2a80c5d6..7f201419b3 100644 --- a/includes/html/graphs/application/squid_pagefaults.inc.php +++ b/includes/html/graphs/application/squid_pagefaults.inc.php @@ -17,9 +17,9 @@ if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list = [ [ 'filename' => $rrd_filename, - 'descr' => 'page faults', - 'ds' => 'syspagefaults', - 'colour' => '582a72', + 'descr' => 'page faults', + 'ds' => 'syspagefaults', + 'colour' => '582a72', ], ]; } else { diff --git a/includes/html/graphs/application/squid_reqhit.inc.php b/includes/html/graphs/application/squid_reqhit.inc.php index 3cc1ce52c8..ab20c11ca9 100644 --- a/includes/html/graphs/application/squid_reqhit.inc.php +++ b/includes/html/graphs/application/squid_reqhit.inc.php @@ -17,21 +17,21 @@ if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list = [ [ 'filename' => $rrd_filename, - 'descr' => '1 minute', - 'ds' => 'reqhitratio1', - 'colour' => '582a72', + 'descr' => '1 minute', + 'ds' => 'reqhitratio1', + 'colour' => '582a72', ], [ 'filename' => $rrd_filename, - 'descr' => '5 minute', - 'ds' => 'reqhitratio5', - 'colour' => '28774f', + 'descr' => '5 minute', + 'ds' => 'reqhitratio5', + 'colour' => '28774f', ], [ 'filename' => $rrd_filename, - 'descr' => '60 minute', - 'ds' => 'reqhitratio60', - 'colour' => '28536c', + 'descr' => '60 minute', + 'ds' => 'reqhitratio60', + 'colour' => '28536c', ], ]; } else { diff --git a/includes/html/graphs/application/squid_server.inc.php b/includes/html/graphs/application/squid_server.inc.php index fb250163af..f1d2d73d75 100644 --- a/includes/html/graphs/application/squid_server.inc.php +++ b/includes/html/graphs/application/squid_server.inc.php @@ -17,15 +17,15 @@ if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list = [ [ 'filename' => $rrd_filename, - 'descr' => 'requests', - 'ds' => 'serverrequests', - 'colour' => '582a72', + 'descr' => 'requests', + 'ds' => 'serverrequests', + 'colour' => '582a72', ], [ 'filename' => $rrd_filename, - 'descr' => 'hits', - 'ds' => 'servererrors', - 'colour' => '28774f', + 'descr' => 'hits', + 'ds' => 'servererrors', + 'colour' => '28774f', ], ]; } else { diff --git a/includes/html/graphs/application/squid_serverbw.inc.php b/includes/html/graphs/application/squid_serverbw.inc.php index 1ff5bc192b..e3be5e7729 100644 --- a/includes/html/graphs/application/squid_serverbw.inc.php +++ b/includes/html/graphs/application/squid_serverbw.inc.php @@ -17,15 +17,15 @@ if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list = [ [ 'filename' => $rrd_filename, - 'descr' => 'server in', - 'ds' => 'serverinkb', - 'colour' => 'd46a6a', + 'descr' => 'server in', + 'ds' => 'serverinkb', + 'colour' => 'd46a6a', ], [ 'filename' => $rrd_filename, - 'descr' => 'server out', - 'ds' => 'serveroutkb', - 'colour' => '28774f', + 'descr' => 'server out', + 'ds' => 'serveroutkb', + 'colour' => '28774f', ], ]; } else { diff --git a/includes/html/graphs/application/squid_sysnumread.inc.php b/includes/html/graphs/application/squid_sysnumread.inc.php index 60603310a9..a7bab6787d 100644 --- a/includes/html/graphs/application/squid_sysnumread.inc.php +++ b/includes/html/graphs/application/squid_sysnumread.inc.php @@ -17,9 +17,9 @@ if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list = [ [ 'filename' => $rrd_filename, - 'descr' => 'http io reads', - 'ds' => 'sysnumreads', - 'colour' => '582a72', + 'descr' => 'http io reads', + 'ds' => 'sysnumreads', + 'colour' => '582a72', ], ]; } else { diff --git a/includes/html/graphs/application/supervisord_uptime.inc.php b/includes/html/graphs/application/supervisord_uptime.inc.php index 10b9fda4a3..86734a3615 100644 --- a/includes/html/graphs/application/supervisord_uptime.inc.php +++ b/includes/html/graphs/application/supervisord_uptime.inc.php @@ -27,8 +27,8 @@ while (isset($processes[$int])) { if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => $process_name, - 'ds' => $rrdVar, + 'descr' => $process_name, + 'ds' => $rrdVar, ]; } $int++; diff --git a/includes/html/graphs/application/suricata_alert.inc.php b/includes/html/graphs/application/suricata_alert.inc.php index 89794df7aa..4750b4d404 100644 --- a/includes/html/graphs/application/suricata_alert.inc.php +++ b/includes/html/graphs/application/suricata_alert.inc.php @@ -18,8 +18,8 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Alert Status', - 'ds' => 'alert', + 'descr' => 'Alert Status', + 'ds' => 'alert', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/suricata_app_flows.inc.php b/includes/html/graphs/application/suricata_app_flows.inc.php index 6713337b29..786fd1a878 100644 --- a/includes/html/graphs/application/suricata_app_flows.inc.php +++ b/includes/html/graphs/application/suricata_app_flows.inc.php @@ -18,133 +18,133 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'DCERPC TCP', - 'ds' => 'af_dcerpc_tcp', + 'descr' => 'DCERPC TCP', + 'ds' => 'af_dcerpc_tcp', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'DCERPC UDP', - 'ds' => 'af_dcerpc_udp', + 'descr' => 'DCERPC UDP', + 'ds' => 'af_dcerpc_udp', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'DHCP', - 'ds' => 'af_dhcp', + 'descr' => 'DHCP', + 'ds' => 'af_dhcp', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'DNS TCP', - 'ds' => 'af_dns_tcp', + 'descr' => 'DNS TCP', + 'ds' => 'af_dns_tcp', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'DNS UDP', - 'ds' => 'af_dns_udp', + 'descr' => 'DNS UDP', + 'ds' => 'af_dns_udp', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Failed TCP', - 'ds' => 'af_failed_tcp', + 'descr' => 'Failed TCP', + 'ds' => 'af_failed_tcp', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Failed UDP', - 'ds' => 'af_failed_udp', + 'descr' => 'Failed UDP', + 'ds' => 'af_failed_udp', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'FTP', - 'ds' => 'af_ftp', + 'descr' => 'FTP', + 'ds' => 'af_ftp', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'FTP-DATA', - 'ds' => 'af_ftp_data', + 'descr' => 'FTP-DATA', + 'ds' => 'af_ftp_data', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'HTTP', - 'ds' => 'af_http', + 'descr' => 'HTTP', + 'ds' => 'af_http', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'IKEv2', - 'ds' => 'af_ikev2', + 'descr' => 'IKEv2', + 'ds' => 'af_ikev2', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'IMAP', - 'ds' => 'af_imap', + 'descr' => 'IMAP', + 'ds' => 'af_imap', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Krb5 TCP', - 'ds' => 'af_krb5_tcp', + 'descr' => 'Krb5 TCP', + 'ds' => 'af_krb5_tcp', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Krb5 UDP', - 'ds' => 'af_krb5_udp', + 'descr' => 'Krb5 UDP', + 'ds' => 'af_krb5_udp', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'MQTT', - 'ds' => 'af_mqtt', + 'descr' => 'MQTT', + 'ds' => 'af_mqtt', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'NFS TCP', - 'ds' => 'af_nfs_tcp', + 'descr' => 'NFS TCP', + 'ds' => 'af_nfs_tcp', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'NFS UDP', - 'ds' => 'af_nfs_udp', + 'descr' => 'NFS UDP', + 'ds' => 'af_nfs_udp', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'RDP', - 'ds' => 'af_rdp', + 'descr' => 'RDP', + 'ds' => 'af_rdp', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'RFB', - 'ds' => 'af_rfb', + 'descr' => 'RFB', + 'ds' => 'af_rfb', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'SIP', - 'ds' => 'af_sip', + 'descr' => 'SIP', + 'ds' => 'af_sip', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'SMB', - 'ds' => 'af_smb', + 'descr' => 'SMB', + 'ds' => 'af_smb', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'SMTP', - 'ds' => 'af_smtp', + 'descr' => 'SMTP', + 'ds' => 'af_smtp', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'SNMP', - 'ds' => 'af_snmp', + 'descr' => 'SNMP', + 'ds' => 'af_snmp', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'ssh', - 'ds' => 'af_ssh', + 'descr' => 'ssh', + 'ds' => 'af_ssh', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'TFTP', - 'ds' => 'af_tftp', + 'descr' => 'TFTP', + 'ds' => 'af_tftp', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'TLS', - 'ds' => 'af_tls', + 'descr' => 'TLS', + 'ds' => 'af_tls', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/suricata_app_tx.inc.php b/includes/html/graphs/application/suricata_app_tx.inc.php index f31e11d7bb..ce21c572f2 100644 --- a/includes/html/graphs/application/suricata_app_tx.inc.php +++ b/includes/html/graphs/application/suricata_app_tx.inc.php @@ -18,123 +18,123 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'DCERPC TCP', - 'ds' => 'at_dcerpc_tcp', + 'descr' => 'DCERPC TCP', + 'ds' => 'at_dcerpc_tcp', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'DCERPC UDP', - 'ds' => 'at_dcerpc_udp', + 'descr' => 'DCERPC UDP', + 'ds' => 'at_dcerpc_udp', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'DHCP', - 'ds' => 'at_dhcp', + 'descr' => 'DHCP', + 'ds' => 'at_dhcp', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'DNS TCP', - 'ds' => 'at_dns_tcp', + 'descr' => 'DNS TCP', + 'ds' => 'at_dns_tcp', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'DNS UDP', - 'ds' => 'at_dns_udp', + 'descr' => 'DNS UDP', + 'ds' => 'at_dns_udp', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'FTP', - 'ds' => 'at_ftp', + 'descr' => 'FTP', + 'ds' => 'at_ftp', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'FTP-DATA', - 'ds' => 'at_ftp_data', + 'descr' => 'FTP-DATA', + 'ds' => 'at_ftp_data', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'HTTP', - 'ds' => 'at_http', + 'descr' => 'HTTP', + 'ds' => 'at_http', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'IKEv2', - 'ds' => 'at_ikev2', + 'descr' => 'IKEv2', + 'ds' => 'at_ikev2', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'IMAP', - 'ds' => 'at_imap', + 'descr' => 'IMAP', + 'ds' => 'at_imap', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Krb5 TCP', - 'ds' => 'at_krb5_tcp', + 'descr' => 'Krb5 TCP', + 'ds' => 'at_krb5_tcp', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Krb5 UDP', - 'ds' => 'at_krb5_udp', + 'descr' => 'Krb5 UDP', + 'ds' => 'at_krb5_udp', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'MQTT', - 'ds' => 'at_mqtt', + 'descr' => 'MQTT', + 'ds' => 'at_mqtt', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'NFS TCP', - 'ds' => 'at_nfs_tcp', + 'descr' => 'NFS TCP', + 'ds' => 'at_nfs_tcp', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'NFS UDP', - 'ds' => 'at_nfs_udp', + 'descr' => 'NFS UDP', + 'ds' => 'at_nfs_udp', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'RDP', - 'ds' => 'at_rdp', + 'descr' => 'RDP', + 'ds' => 'at_rdp', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'RFB', - 'ds' => 'at_rfb', + 'descr' => 'RFB', + 'ds' => 'at_rfb', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'SIP', - 'ds' => 'at_sip', + 'descr' => 'SIP', + 'ds' => 'at_sip', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'SMB', - 'ds' => 'at_smb', + 'descr' => 'SMB', + 'ds' => 'at_smb', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'SMTP', - 'ds' => 'at_smtp', + 'descr' => 'SMTP', + 'ds' => 'at_smtp', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'SNMP', - 'ds' => 'at_snmp', + 'descr' => 'SNMP', + 'ds' => 'at_snmp', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'ssh', - 'ds' => 'at_ssh', + 'descr' => 'ssh', + 'ds' => 'at_ssh', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'TFTP', - 'ds' => 'at_tftp', + 'descr' => 'TFTP', + 'ds' => 'at_tftp', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'TLS', - 'ds' => 'at_tls', + 'descr' => 'TLS', + 'ds' => 'at_tls', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/suricata_bytes.inc.php b/includes/html/graphs/application/suricata_bytes.inc.php index b55da0a929..498b0ce1b9 100644 --- a/includes/html/graphs/application/suricata_bytes.inc.php +++ b/includes/html/graphs/application/suricata_bytes.inc.php @@ -18,8 +18,8 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Bytes', - 'ds' => 'bytes', + 'descr' => 'Bytes', + 'ds' => 'bytes', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/suricata_dec_proto.inc.php b/includes/html/graphs/application/suricata_dec_proto.inc.php index c99d01cc9e..ca66091956 100644 --- a/includes/html/graphs/application/suricata_dec_proto.inc.php +++ b/includes/html/graphs/application/suricata_dec_proto.inc.php @@ -18,93 +18,93 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'IPv4', - 'ds' => 'dec_ipv4', + 'descr' => 'IPv4', + 'ds' => 'dec_ipv4', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'IPv6', - 'ds' => 'dec_ipv6', + 'descr' => 'IPv6', + 'ds' => 'dec_ipv6', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'TCP', - 'ds' => 'dec_tcp', + 'descr' => 'TCP', + 'ds' => 'dec_tcp', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'UDP', - 'ds' => 'dec_udp', + 'descr' => 'UDP', + 'ds' => 'dec_udp', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'SCTP', - 'ds' => 'dec_sctp', + 'descr' => 'SCTP', + 'ds' => 'dec_sctp', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'CHDLC', - 'ds' => 'dec_chdlc', + 'descr' => 'CHDLC', + 'ds' => 'dec_chdlc', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'GENEVE', - 'ds' => 'dec_geneve', + 'descr' => 'GENEVE', + 'ds' => 'dec_geneve', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'IEEE 802.1ah', - 'ds' => 'dec_ieee8021ah', + 'descr' => 'IEEE 802.1ah', + 'ds' => 'dec_ieee8021ah', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'IPv4 in IPv6', - 'ds' => 'dec_ipv4_in_ipv6', + 'descr' => 'IPv4 in IPv6', + 'ds' => 'dec_ipv4_in_ipv6', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'MPLS', - 'ds' => 'dec_mpls', + 'descr' => 'MPLS', + 'ds' => 'dec_mpls', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'PPP', - 'ds' => 'dec_ppp', + 'descr' => 'PPP', + 'ds' => 'dec_ppp', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'PPPoE', - 'ds' => 'dec_pppoe', + 'descr' => 'PPPoE', + 'ds' => 'dec_pppoe', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'SLL', - 'ds' => 'dec_sll', + 'descr' => 'SLL', + 'ds' => 'dec_sll', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Teredo', - 'ds' => 'dec_teredo', + 'descr' => 'Teredo', + 'ds' => 'dec_teredo', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'VLAN', - 'ds' => 'dec_vlan', + 'descr' => 'VLAN', + 'ds' => 'dec_vlan', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'VLAN Q-in-Q', - 'ds' => 'dec_vlan_qinq', + 'descr' => 'VLAN Q-in-Q', + 'ds' => 'dec_vlan_qinq', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'VNTAG', - 'ds' => 'dec_vntag', + 'descr' => 'VNTAG', + 'ds' => 'dec_vntag', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'VXLAN', - 'ds' => 'dec_vxlan', + 'descr' => 'VXLAN', + 'ds' => 'dec_vxlan', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/suricata_flow_proto.inc.php b/includes/html/graphs/application/suricata_flow_proto.inc.php index b848fa5d06..f5c12944aa 100644 --- a/includes/html/graphs/application/suricata_flow_proto.inc.php +++ b/includes/html/graphs/application/suricata_flow_proto.inc.php @@ -18,23 +18,23 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'ICMPv4', - 'ds' => 'f_icmpv4', + 'descr' => 'ICMPv4', + 'ds' => 'f_icmpv4', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'ICMPv6', - 'ds' => 'f_icmpv6', + 'descr' => 'ICMPv6', + 'ds' => 'f_icmpv6', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'TCP', - 'ds' => 'f_tcp', + 'descr' => 'TCP', + 'ds' => 'f_tcp', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'UDP', - 'ds' => 'f_udp', + 'descr' => 'UDP', + 'ds' => 'f_udp', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/suricata_mem_use.inc.php b/includes/html/graphs/application/suricata_mem_use.inc.php index 9b8577f99c..9c22f758ba 100644 --- a/includes/html/graphs/application/suricata_mem_use.inc.php +++ b/includes/html/graphs/application/suricata_mem_use.inc.php @@ -18,28 +18,28 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Flow', - 'ds' => 'f_memuse', + 'descr' => 'Flow', + 'ds' => 'f_memuse', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'FTP', - 'ds' => 'ftp_memuse', + 'descr' => 'FTP', + 'ds' => 'ftp_memuse', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'HTTP', - 'ds' => 'http_memuse', + 'descr' => 'HTTP', + 'ds' => 'http_memuse', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'TCP', - 'ds' => 'tcp_memuse', + 'descr' => 'TCP', + 'ds' => 'tcp_memuse', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'TCP Reass', - 'ds' => 'tcp_reass_memuse', + 'descr' => 'TCP Reass', + 'ds' => 'tcp_reass_memuse', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/suricata_nasty_delta.inc.php b/includes/html/graphs/application/suricata_nasty_delta.inc.php index f26a0f4767..ceafbd9c63 100644 --- a/includes/html/graphs/application/suricata_nasty_delta.inc.php +++ b/includes/html/graphs/application/suricata_nasty_delta.inc.php @@ -18,28 +18,28 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Dropped', - 'ds' => 'dropped', + 'descr' => 'Dropped', + 'ds' => 'dropped', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'If Dropped', - 'ds' => 'ifdropped', + 'descr' => 'If Dropped', + 'ds' => 'ifdropped', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Errors', - 'ds' => 'errors', + 'descr' => 'Errors', + 'ds' => 'errors', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Dec Inv.', - 'ds' => 'dec_invalid', + 'descr' => 'Dec Inv.', + 'ds' => 'dec_invalid', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Too Many Layers', - 'ds' => 'dec_too_many_layer', + 'descr' => 'Too Many Layers', + 'ds' => 'dec_too_many_layer', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/suricata_nasty_percent.inc.php b/includes/html/graphs/application/suricata_nasty_percent.inc.php index 3dc3f53e07..024e1aa039 100644 --- a/includes/html/graphs/application/suricata_nasty_percent.inc.php +++ b/includes/html/graphs/application/suricata_nasty_percent.inc.php @@ -18,18 +18,18 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Dropped', - 'ds' => 'drop_percent', + 'descr' => 'Dropped', + 'ds' => 'drop_percent', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'If Dropped', - 'ds' => 'ifdrop_percent', + 'descr' => 'If Dropped', + 'ds' => 'ifdrop_percent', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Error', - 'ds' => 'error_percent', + 'descr' => 'Error', + 'ds' => 'error_percent', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/suricata_packets.inc.php b/includes/html/graphs/application/suricata_packets.inc.php index 46de1ecaaf..a5e8f82329 100644 --- a/includes/html/graphs/application/suricata_packets.inc.php +++ b/includes/html/graphs/application/suricata_packets.inc.php @@ -18,23 +18,23 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Packets', - 'ds' => 'packets', + 'descr' => 'Packets', + 'ds' => 'packets', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Dec. Packets', - 'ds' => 'dec_packets', + 'descr' => 'Dec. Packets', + 'ds' => 'dec_packets', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Dropped', - 'ds' => 'dropped', + 'descr' => 'Dropped', + 'ds' => 'dropped', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'If Dropped', - 'ds' => 'ifdropped', + 'descr' => 'If Dropped', + 'ds' => 'ifdropped', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/suricata_uptime.inc.php b/includes/html/graphs/application/suricata_uptime.inc.php index f074d9a8d7..b35dc1f2dd 100644 --- a/includes/html/graphs/application/suricata_uptime.inc.php +++ b/includes/html/graphs/application/suricata_uptime.inc.php @@ -18,8 +18,8 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Uptime', - 'ds' => 'uptime', + 'descr' => 'Uptime', + 'ds' => 'uptime', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/wireguard_time.inc.php b/includes/html/graphs/application/wireguard_time.inc.php index 94dcb2d9a9..e46a6aedac 100644 --- a/includes/html/graphs/application/wireguard_time.inc.php +++ b/includes/html/graphs/application/wireguard_time.inc.php @@ -30,8 +30,8 @@ if (Rrd::checkRrdExists($rrd_filename)) { foreach ($rrdArray as $rrdVar => $rrdValues) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => $rrdValues['descr'], - 'ds' => $rrdVar, + 'descr' => $rrdValues['descr'], + 'ds' => $rrdVar, ]; } } else { diff --git a/includes/html/graphs/application/zfs_arc_cache_hits.inc.php b/includes/html/graphs/application/zfs_arc_cache_hits.inc.php index 92cc60cf89..7227170ab9 100644 --- a/includes/html/graphs/application/zfs_arc_cache_hits.inc.php +++ b/includes/html/graphs/application/zfs_arc_cache_hits.inc.php @@ -14,54 +14,54 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Demand', - 'ds' => 'demand_data_hits', + 'descr' => 'Demand', + 'ds' => 'demand_data_hits', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Demand Meta', - 'ds' => 'demand_meta_hits', + 'descr' => 'Demand Meta', + 'ds' => 'demand_meta_hits', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'MRU', - 'ds' => 'mru_hits', + 'descr' => 'MRU', + 'ds' => 'mru_hits', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'MRU Ghost', - 'ds' => 'mru_ghost_hits', + 'descr' => 'MRU Ghost', + 'ds' => 'mru_ghost_hits', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'MFU', - 'ds' => 'mfu_hits', + 'descr' => 'MFU', + 'ds' => 'mfu_hits', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'MFU Ghost', - 'ds' => 'mfu_ghost_hits', + 'descr' => 'MFU Ghost', + 'ds' => 'mfu_ghost_hits', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Prefetch', - 'ds' => 'pre_data_hits', + 'descr' => 'Prefetch', + 'ds' => 'pre_data_hits', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Prefetch Meta', - 'ds' => 'pre_meta_hits', + 'descr' => 'Prefetch Meta', + 'ds' => 'pre_meta_hits', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Anonymous', - 'ds' => 'anon_hits', + 'descr' => 'Anonymous', + 'ds' => 'anon_hits', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'ARC', - 'ds' => 'arc_hits', + 'descr' => 'ARC', + 'ds' => 'arc_hits', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/zfs_arc_cache_hits_by_list.inc.php b/includes/html/graphs/application/zfs_arc_cache_hits_by_list.inc.php index 83aeb79078..ce00989558 100644 --- a/includes/html/graphs/application/zfs_arc_cache_hits_by_list.inc.php +++ b/includes/html/graphs/application/zfs_arc_cache_hits_by_list.inc.php @@ -14,28 +14,28 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Anon Used', - 'ds' => 'anon_hits_per', + 'descr' => 'Anon Used', + 'ds' => 'anon_hits_per', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Most Recent', - 'ds' => 'mru_per', + 'descr' => 'Most Recent', + 'ds' => 'mru_per', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Most Frequent', - 'ds' => 'mfu_per', + 'descr' => 'Most Frequent', + 'ds' => 'mfu_per', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'MRU Ghost', - 'ds' => 'mru_ghost_per', + 'descr' => 'MRU Ghost', + 'ds' => 'mru_ghost_per', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'MFU Ghost', - 'ds' => 'mfu_ghost_per', + 'descr' => 'MFU Ghost', + 'ds' => 'mfu_ghost_per', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/zfs_arc_cache_hits_by_type.inc.php b/includes/html/graphs/application/zfs_arc_cache_hits_by_type.inc.php index 5e0044e897..c90837a7b7 100644 --- a/includes/html/graphs/application/zfs_arc_cache_hits_by_type.inc.php +++ b/includes/html/graphs/application/zfs_arc_cache_hits_by_type.inc.php @@ -14,23 +14,23 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Demand', - 'ds' => 'demand_hits_per', + 'descr' => 'Demand', + 'ds' => 'demand_hits_per', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Prefetch', - 'ds' => 'pre_hits_per', + 'descr' => 'Prefetch', + 'ds' => 'pre_hits_per', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Demand Meta', - 'ds' => 'meta_hits_per', + 'descr' => 'Demand Meta', + 'ds' => 'meta_hits_per', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Prefetch Meta', - 'ds' => 'pre_meta_hits_per', + 'descr' => 'Prefetch Meta', + 'ds' => 'pre_meta_hits_per', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/zfs_arc_cache_miss.inc.php b/includes/html/graphs/application/zfs_arc_cache_miss.inc.php index c6e8fb405c..21c3524966 100644 --- a/includes/html/graphs/application/zfs_arc_cache_miss.inc.php +++ b/includes/html/graphs/application/zfs_arc_cache_miss.inc.php @@ -14,28 +14,28 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Demand', - 'ds' => 'demand_data_misses', + 'descr' => 'Demand', + 'ds' => 'demand_data_misses', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Demand Meta', - 'ds' => 'demand_meta_misses', + 'descr' => 'Demand Meta', + 'ds' => 'demand_meta_misses', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Prefetch', - 'ds' => 'pre_data_misses', + 'descr' => 'Prefetch', + 'ds' => 'pre_data_misses', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Prefetch Meta', - 'ds' => 'pre_meta_misses', + 'descr' => 'Prefetch Meta', + 'ds' => 'pre_meta_misses', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'ARC', - 'ds' => 'arc_misses', + 'descr' => 'ARC', + 'ds' => 'arc_misses', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/zfs_arc_cache_misses_by_type.inc.php b/includes/html/graphs/application/zfs_arc_cache_misses_by_type.inc.php index 96efa3b1a7..32dccaa57d 100644 --- a/includes/html/graphs/application/zfs_arc_cache_misses_by_type.inc.php +++ b/includes/html/graphs/application/zfs_arc_cache_misses_by_type.inc.php @@ -14,23 +14,23 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Demand', - 'ds' => 'demand_misses_per', + 'descr' => 'Demand', + 'ds' => 'demand_misses_per', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Prefetch', - 'ds' => 'pre_misses_per', + 'descr' => 'Prefetch', + 'ds' => 'pre_misses_per', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Demand Meta', - 'ds' => 'meta_misses_per', + 'descr' => 'Demand Meta', + 'ds' => 'meta_misses_per', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Prefetch Meta', - 'ds' => 'pre_meta_misses_per', + 'descr' => 'Prefetch Meta', + 'ds' => 'pre_meta_misses_per', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/zfs_arc_efficiency.inc.php b/includes/html/graphs/application/zfs_arc_efficiency.inc.php index 2f1ceef69b..fde8fe6a84 100644 --- a/includes/html/graphs/application/zfs_arc_efficiency.inc.php +++ b/includes/html/graphs/application/zfs_arc_efficiency.inc.php @@ -14,23 +14,23 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Cache Hit', - 'ds' => 'cache_hits_per', + 'descr' => 'Cache Hit', + 'ds' => 'cache_hits_per', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Cache Miss', - 'ds' => 'cache_miss_per', + 'descr' => 'Cache Miss', + 'ds' => 'cache_miss_per', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Actual Hit', - 'ds' => 'actual_hit_per', + 'descr' => 'Actual Hit', + 'ds' => 'actual_hit_per', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Data Demand', - 'ds' => 'data_demand_per', + 'descr' => 'Data Demand', + 'ds' => 'data_demand_per', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/zfs_arc_misc.inc.php b/includes/html/graphs/application/zfs_arc_misc.inc.php index 1e0960ecf1..a14bbe0a19 100644 --- a/includes/html/graphs/application/zfs_arc_misc.inc.php +++ b/includes/html/graphs/application/zfs_arc_misc.inc.php @@ -14,23 +14,23 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Deleted', - 'ds' => 'deleted', + 'descr' => 'Deleted', + 'ds' => 'deleted', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Recycle Misses', - 'ds' => 'recycle_miss', + 'descr' => 'Recycle Misses', + 'ds' => 'recycle_miss', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Evict Skip', - 'ds' => 'evict_skip', + 'descr' => 'Evict Skip', + 'ds' => 'evict_skip', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Mutex Skip', - 'ds' => 'mutex_skip', + 'descr' => 'Mutex Skip', + 'ds' => 'mutex_skip', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/zfs_arc_size.inc.php b/includes/html/graphs/application/zfs_arc_size.inc.php index b74c184656..e3832c84d4 100644 --- a/includes/html/graphs/application/zfs_arc_size.inc.php +++ b/includes/html/graphs/application/zfs_arc_size.inc.php @@ -14,23 +14,23 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'ARC Size', - 'ds' => 'arc_size', + 'descr' => 'ARC Size', + 'ds' => 'arc_size', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Target Size', - 'ds' => 'target_size', + 'descr' => 'Target Size', + 'ds' => 'target_size', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Target Max', - 'ds' => 'target_size_max', + 'descr' => 'Target Max', + 'ds' => 'target_size_max', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Target Min', - 'ds' => 'target_size_min', + 'descr' => 'Target Min', + 'ds' => 'target_size_min', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/zfs_arc_size_breakdown.inc.php b/includes/html/graphs/application/zfs_arc_size_breakdown.inc.php index 35acfff794..59499844df 100644 --- a/includes/html/graphs/application/zfs_arc_size_breakdown.inc.php +++ b/includes/html/graphs/application/zfs_arc_size_breakdown.inc.php @@ -14,13 +14,13 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Frequently Used', - 'ds' => 'mfu_size', + 'descr' => 'Frequently Used', + 'ds' => 'mfu_size', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Recently Used', - 'ds' => 'p', + 'descr' => 'Recently Used', + 'ds' => 'p', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/zfs_arc_size_per.inc.php b/includes/html/graphs/application/zfs_arc_size_per.inc.php index bc62573be6..dabbd18b99 100644 --- a/includes/html/graphs/application/zfs_arc_size_per.inc.php +++ b/includes/html/graphs/application/zfs_arc_size_per.inc.php @@ -14,18 +14,18 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'ARC Size%', - 'ds' => 'arc_size_per', + 'descr' => 'ARC Size%', + 'ds' => 'arc_size_per', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Target Size%', - 'ds' => 'target_size_per', + 'descr' => 'Target Size%', + 'ds' => 'target_size_per', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Target Min%', - 'ds' => 'min_size_per', + 'descr' => 'Target Min%', + 'ds' => 'min_size_per', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/zfs_l2_rw_bytes.inc.php b/includes/html/graphs/application/zfs_l2_rw_bytes.inc.php index ba3eca0736..656acc83ee 100644 --- a/includes/html/graphs/application/zfs_l2_rw_bytes.inc.php +++ b/includes/html/graphs/application/zfs_l2_rw_bytes.inc.php @@ -14,13 +14,13 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'L2 Write', - 'ds' => 'l2_write_bytes', + 'descr' => 'L2 Write', + 'ds' => 'l2_write_bytes', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'L2 Read', - 'ds' => 'l2_read_bytes', + 'descr' => 'L2 Read', + 'ds' => 'l2_read_bytes', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/zfs_l2_sizes.inc.php b/includes/html/graphs/application/zfs_l2_sizes.inc.php index e90084f92a..4f672039ea 100644 --- a/includes/html/graphs/application/zfs_l2_sizes.inc.php +++ b/includes/html/graphs/application/zfs_l2_sizes.inc.php @@ -14,53 +14,53 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'A Size', - 'ds' => 'l2_asize', + 'descr' => 'A Size', + 'ds' => 'l2_asize', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'BufC D Asize', - 'ds' => 'l2_bufc_d_asize', + 'descr' => 'BufC D Asize', + 'ds' => 'l2_bufc_d_asize', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'BufC M Asize', - 'ds' => 'l2_bufc_m_asize', + 'descr' => 'BufC M Asize', + 'ds' => 'l2_bufc_m_asize', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Log Blk Asize', - 'ds' => 'l2_log_blk_asize', + 'descr' => 'Log Blk Asize', + 'ds' => 'l2_log_blk_asize', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'MFU Asize', - 'ds' => 'l2_mfu_asize', + 'descr' => 'MFU Asize', + 'ds' => 'l2_mfu_asize', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'MRU Asize', - 'ds' => 'l2_mru_asize', + 'descr' => 'MRU Asize', + 'ds' => 'l2_mru_asize', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Prefetch Asize', - 'ds' => 'l2_prefetch_asize', + 'descr' => 'Prefetch Asize', + 'ds' => 'l2_prefetch_asize', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Rebuild Asize', - 'ds' => 'l2_rb_asize', + 'descr' => 'Rebuild Asize', + 'ds' => 'l2_rb_asize', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Log Blk Avg Asize', - 'ds' => 'l2_log_blk_avg_as', + 'descr' => 'Log Blk Avg Asize', + 'ds' => 'l2_log_blk_avg_as', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'HDR Size', - 'ds' => 'l2_hdr_size', + 'descr' => 'HDR Size', + 'ds' => 'l2_hdr_size', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/zfs_pool_cap.inc.php b/includes/html/graphs/application/zfs_pool_cap.inc.php index 6b35887b19..95e461fe4b 100644 --- a/includes/html/graphs/application/zfs_pool_cap.inc.php +++ b/includes/html/graphs/application/zfs_pool_cap.inc.php @@ -14,8 +14,8 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Capacity', - 'ds' => 'cap', + 'descr' => 'Capacity', + 'ds' => 'cap', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/zfs_pool_frag.inc.php b/includes/html/graphs/application/zfs_pool_frag.inc.php index 1a225bfe2b..f301ded452 100644 --- a/includes/html/graphs/application/zfs_pool_frag.inc.php +++ b/includes/html/graphs/application/zfs_pool_frag.inc.php @@ -14,8 +14,8 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Frag', - 'ds' => 'frag', + 'descr' => 'Frag', + 'ds' => 'frag', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/application/zfs_pool_space.inc.php b/includes/html/graphs/application/zfs_pool_space.inc.php index d2c67326d1..bf93e62b30 100644 --- a/includes/html/graphs/application/zfs_pool_space.inc.php +++ b/includes/html/graphs/application/zfs_pool_space.inc.php @@ -14,23 +14,23 @@ $rrd_list = []; if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Size', - 'ds' => 'size', + 'descr' => 'Size', + 'ds' => 'size', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Allocated', - 'ds' => 'alloc', + 'descr' => 'Allocated', + 'ds' => 'alloc', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Free', - 'ds' => 'free', + 'descr' => 'Free', + 'ds' => 'free', ]; $rrd_list[] = [ 'filename' => $rrd_filename, - 'descr' => 'Expand Size', - 'ds' => 'expandsz', + 'descr' => 'Expand Size', + 'ds' => 'expandsz', ]; } else { d_echo('RRD "' . $rrd_filename . '" not found'); diff --git a/includes/html/graphs/customer/bits.inc.php b/includes/html/graphs/customer/bits.inc.php index 548b629805..70f2f1e0b9 100644 --- a/includes/html/graphs/customer/bits.inc.php +++ b/includes/html/graphs/customer/bits.inc.php @@ -15,9 +15,9 @@ foreach (dbFetchRows($sql, $param) as $port) { $rrd_filename = get_port_rrdfile_path($port['hostname'], $port['port_id']); // FIXME: Unification OK? if (Rrd::checkRrdExists($rrd_filename)) { $rrd_list[] = [ - 'filename' => $rrd_filename, - 'descr' => $port['hostname'] . '-' . $port['ifDescr'], - 'descr_in' => shorthost($port['hostname']), + 'filename' => $rrd_filename, + 'descr' => $port['hostname'] . '-' . $port['ifDescr'], + 'descr_in' => shorthost($port['hostname']), 'descr_out' => makeshortif($port['ifDescr']), ]; } diff --git a/includes/html/graphs/device/gaia_firewall_packets.inc.php b/includes/html/graphs/device/gaia_firewall_packets.inc.php index 5e02f23358..d77132b823 100644 --- a/includes/html/graphs/device/gaia_firewall_packets.inc.php +++ b/includes/html/graphs/device/gaia_firewall_packets.inc.php @@ -7,10 +7,10 @@ $rrd_options .= " --vertical-label='Packets per second'"; $rrd_options .= " --lower-limit='0'"; $stats = [ - 'accepted' => '#74C366FF', - 'rejected' => '#007283FF', - 'dropped' => '#FFAB00FF', - 'logged' => '#B1441EFF', + 'accepted' => '#74C366FF', + 'rejected' => '#007283FF', + 'dropped' => '#FFAB00FF', + 'logged' => '#B1441EFF', ]; $i = 0; diff --git a/includes/html/graphs/device/ib_dhcp_messages.inc.php b/includes/html/graphs/device/ib_dhcp_messages.inc.php index 414c539b4e..26b49d264a 100644 --- a/includes/html/graphs/device/ib_dhcp_messages.inc.php +++ b/includes/html/graphs/device/ib_dhcp_messages.inc.php @@ -6,15 +6,15 @@ $rrd_filename = Rrd::name($device['hostname'], 'ib_dhcp_messages'); $rrd_options .= " --vertical-label='Messages per minute'"; $stats = [ - 'request' => '#FFAB00FF', - 'ack' => '#007283FF', - 'discover' => '#74C366FF', - 'offer' => '#B1441EFF', - 'inform' => '#8D85F3FF', - 'nack' => '#FAFD9EFF', - 'release' => '#96E78AFF', - 'decline' => '#FF0000FF', - 'other' => '#8F9286FF', + 'request' => '#FFAB00FF', + 'ack' => '#007283FF', + 'discover' => '#74C366FF', + 'offer' => '#B1441EFF', + 'inform' => '#8D85F3FF', + 'nack' => '#FAFD9EFF', + 'release' => '#96E78AFF', + 'decline' => '#FF0000FF', + 'other' => '#8F9286FF', ]; $i = 0; diff --git a/includes/html/graphs/device/ib_dns_dyn_updates.inc.php b/includes/html/graphs/device/ib_dns_dyn_updates.inc.php index 9d332e5c22..4a5e01bd9d 100644 --- a/includes/html/graphs/device/ib_dns_dyn_updates.inc.php +++ b/includes/html/graphs/device/ib_dns_dyn_updates.inc.php @@ -7,10 +7,10 @@ $rrd_options .= " --vertical-label='Updates per minute'"; $rrd_options .= " --lower-limit='0'"; $stats = [ - 'success' => '#74C366FF', - 'failure' => '#007283FF', - 'reject' => '#FFAB00FF', - 'prereq_reject' => '#B1441EFF', + 'success' => '#74C366FF', + 'failure' => '#007283FF', + 'reject' => '#FFAB00FF', + 'prereq_reject' => '#B1441EFF', ]; $i = 0; diff --git a/includes/html/graphs/device/ib_dns_performance.inc.php b/includes/html/graphs/device/ib_dns_performance.inc.php index c2d3c95f20..53e55e8a5f 100644 --- a/includes/html/graphs/device/ib_dns_performance.inc.php +++ b/includes/html/graphs/device/ib_dns_performance.inc.php @@ -7,8 +7,8 @@ $rrd_options .= " --vertical-label='Answer time in milliseconds'"; $rrd_options .= " --lower-limit='0'"; $stats = [ - 'PerfAA' => '#74C366FF', - 'PerfnonAA' => '#007283FF', + 'PerfAA' => '#74C366FF', + 'PerfnonAA' => '#007283FF', ]; $i = 0; diff --git a/includes/html/graphs/device/ib_dns_request_return_codes.inc.php b/includes/html/graphs/device/ib_dns_request_return_codes.inc.php index 61cb9810b4..a4c50c3bed 100644 --- a/includes/html/graphs/device/ib_dns_request_return_codes.inc.php +++ b/includes/html/graphs/device/ib_dns_request_return_codes.inc.php @@ -7,10 +7,10 @@ $rrd_options .= " --vertical-label='Requests per second'"; $rrd_options .= " --lower-limit='0'"; $stats = [ - 'success' => '#74C366FF', - 'failure' => '#007283FF', - 'nxdomain' => '#FFAB00FF', - 'nxrrset' => '#B1441EFF', + 'success' => '#74C366FF', + 'failure' => '#007283FF', + 'nxdomain' => '#FFAB00FF', + 'nxrrset' => '#B1441EFF', ]; $i = 0; diff --git a/includes/html/graphs/device/netstat_icmp.inc.php b/includes/html/graphs/device/netstat_icmp.inc.php index 54d2e1985b..6a85dbd61e 100644 --- a/includes/html/graphs/device/netstat_icmp.inc.php +++ b/includes/html/graphs/device/netstat_icmp.inc.php @@ -3,13 +3,13 @@ $rrd_filename = Rrd::name($device['hostname'], 'netstats-icmp'); $stats = [ - 'icmpInMsgs' => '00cc00', - 'icmpOutMsgs' => '006600', - 'icmpInErrors' => 'cc0000', - 'icmpOutErrors' => '660000', - 'icmpInEchos' => '0066cc', - 'icmpOutEchos' => '003399', - 'icmpInEchoReps' => 'cc00cc', + 'icmpInMsgs' => '00cc00', + 'icmpOutMsgs' => '006600', + 'icmpInErrors' => 'cc0000', + 'icmpOutErrors' => '660000', + 'icmpInEchos' => '0066cc', + 'icmpOutEchos' => '003399', + 'icmpInEchoReps' => 'cc00cc', 'icmpOutEchoReps' => '990099', ]; diff --git a/includes/html/graphs/device/netstat_icmp_info.inc.php b/includes/html/graphs/device/netstat_icmp_info.inc.php index ad32eaba18..a670a5e23b 100644 --- a/includes/html/graphs/device/netstat_icmp_info.inc.php +++ b/includes/html/graphs/device/netstat_icmp_info.inc.php @@ -3,13 +3,13 @@ $rrd_filename = Rrd::name($device['hostname'], 'netstats-icmp'); $stats = [ - 'icmpInSrcQuenchs' => [], - 'icmpOutSrcQuenchs' => [], - 'icmpInRedirects' => [], - 'icmpOutRedirects' => [], - 'icmpInAddrMasks' => [], - 'icmpOutAddrMasks' => [], - 'icmpInAddrMaskReps' => [], + 'icmpInSrcQuenchs' => [], + 'icmpOutSrcQuenchs' => [], + 'icmpInRedirects' => [], + 'icmpOutRedirects' => [], + 'icmpInAddrMasks' => [], + 'icmpOutAddrMasks' => [], + 'icmpInAddrMaskReps' => [], 'icmpOutAddrMaskReps' => [], ]; diff --git a/includes/html/graphs/device/netstat_ip.inc.php b/includes/html/graphs/device/netstat_ip.inc.php index e633701413..067365cc2f 100644 --- a/includes/html/graphs/device/netstat_ip.inc.php +++ b/includes/html/graphs/device/netstat_ip.inc.php @@ -4,12 +4,12 @@ $rrd_filename = Rrd::name($device['hostname'], 'netstats-ip'); $stats = [ 'ipForwDatagrams' => [], - 'ipInDelivers' => [], - 'ipInReceives' => [], - 'ipOutRequests' => [], - 'ipInDiscards' => [], - 'ipOutDiscards' => [], - 'ipOutNoRoutes' => [], + 'ipInDelivers' => [], + 'ipInReceives' => [], + 'ipOutRequests' => [], + 'ipInDiscards' => [], + 'ipOutDiscards' => [], + 'ipOutNoRoutes' => [], ]; $i = 0; diff --git a/includes/html/graphs/device/xirrus_stations.inc.php b/includes/html/graphs/device/xirrus_stations.inc.php index 5e3006f085..3a6b3dcc98 100644 --- a/includes/html/graphs/device/xirrus_stations.inc.php +++ b/includes/html/graphs/device/xirrus_stations.inc.php @@ -3,15 +3,15 @@ require 'includes/html/graphs/common.inc.php'; $pallette = [ - 1 => '001080', - 2 => '043D85', - 3 => '096C8A', - 4 => '0F8F84', - 5 => '159461', - 6 => '1B9A3E', - 7 => '279F22', - 8 => '56A429', - 9 => '83A930', + 1 => '001080', + 2 => '043D85', + 3 => '096C8A', + 4 => '0F8F84', + 5 => '159461', + 6 => '1B9A3E', + 7 => '279F22', + 8 => '56A429', + 9 => '83A930', 10 => 'AEAE38', 11 => 'B48E40', 12 => 'B97049', diff --git a/includes/html/graphs/generic_multi_simplex_seperated.inc.php b/includes/html/graphs/generic_multi_simplex_seperated.inc.php index 77c0880743..a03ee04f13 100644 --- a/includes/html/graphs/generic_multi_simplex_seperated.inc.php +++ b/includes/html/graphs/generic_multi_simplex_seperated.inc.php @@ -80,7 +80,7 @@ foreach ($rrd_list as $i => $rrd) { $rrd_options .= ' CDEF:' . $g_defname . $i . 'min=' . $rrd['ds'] . $i . 'min,' . $multiplier . ',*'; $rrd_options .= ' CDEF:' . $g_defname . $i . 'max=' . $rrd['ds'] . $i . 'max,' . $multiplier . ',*'; - // If we've been passed a divider (divisor!) we make a CDEF for it. + // If we've been passed a divider (divisor!) we make a CDEF for it. } elseif (is_numeric($divider)) { $g_defname = $rrd['ds'] . '_cdef'; $rrd_options .= ' CDEF:' . $g_defname . $i . '=' . $rrd['ds'] . $i . ',' . $divider . ',/'; diff --git a/includes/html/pages/apps.inc.php b/includes/html/pages/apps.inc.php index ddb69bc7b5..2f6a5fb614 100644 --- a/includes/html/pages/apps.inc.php +++ b/includes/html/pages/apps.inc.php @@ -530,9 +530,9 @@ echo '
'; echo "Apps » "; unset($sep); $link_array = [ - 'page' => 'device', + 'page' => 'device', 'device' => $device['device_id'], - 'tab' => 'apps', + 'tab' => 'apps', ]; $apps = \LibreNMS\Util\ObjectCache::applications()->flatten(); diff --git a/includes/html/pages/apps/proxmox/vm.inc.php b/includes/html/pages/apps/proxmox/vm.inc.php index 27a7b9316f..2e5d665c04 100644 --- a/includes/html/pages/apps/proxmox/vm.inc.php +++ b/includes/html/pages/apps/proxmox/vm.inc.php @@ -3,7 +3,7 @@ $vm = proxmox_vm_info(var_get('vmid'), var_get('instance')); $graphs = [ - 'proxmox_traffic' => 'Traffic', + 'proxmox_traffic' => 'Traffic', ]; foreach ($vm['ports'] as $port) { diff --git a/includes/html/pages/bill/actions.inc.php b/includes/html/pages/bill/actions.inc.php index 087104abe0..c1cdbba95d 100644 --- a/includes/html/pages/bill/actions.inc.php +++ b/includes/html/pages/bill/actions.inc.php @@ -79,15 +79,15 @@ if ($_POST['action'] == 'update_bill') { // NOTE: casting to string for mysqli bug (fixed by mysqlnd) if (dbUpdate( [ - 'bill_name' => $_POST['bill_name'], - 'bill_day' => $_POST['bill_day'], - 'bill_quota' => (string) $bill_quota, - 'bill_cdr' => (string) $bill_cdr, - 'bill_type' => $_POST['bill_type'], - 'dir_95th' => $_POST['dir_95th'], + 'bill_name' => $_POST['bill_name'], + 'bill_day' => $_POST['bill_day'], + 'bill_quota' => (string) $bill_quota, + 'bill_cdr' => (string) $bill_cdr, + 'bill_type' => $_POST['bill_type'], + 'dir_95th' => $_POST['dir_95th'], 'bill_custid' => $_POST['bill_custid'], - 'bill_ref' => $_POST['bill_ref'], - 'bill_notes' => $_POST['bill_notes'], + 'bill_ref' => $_POST['bill_ref'], + 'bill_notes' => $_POST['bill_notes'], ], 'bills', '`bill_id` = ?', diff --git a/includes/html/pages/device/apps.inc.php b/includes/html/pages/device/apps.inc.php index 51191beab0..cb9e2e8153 100644 --- a/includes/html/pages/device/apps.inc.php +++ b/includes/html/pages/device/apps.inc.php @@ -10,9 +10,9 @@ echo "Apps » "; $sep = ''; $link_array = [ - 'page' => 'device', + 'page' => 'device', 'device' => $device['device_id'], - 'tab' => 'apps', + 'tab' => 'apps', ]; $apps = DeviceCache::getPrimary()->applications diff --git a/includes/html/pages/device/apps/apache.inc.php b/includes/html/pages/device/apps/apache.inc.php index b9c934f35e..955f19b219 100644 --- a/includes/html/pages/device/apps/apache.inc.php +++ b/includes/html/pages/device/apps/apache.inc.php @@ -1,9 +1,9 @@ 'Traffic', - 'apache_hits' => 'Hits', - 'apache_cpu' => 'CPU Utilisation', + 'apache_bits' => 'Traffic', + 'apache_hits' => 'Hits', + 'apache_cpu' => 'CPU Utilisation', 'apache_scoreboard' => 'Scoreboard Statistics', ]; diff --git a/includes/html/pages/device/apps/backupninja.inc.php b/includes/html/pages/device/apps/backupninja.inc.php index 04f69b22e9..ad7e6fbf44 100644 --- a/includes/html/pages/device/apps/backupninja.inc.php +++ b/includes/html/pages/device/apps/backupninja.inc.php @@ -1,7 +1,7 @@ 'backupninja backups', + 'backupninja_backupninja' => 'backupninja backups', ]; foreach ($graphs as $key => $text) { $graph_type = $key; diff --git a/includes/html/pages/device/apps/cape.inc.php b/includes/html/pages/device/apps/cape.inc.php index f4ba47d6d6..6b5dddc212 100644 --- a/includes/html/pages/device/apps/cape.inc.php +++ b/includes/html/pages/device/apps/cape.inc.php @@ -27,10 +27,10 @@ if (sizeof($packages) > 0) { print_optionbar_start(); if (isset($vars['package'])) { - echo generate_link('General', $link_array, ['app'=>'cape', 'stddev'=>$vars['stddev'], 'bypkg'=>$vars['bypkg'], 'bytimeslot'=>$vars['bytimeslot'], 'statsavg'=>$vars['statsavg'], 'runstats'=>$vars['runstats']]); + echo generate_link('General', $link_array, ['app' => 'cape', 'stddev' => $vars['stddev'], 'bypkg' => $vars['bypkg'], 'bytimeslot' => $vars['bytimeslot'], 'statsavg' => $vars['statsavg'], 'runstats' => $vars['runstats']]); } else { $label = 'General'; - echo generate_link($label, $link_array, ['app'=>'cape', 'stddev'=>$vars['stddev'], 'bypkg'=>$vars['bypkg'], 'bytimeslot'=>$vars['bytimeslot'], 'statsavg'=>$vars['statsavg'], 'runstats'=>$vars['runstats']]); + echo generate_link($label, $link_array, ['app' => 'cape', 'stddev' => $vars['stddev'], 'bypkg' => $vars['bypkg'], 'bytimeslot' => $vars['bytimeslot'], 'statsavg' => $vars['statsavg'], 'runstats' => $vars['runstats']]); } echo ' | Packages: '; @@ -50,7 +50,7 @@ if (sizeof($packages) > 0) { $append = ', '; } - echo generate_link($label, $link_array, ['app'=>'cape', 'stddev'=>$vars['stddev'], 'bypkg'=>$vars['bypkg'], 'bytimeslot'=>$vars['bytimeslot'], 'package'=>$package, 'statsavg'=>$vars['statsavg'], 'runstats'=>$vars['runstats']]) . $append; + echo generate_link($label, $link_array, ['app' => 'cape', 'stddev' => $vars['stddev'], 'bypkg' => $vars['bypkg'], 'bytimeslot' => $vars['bytimeslot'], 'package' => $package, 'statsavg' => $vars['statsavg'], 'runstats' => $vars['runstats']]) . $append; } echo "
\n"; @@ -58,12 +58,12 @@ if (sizeof($packages) > 0) { echo 'Run Stats Averages: '; if ($vars['statsavg'] == 'on') { $label = 'On'; - echo generate_link($label, $link_array, ['app'=>'cape', 'bytimeslot'=>$vars['bytimeslot'], 'bypkg'=>$vars['bypkg'], 'stddev'=>$vars['stddev'], 'package'=>$vars['package'], 'statsavg'=>'on', 'runstats'=>$vars['runstats']]) . ', ' . - generate_link('Off', $link_array, ['app'=>'cape', 'bytimeslot'=>$vars['bytimeslot'], 'bypkg'=>$vars['bypkg'], 'stddev'=>$vars['stddev'], 'package'=>$vars['package'], 'statsavg'=>'off', 'runstats'=>$vars['runstats']]); + echo generate_link($label, $link_array, ['app' => 'cape', 'bytimeslot' => $vars['bytimeslot'], 'bypkg' => $vars['bypkg'], 'stddev' => $vars['stddev'], 'package' => $vars['package'], 'statsavg' => 'on', 'runstats' => $vars['runstats']]) . ', ' . + generate_link('Off', $link_array, ['app' => 'cape', 'bytimeslot' => $vars['bytimeslot'], 'bypkg' => $vars['bypkg'], 'stddev' => $vars['stddev'], 'package' => $vars['package'], 'statsavg' => 'off', 'runstats' => $vars['runstats']]); } else { $label = 'Off'; - echo generate_link('On', $link_array, ['app'=>'cape', 'bytimeslot'=>$vars['bytimeslot'], 'bypkg'=>$vars['bypkg'], 'stddev'=>$vars['stddev'], 'package'=>$vars['package'], 'statsavg'=>'on', 'runstats'=>$vars['runstats']]) . ', ' . - generate_link($label, $link_array, ['app'=>'cape', 'bytimeslot'=>$vars['bytimeslot'], 'bypkg'=>$vars['bypkg'], 'stddev'=>$vars['stddev'], 'package'=>$vars['package'], 'statsavg'=>'off', 'runstats'=>$vars['runstats']]); + echo generate_link('On', $link_array, ['app' => 'cape', 'bytimeslot' => $vars['bytimeslot'], 'bypkg' => $vars['bypkg'], 'stddev' => $vars['stddev'], 'package' => $vars['package'], 'statsavg' => 'on', 'runstats' => $vars['runstats']]) . ', ' . + generate_link($label, $link_array, ['app' => 'cape', 'bytimeslot' => $vars['bytimeslot'], 'bypkg' => $vars['bypkg'], 'stddev' => $vars['stddev'], 'package' => $vars['package'], 'statsavg' => 'off', 'runstats' => $vars['runstats']]); } echo ' | '; @@ -71,12 +71,12 @@ if (sizeof($packages) > 0) { echo 'By Time Slot: '; if ($vars['bytimeslot'] == 'on') { $label = 'On'; - echo generate_link($label, $link_array, ['app'=>'cape', 'bytimeslot'=>'on', 'bypkg'=>$vars['bypkg'], 'stddev'=>$vars['stddev'], 'package'=>$vars['package'], 'statsavg'=>$vars['statsavg'], 'runstats'=>$vars['runstats']]) . ', ' . - generate_link('Off', $link_array, ['app'=>'cape', 'bytimeslot'=>'off', 'bypkg'=>$vars['bypkg'], 'stddev'=>$vars['stddev'], 'package'=>$vars['package'], 'statsavg'=>$vars['statsavg'], 'runstats'=>$vars['runstats']]); + echo generate_link($label, $link_array, ['app' => 'cape', 'bytimeslot' => 'on', 'bypkg' => $vars['bypkg'], 'stddev' => $vars['stddev'], 'package' => $vars['package'], 'statsavg' => $vars['statsavg'], 'runstats' => $vars['runstats']]) . ', ' . + generate_link('Off', $link_array, ['app' => 'cape', 'bytimeslot' => 'off', 'bypkg' => $vars['bypkg'], 'stddev' => $vars['stddev'], 'package' => $vars['package'], 'statsavg' => $vars['statsavg'], 'runstats' => $vars['runstats']]); } else { $label = 'Off'; - echo generate_link('On', $link_array, ['app'=>'cape', 'bytimeslot'=>'on', 'bypkg'=>$vars['bypkg'], 'stddev'=>$vars['stddev'], 'package'=>$vars['package'], 'statsavg'=>$vars['statsavg'], 'runstats'=>$vars['runstats']]) . ', ' . - generate_link($label, $link_array, ['app'=>'cape', 'bytimeslot'=>'off', 'bypkg'=>$vars['bypkg'], 'stddev'=>$vars['stddev'], 'package'=>$vars['package'], 'statsavg'=>$vars['statsavg'], 'runstats'=>$vars['runstats']]); + echo generate_link('On', $link_array, ['app' => 'cape', 'bytimeslot' => 'on', 'bypkg' => $vars['bypkg'], 'stddev' => $vars['stddev'], 'package' => $vars['package'], 'statsavg' => $vars['statsavg'], 'runstats' => $vars['runstats']]) . ', ' . + generate_link($label, $link_array, ['app' => 'cape', 'bytimeslot' => 'off', 'bypkg' => $vars['bypkg'], 'stddev' => $vars['stddev'], 'package' => $vars['package'], 'statsavg' => $vars['statsavg'], 'runstats' => $vars['runstats']]); } if (! isset($vars['package'])) { @@ -84,12 +84,12 @@ if (sizeof($packages) > 0) { echo 'By Package: '; if ($vars['bypkg'] == 'on') { $label = 'On'; - echo generate_link($label, $link_array, ['app'=>'cape', 'bypkg'=>'on', 'bytimeslot'=>$vars['bytimeslot'], 'stddev'=>$vars['stddev'], 'package'=>$vars['package'], 'statsavg'=>$vars['statsavg'], 'runstats'=>$vars['runstats']]) . ', ' . - generate_link('Off', $link_array, ['app'=>'cape', 'bypkg'=>'off', 'bytimeslot'=>$vars['bytimeslot'], 'stddev'=>$vars['stddev'], 'package'=>$vars['package'], 'statsavg'=>$vars['statsavg'], 'runstats'=>$vars['runstats']]); + echo generate_link($label, $link_array, ['app' => 'cape', 'bypkg' => 'on', 'bytimeslot' => $vars['bytimeslot'], 'stddev' => $vars['stddev'], 'package' => $vars['package'], 'statsavg' => $vars['statsavg'], 'runstats' => $vars['runstats']]) . ', ' . + generate_link('Off', $link_array, ['app' => 'cape', 'bypkg' => 'off', 'bytimeslot' => $vars['bytimeslot'], 'stddev' => $vars['stddev'], 'package' => $vars['package'], 'statsavg' => $vars['statsavg'], 'runstats' => $vars['runstats']]); } else { $label = 'Off'; - echo generate_link('On', $link_array, ['app'=>'cape', 'bypkg'=>'on', 'bytimeslot'=>$vars['bytimeslot'], 'stddev'=>$vars['stddev'], 'package'=>$vars['package'], 'statsavg'=>$vars['statsavg'], 'runstats'=>$vars['runstats']]) . ', ' . - generate_link($label, $link_array, ['app'=>'cape', 'bypkg'=>'off', 'bytimeslot'=>$vars['bytimeslot'], 'stddev'=>$vars['stddev'], 'package'=>$vars['package'], 'statsavg'=>$vars['statsavg'], 'runstats'=>$vars['runstats']]); + echo generate_link('On', $link_array, ['app' => 'cape', 'bypkg' => 'on', 'bytimeslot' => $vars['bytimeslot'], 'stddev' => $vars['stddev'], 'package' => $vars['package'], 'statsavg' => $vars['statsavg'], 'runstats' => $vars['runstats']]) . ', ' . + generate_link($label, $link_array, ['app' => 'cape', 'bypkg' => 'off', 'bytimeslot' => $vars['bytimeslot'], 'stddev' => $vars['stddev'], 'package' => $vars['package'], 'statsavg' => $vars['statsavg'], 'runstats' => $vars['runstats']]); } } @@ -98,12 +98,12 @@ if (sizeof($packages) > 0) { echo 'Standard Deviation: '; if ($vars['stddev'] == 'on') { $label = 'On'; - echo generate_link($label, $link_array, ['app'=>'cape', 'stddev'=>'on', 'bypkg'=>$vars['bypkg'], 'bytimeslot'=>$vars['bytimeslot'], 'package'=>$vars['package'], 'statsavg'=>$vars['statsavg'], 'runstats'=>$vars['runstats']]) . ', ' . - generate_link('Off', $link_array, ['app'=>'cape', 'stddev'=>'off', 'bypkg'=>$vars['bypkg'], 'bytimeslot'=>$vars['bytimeslot'], 'package'=>$vars['package'], 'statsavg'=>$vars['statsavg'], 'runstats'=>$vars['runstats']]); + echo generate_link($label, $link_array, ['app' => 'cape', 'stddev' => 'on', 'bypkg' => $vars['bypkg'], 'bytimeslot' => $vars['bytimeslot'], 'package' => $vars['package'], 'statsavg' => $vars['statsavg'], 'runstats' => $vars['runstats']]) . ', ' . + generate_link('Off', $link_array, ['app' => 'cape', 'stddev' => 'off', 'bypkg' => $vars['bypkg'], 'bytimeslot' => $vars['bytimeslot'], 'package' => $vars['package'], 'statsavg' => $vars['statsavg'], 'runstats' => $vars['runstats']]); } else { $label = 'Off'; - echo generate_link('On', $link_array, ['app'=>'cape', 'stddev'=>'on', 'bypkg'=>$vars['bypkg'], 'bytimeslot'=>$vars['bytimeslot'], 'package'=>$vars['package'], 'statsavg'=>$vars['statsavg'], 'runstats'=>$vars['runstats']]) . ', ' . - generate_link($label, $link_array, ['app'=>'cape', 'stddev'=>'off', 'bypkg'=>$vars['bypkg'], 'bytimeslot'=>$vars['bytimeslot'], 'package'=>$vars['package'], 'statsavg'=>$vars['statsavg'], 'runstats'=>$vars['runstats']]); + echo generate_link('On', $link_array, ['app' => 'cape', 'stddev' => 'on', 'bypkg' => $vars['bypkg'], 'bytimeslot' => $vars['bytimeslot'], 'package' => $vars['package'], 'statsavg' => $vars['statsavg'], 'runstats' => $vars['runstats']]) . ', ' . + generate_link($label, $link_array, ['app' => 'cape', 'stddev' => 'off', 'bypkg' => $vars['bypkg'], 'bytimeslot' => $vars['bytimeslot'], 'package' => $vars['package'], 'statsavg' => $vars['statsavg'], 'runstats' => $vars['runstats']]); } if (! isset($vars['package'])) { @@ -111,12 +111,12 @@ if (sizeof($packages) > 0) { echo 'Run Statuses Averages: '; if ($vars['runstats'] == 'on') { $label = 'On'; - echo generate_link($label, $link_array, ['app'=>'cape', 'bypkg'=>$vars['bypkg'], 'bytimeslot'=>$vars['bytimeslot'], 'stddev'=>$vars['stddev'], 'package'=>$vars['package'], 'statsavg'=>$vars['statsavg'], 'runstats'=>'on']) . ', ' . - generate_link('Off', $link_array, ['app'=>'cape', 'bypkg'=>$vars['bypkg'], 'bytimeslot'=>$vars['bytimeslot'], 'stddev'=>$vars['stddev'], 'package'=>$vars['package'], 'statsavg'=>$vars['statsavg'], 'runstats'=>'off']); + echo generate_link($label, $link_array, ['app' => 'cape', 'bypkg' => $vars['bypkg'], 'bytimeslot' => $vars['bytimeslot'], 'stddev' => $vars['stddev'], 'package' => $vars['package'], 'statsavg' => $vars['statsavg'], 'runstats' => 'on']) . ', ' . + generate_link('Off', $link_array, ['app' => 'cape', 'bypkg' => $vars['bypkg'], 'bytimeslot' => $vars['bytimeslot'], 'stddev' => $vars['stddev'], 'package' => $vars['package'], 'statsavg' => $vars['statsavg'], 'runstats' => 'off']); } else { $label = 'Off'; - echo generate_link('On', $link_array, ['app'=>'cape', 'bypkg'=>$vars['bypkg'], 'bytimeslot'=>$vars['bytimeslot'], 'stddev'=>$vars['stddev'], 'package'=>$vars['package'], 'statsavg'=>$vars['statsavg'], 'runstats'=>'on']) . ', ' . - generate_link($label, $link_array, ['app'=>'cape', 'bypkg'=>$vars['bypkg'], 'bytimeslot'=>$vars['bytimeslot'], 'stddev'=>$vars['stddev'], 'package'=>$vars['package'], 'statsavg'=>$vars['statsavg'], 'runstats'=>'off']); + echo generate_link('On', $link_array, ['app' => 'cape', 'bypkg' => $vars['bypkg'], 'bytimeslot' => $vars['bytimeslot'], 'stddev' => $vars['stddev'], 'package' => $vars['package'], 'statsavg' => $vars['statsavg'], 'runstats' => 'on']) . ', ' . + generate_link($label, $link_array, ['app' => 'cape', 'bypkg' => $vars['bypkg'], 'bytimeslot' => $vars['bytimeslot'], 'stddev' => $vars['stddev'], 'package' => $vars['package'], 'statsavg' => $vars['statsavg'], 'runstats' => 'off']); } } diff --git a/includes/html/pages/device/apps/ceph.inc.php b/includes/html/pages/device/apps/ceph.inc.php index ba8fac3eaf..27a3508e10 100644 --- a/includes/html/pages/device/apps/ceph.inc.php +++ b/includes/html/pages/device/apps/ceph.inc.php @@ -1,9 +1,9 @@ 'Pool stats', - 'ceph_osdperf' => 'OSD Performance', - 'ceph_df' => 'Usage', + 'ceph_poolstats' => 'Pool stats', + 'ceph_osdperf' => 'OSD Performance', + 'ceph_df' => 'Usage', ]; foreach ($graphs as $key => $text) { diff --git a/includes/html/pages/device/apps/certificate.inc.php b/includes/html/pages/device/apps/certificate.inc.php index 07a93b80a0..0625fd22f0 100644 --- a/includes/html/pages/device/apps/certificate.inc.php +++ b/includes/html/pages/device/apps/certificate.inc.php @@ -5,10 +5,10 @@ $domain_list = Rrd::getRrdApplicationArrays($device, $app['app_id'], 'certificat print_optionbar_start(); $link_array = [ - 'page' => 'device', + 'page' => 'device', 'device' => $device['device_id'], - 'tab' => 'apps', - 'app' => 'certificate', + 'tab' => 'apps', + 'app' => 'certificate', ]; $cert_name_list = []; @@ -28,7 +28,7 @@ printf('%s | certificates: %s', generate_link('All Certificates', $link_array), print_optionbar_end(); $graphs = [ - 'certificate_age' => 'Age', + 'certificate_age' => 'Age', 'certificate_remaining_days' => 'Remaining days', ]; diff --git a/includes/html/pages/device/apps/chronyd.inc.php b/includes/html/pages/device/apps/chronyd.inc.php index 4c1510ee04..acb07a83ce 100644 --- a/includes/html/pages/device/apps/chronyd.inc.php +++ b/includes/html/pages/device/apps/chronyd.inc.php @@ -1,10 +1,10 @@ 'device', + 'page' => 'device', 'device' => $device['device_id'], - 'tab' => 'apps', - 'app' => 'chronyd', + 'tab' => 'apps', + 'app' => 'chronyd', ]; print_optionbar_start(); @@ -36,9 +36,9 @@ if (! isset($vars['source'])) { ]; } else { $graphs = [ - 'chronyd_source_sampling' => 'Clock sampling offsets', - 'chronyd_source_frequency' => 'Clock residual frequency', - 'chronyd_source_polling' => 'Polling', + 'chronyd_source_sampling' => 'Clock sampling offsets', + 'chronyd_source_frequency' => 'Clock residual frequency', + 'chronyd_source_polling' => 'Polling', ]; } diff --git a/includes/html/pages/device/apps/dhcp-stats.inc.php b/includes/html/pages/device/apps/dhcp-stats.inc.php index f9f7023e69..493f071a55 100644 --- a/includes/html/pages/device/apps/dhcp-stats.inc.php +++ b/includes/html/pages/device/apps/dhcp-stats.inc.php @@ -4,10 +4,10 @@ $graphs = [ 'dhcp-stats_stats' => 'Stats', 'dhcp-stats_pools_percent' => 'Pools Percent', 'dhcp-stats_pools_current' => 'Pools Current', - 'dhcp-stats_pools_max' => 'Pools Max', + 'dhcp-stats_pools_max' => 'Pools Max', 'dhcp-stats_networks_percent' => 'Networks Percent', 'dhcp-stats_networks_current' => 'Networks Current', - 'dhcp-stats_networks_max' => 'Networks Max', + 'dhcp-stats_networks_max' => 'Networks Max', ]; foreach ($graphs as $key => $text) { diff --git a/includes/html/pages/device/apps/drbd.inc.php b/includes/html/pages/device/apps/drbd.inc.php index 3c52dccb20..bf01a054cb 100644 --- a/includes/html/pages/device/apps/drbd.inc.php +++ b/includes/html/pages/device/apps/drbd.inc.php @@ -4,9 +4,9 @@ echo '

' . $app['app_instance'] . '

'; $graphs = [ 'drbd_network_bits' => 'Network Traffic', - 'drbd_disk_bits' => 'Disk Traffic', - 'drbd_unsynced' => 'Unsynced Data', - 'drbd_queue' => 'Queues', + 'drbd_disk_bits' => 'Disk Traffic', + 'drbd_unsynced' => 'Unsynced Data', + 'drbd_queue' => 'Queues', ]; foreach ($graphs as $key => $text) { diff --git a/includes/html/pages/device/apps/freeradius.inc.php b/includes/html/pages/device/apps/freeradius.inc.php index 7613aed491..bce5b6aeae 100644 --- a/includes/html/pages/device/apps/freeradius.inc.php +++ b/includes/html/pages/device/apps/freeradius.inc.php @@ -1,13 +1,13 @@ 'FreeRADIUS - Access', - 'freeradius_auth' => 'FreeRADIUS - Auth', - 'freeradius_acct' => 'FreeRADIUS - Acct', + 'freeradius_access' => 'FreeRADIUS - Access', + 'freeradius_auth' => 'FreeRADIUS - Auth', + 'freeradius_acct' => 'FreeRADIUS - Acct', 'freeradius_proxy_access' => 'FreeRADIUS - Proxy Access', - 'freeradius_proxy_auth' => 'FreeRADIUS - Proxy Auth', - 'freeradius_proxy_acct' => 'FreeRADIUS - Proxy Acct', - 'freeradius_queue' => 'FreeRADIUS - Queue', + 'freeradius_proxy_auth' => 'FreeRADIUS - Proxy Auth', + 'freeradius_proxy_acct' => 'FreeRADIUS - Proxy Acct', + 'freeradius_queue' => 'FreeRADIUS - Queue', ]; foreach ($graphs as $key => $text) { $graph_type = $key; diff --git a/includes/html/pages/device/apps/hv-monitor.inc.php b/includes/html/pages/device/apps/hv-monitor.inc.php index 3ebbc2c0e5..f16f388f24 100644 --- a/includes/html/pages/device/apps/hv-monitor.inc.php +++ b/includes/html/pages/device/apps/hv-monitor.inc.php @@ -3,10 +3,10 @@ use App\Models\Port; $link_array = [ - 'page' => 'device', + 'page' => 'device', 'device' => $device['device_id'], - 'tab' => 'apps', - 'app' => 'hv-monitor', + 'tab' => 'apps', + 'app' => 'hv-monitor', ]; print_optionbar_start(); @@ -25,7 +25,7 @@ foreach ($app->data['VMs'] as $vm) { $label = '' . $vm . ''; } - $vm_links[] = generate_link($label, $link_array, ['vm'=>$vm]); + $vm_links[] = generate_link($label, $link_array, ['vm' => $vm]); } echo implode(', ', $vm_links); @@ -39,22 +39,22 @@ echo '
Pages: '; if ($vars['vmpage'] == 'general') { $page_links[] = 'General'; } else { - $page_links[] = generate_link('General', $link_array, ['vm' => $vars['vm'], 'vmpage'=>'general']); + $page_links[] = generate_link('General', $link_array, ['vm' => $vars['vm'], 'vmpage' => 'general']); } if ($vars['vmpage'] == 'disk') { $page_links[] = 'Disk'; } else { - $page_links[] = generate_link('Disk', $link_array, ['vm' => $vars['vm'], 'vmpage'=>'disk']); + $page_links[] = generate_link('Disk', $link_array, ['vm' => $vars['vm'], 'vmpage' => 'disk']); } if ($vars['vmpage'] == 'network') { $page_links[] = 'Network'; } else { - $page_links[] = generate_link('Network', $link_array, ['vm' => $vars['vm'], 'vmpage'=>'network']); + $page_links[] = generate_link('Network', $link_array, ['vm' => $vars['vm'], 'vmpage' => 'network']); } if ($vars['vmpage'] == 'Snapshots') { $page_links[] = 'Network'; } else { - $page_links[] = generate_link('Snapshots', $link_array, ['vm' => $vars['vm'], 'vmpage'=>'snapshots']); + $page_links[] = generate_link('Snapshots', $link_array, ['vm' => $vars['vm'], 'vmpage' => 'snapshots']); } echo implode(', ', $page_links); @@ -70,7 +70,7 @@ if (isset($vars['vm'])) { if ($vars['vmdisk'] == $disk) { $disk_links[] = $label; } else { - $disk_links[] = generate_link($label, $link_array, ['vm' => $vars['vm'], 'vmdisk'=>$disk]); + $disk_links[] = generate_link($label, $link_array, ['vm' => $vars['vm'], 'vmdisk' => $disk]); } } echo implode(', ', $disk_links); @@ -83,7 +83,7 @@ if (isset($vars['vm'])) { if ($vars['vmif'] == $vmif) { $if_links[] = '' . $vmif . ''; } else { - $if_links[] = generate_link($label, $link_array, ['vm' => $vars['vm'], 'vmif'=>$vmif]); + $if_links[] = generate_link($label, $link_array, ['vm' => $vars['vm'], 'vmif' => $vmif]); } } echo implode(', ', $if_links); @@ -97,7 +97,7 @@ if (isset($vars['vmif']) and isset($vars['vm'])) { 'MAC: ' . $mac; if (isset($port) && isset($mac) && $mac != '') { echo ' (' . - generate_device_link(['device_id'=>$port->device_id]) . + generate_device_link(['device_id' => $port->device_id]) . ', ' . generate_port_link([ 'label' => $port->label, @@ -150,10 +150,10 @@ if (isset($vars['vmif']) and isset($vars['vm'])) { print_optionbar_end(); $link_array = [ - 'page' => 'device', + 'page' => 'device', 'device' => $device['device_id'], - 'tab' => 'apps', - 'app' => 'hv-monitor', + 'tab' => 'apps', + 'app' => 'hv-monitor', ]; $graphs = []; diff --git a/includes/html/pages/device/apps/icecast.inc.php b/includes/html/pages/device/apps/icecast.inc.php index aad9d4209a..fd0a2331fa 100644 --- a/includes/html/pages/device/apps/icecast.inc.php +++ b/includes/html/pages/device/apps/icecast.inc.php @@ -1,8 +1,8 @@ 'CPU Load', - 'icecast_memoryusage' => 'Used Memory', + 'icecast_cpuload' => 'CPU Load', + 'icecast_memoryusage' => 'Used Memory', 'icecast_openfiles' => 'Open files', ]; diff --git a/includes/html/pages/device/apps/logsize.inc.php b/includes/html/pages/device/apps/logsize.inc.php index bfa43f0cec..40cdfe2cb9 100644 --- a/includes/html/pages/device/apps/logsize.inc.php +++ b/includes/html/pages/device/apps/logsize.inc.php @@ -1,10 +1,10 @@ 'device', + 'page' => 'device', 'device' => $device['device_id'], - 'tab' => 'apps', - 'app' => 'logsize', + 'tab' => 'apps', + 'app' => 'logsize', ]; $no_minus_d = $app->data['no_minus_d'] ?? false; @@ -39,7 +39,7 @@ if (isset($vars['log_set']) && isset($sets[$vars['log_set']])) { ? '' . $log_file . '' : $log_file; - echo generate_link($label, $link_array, ['log_set' => $vars['log_set'], 'log_file'=>$log_file]) . "\n"; + echo generate_link($label, $link_array, ['log_set' => $vars['log_set'], 'log_file' => $log_file]) . "\n"; if ($index < (count($log_files) - 1)) { echo ', '; diff --git a/includes/html/pages/device/apps/mailscanner.inc.php b/includes/html/pages/device/apps/mailscanner.inc.php index d8bcbceb0a..dd5a4eab30 100644 --- a/includes/html/pages/device/apps/mailscanner.inc.php +++ b/includes/html/pages/device/apps/mailscanner.inc.php @@ -1,8 +1,8 @@ 'Mailscanner - Sent / Received', - 'mailscanner_spam' => 'Mailscanner - Spam / Virus', + 'mailscanner_sent' => 'Mailscanner - Sent / Received', + 'mailscanner_spam' => 'Mailscanner - Spam / Virus', 'mailscanner_reject' => 'Mailscanner - Rejected / Waiting / Relayed', ]; diff --git a/includes/html/pages/device/apps/mdadm.inc.php b/includes/html/pages/device/apps/mdadm.inc.php index 9bcc17b299..af91717ea2 100644 --- a/includes/html/pages/device/apps/mdadm.inc.php +++ b/includes/html/pages/device/apps/mdadm.inc.php @@ -5,10 +5,10 @@ $mdadm_arrays = Rrd::getRrdApplicationArrays($device, $app['app_id'], 'mdadm'); print_optionbar_start(); $link_array = [ - 'page' => 'device', + 'page' => 'device', 'device' => $device['device_id'], - 'tab' => 'apps', - 'app' => 'mdadm', + 'tab' => 'apps', + 'app' => 'mdadm', ]; $array_list = []; @@ -28,12 +28,12 @@ printf('%s | arrays: %s', generate_link('All RAID Arrays', $link_array), implode print_optionbar_end(); $graphs = [ - 'mdadm_level' => 'RAID level', - 'mdadm_size' => 'RAID Size', - 'mdadm_disc_count' => 'RAID Disk count', + 'mdadm_level' => 'RAID level', + 'mdadm_size' => 'RAID Size', + 'mdadm_disc_count' => 'RAID Disk count', 'mdadm_hotspare_count' => 'RAID Hotspare Disk count', - 'mdadm_degraded' => 'RAID degraded', - 'mdadm_sync_speed' => 'RAID Sync speed', + 'mdadm_degraded' => 'RAID degraded', + 'mdadm_sync_speed' => 'RAID Sync speed', 'mdadm_sync_completed' => 'RAID Sync completed', ]; diff --git a/includes/html/pages/device/apps/memcached.inc.php b/includes/html/pages/device/apps/memcached.inc.php index 7c01432ac4..a5c0adc0bc 100644 --- a/includes/html/pages/device/apps/memcached.inc.php +++ b/includes/html/pages/device/apps/memcached.inc.php @@ -1,13 +1,13 @@ 'Traffic', + 'memcached_bits' => 'Traffic', 'memcached_commands' => 'Commands', - 'memcached_data' => 'Data Size', - 'memcached_items' => 'Items', - 'memcached_hitmiss' => 'Hits/Misses', - 'memcached_uptime' => 'Uptime', - 'memcached_threads' => 'Threads', + 'memcached_data' => 'Data Size', + 'memcached_items' => 'Items', + 'memcached_hitmiss' => 'Hits/Misses', + 'memcached_uptime' => 'Uptime', + 'memcached_threads' => 'Threads', ]; diff --git a/includes/html/pages/device/apps/mojo_cape_submit.inc.php b/includes/html/pages/device/apps/mojo_cape_submit.inc.php index b4a8bb155c..d1e14bca8f 100644 --- a/includes/html/pages/device/apps/mojo_cape_submit.inc.php +++ b/includes/html/pages/device/apps/mojo_cape_submit.inc.php @@ -1,10 +1,10 @@ 'device', + 'page' => 'device', 'device' => $device['device_id'], - 'tab' => 'apps', - 'app' => 'mojo_cape_submit', + 'tab' => 'apps', + 'app' => 'mojo_cape_submit', ]; print_optionbar_start(); diff --git a/includes/html/pages/device/apps/mysql.inc.php b/includes/html/pages/device/apps/mysql.inc.php index c90ba4b54a..dbb94435b1 100644 --- a/includes/html/pages/device/apps/mysql.inc.php +++ b/includes/html/pages/device/apps/mysql.inc.php @@ -5,9 +5,9 @@ print_optionbar_start(); echo "" . $app->displayName() . ' » '; $app_sections = [ - 'system' => 'System', + 'system' => 'System', 'queries' => 'Queries', - 'innodb' => 'InnoDB', + 'innodb' => 'InnoDB', ]; unset($sep); @@ -33,33 +33,33 @@ foreach ($app_sections as $app_section => $app_section_text) { print_optionbar_end(); $graphs['system'] = [ - 'mysql_connections' => 'Connections', - 'mysql_files_tables' => 'Files and Tables', - 'mysql_myisam_indexes' => 'MyISAM Indexes', - 'mysql_network_traffic' => 'Network Traffic', - 'mysql_table_locks' => 'Table Locks', + 'mysql_connections' => 'Connections', + 'mysql_files_tables' => 'Files and Tables', + 'mysql_myisam_indexes' => 'MyISAM Indexes', + 'mysql_network_traffic' => 'Network Traffic', + 'mysql_table_locks' => 'Table Locks', 'mysql_temporary_objects' => 'Temporary Objects', ]; $graphs['queries'] = [ - 'mysql_command_counters' => 'Command Counters', - 'mysql_query_cache' => 'Query Cache', + 'mysql_command_counters' => 'Command Counters', + 'mysql_query_cache' => 'Query Cache', 'mysql_query_cache_memory' => 'Query Cache Memory', - 'mysql_select_types' => 'Select Types', - 'mysql_slow_queries' => 'Slow Queries', - 'mysql_sorts' => 'Sorts', + 'mysql_select_types' => 'Select Types', + 'mysql_slow_queries' => 'Slow Queries', + 'mysql_sorts' => 'Sorts', ]; $graphs['innodb'] = [ - 'mysql_innodb_buffer_pool' => 'InnoDB Buffer Pool', + 'mysql_innodb_buffer_pool' => 'InnoDB Buffer Pool', 'mysql_innodb_buffer_pool_activity' => 'InnoDB Buffer Pool Activity', - 'mysql_innodb_insert_buffer' => 'InnoDB Insert Buffer', - 'mysql_innodb_io' => 'InnoDB IO', - 'mysql_innodb_io_pending' => 'InnoDB IO Pending', - 'mysql_innodb_log' => 'InnoDB Log', - 'mysql_innodb_row_operations' => 'InnoDB Row Operations', - 'mysql_innodb_semaphores' => 'InnoDB semaphores', - 'mysql_innodb_transactions' => 'InnoDB Transactions', + 'mysql_innodb_insert_buffer' => 'InnoDB Insert Buffer', + 'mysql_innodb_io' => 'InnoDB IO', + 'mysql_innodb_io_pending' => 'InnoDB IO Pending', + 'mysql_innodb_log' => 'InnoDB Log', + 'mysql_innodb_row_operations' => 'InnoDB Row Operations', + 'mysql_innodb_semaphores' => 'InnoDB semaphores', + 'mysql_innodb_transactions' => 'InnoDB Transactions', ]; foreach ($graphs[$vars['app_section']] as $key => $text) { diff --git a/includes/html/pages/device/apps/nfs-server.inc.php b/includes/html/pages/device/apps/nfs-server.inc.php index 3d9681574b..2143d7035a 100755 --- a/includes/html/pages/device/apps/nfs-server.inc.php +++ b/includes/html/pages/device/apps/nfs-server.inc.php @@ -18,10 +18,10 @@ print_optionbar_start(); echo "" . $app->displayName() . ' » '; $app_sections = [ - 'default' => 'NFS', - 'proc2' => 'NFS v2', - 'proc3' => 'NFS v3', - 'proc4' => 'NFS v4', + 'default' => 'NFS', + 'proc2' => 'NFS v2', + 'proc3' => 'NFS v3', + 'proc4' => 'NFS v4', ]; unset($sep); diff --git a/includes/html/pages/device/apps/nginx.inc.php b/includes/html/pages/device/apps/nginx.inc.php index 13e17d0361..d02912e89d 100644 --- a/includes/html/pages/device/apps/nginx.inc.php +++ b/includes/html/pages/device/apps/nginx.inc.php @@ -2,7 +2,7 @@ $graphs = [ 'nginx_connections' => 'nginx Connections', - 'nginx_req' => 'nginx requests', + 'nginx_req' => 'nginx requests', ]; foreach ($graphs as $key => $text) { diff --git a/includes/html/pages/device/apps/ntp-client.inc.php b/includes/html/pages/device/apps/ntp-client.inc.php index 7c48391579..81c05d5f78 100644 --- a/includes/html/pages/device/apps/ntp-client.inc.php +++ b/includes/html/pages/device/apps/ntp-client.inc.php @@ -2,7 +2,7 @@ $graphs = [ 'ntp-client_stats' => 'NTP Client - Statistics', - 'ntp-client_freq' => 'NTP Client - Frequency', + 'ntp-client_freq' => 'NTP Client - Frequency', ]; foreach ($graphs as $key => $text) { diff --git a/includes/html/pages/device/apps/ntp-server.inc.php b/includes/html/pages/device/apps/ntp-server.inc.php index bea87e0cae..7859627cff 100644 --- a/includes/html/pages/device/apps/ntp-server.inc.php +++ b/includes/html/pages/device/apps/ntp-server.inc.php @@ -1,13 +1,13 @@ 'NTPD Server - Statistics', - 'ntp-server_freq' => 'NTPD Server - Frequency', + 'ntp-server_stats' => 'NTPD Server - Statistics', + 'ntp-server_freq' => 'NTPD Server - Frequency', 'ntp-server_stratum' => 'NTPD Server - Stratum', - 'ntp-server_buffer' => 'NTPD Server - Buffer', - 'ntp-server_bits' => 'NTPD Server - Packets Sent/Received', + 'ntp-server_buffer' => 'NTPD Server - Buffer', + 'ntp-server_bits' => 'NTPD Server - Packets Sent/Received', 'ntp-server_packets' => 'NTPD Server - Packets Dropped/Ignored', - 'ntp-server_uptime' => 'NTPD Server - Uptime', + 'ntp-server_uptime' => 'NTPD Server - Uptime', ]; foreach ($graphs as $key => $text) { diff --git a/includes/html/pages/device/apps/opensearch.inc.php b/includes/html/pages/device/apps/opensearch.inc.php index 080f368a0a..f2288f80a8 100644 --- a/includes/html/pages/device/apps/opensearch.inc.php +++ b/includes/html/pages/device/apps/opensearch.inc.php @@ -1,10 +1,10 @@ 'device', + 'page' => 'device', 'device' => $device['device_id'], - 'tab' => 'apps', - 'app' => 'opensearch', + 'tab' => 'apps', + 'app' => 'opensearch', ]; print_optionbar_start(); @@ -51,20 +51,20 @@ if (isset($vars['set'])) { if ($graph_set == 'cluster') { $graphs = [ - 'opensearch_c_nodes'=>'Nodes', - 'opensearch_c_data_nodes'=>'Data Nodes', - 'opensearch_c_all_shards'=>'Combined Shard Stats', - 'opensearch_c_pending_tasks'=>'Pending Tasks', - 'opensearch_c_in_fl_fetch'=>'In Flight Fetches', - 'opensearch_status'=>'Status: 0=Green, 1=Yellow, 2=Red, 3=Unknown', - 'opensearch_c_task_max_in_time'=>'Tasks Max Time In Milliseconds', - 'opensearch_c_act_shards_perc'=>'Active Shards Percentage', - 'opensearch_c_act_pri_shards'=>'Active Primary Shards', - 'opensearch_c_act_shards'=>'Active Shards', - 'opensearch_c_rel_shards'=>'Relocating Shards', - 'opensearch_c_init_shards'=>'Initializing Shards', - 'opensearch_c_delayed_shards'=>'Delayed Shards', - 'opensearch_c_unass_shards'=>'Unassigned Shards', + 'opensearch_c_nodes' => 'Nodes', + 'opensearch_c_data_nodes' => 'Data Nodes', + 'opensearch_c_all_shards' => 'Combined Shard Stats', + 'opensearch_c_pending_tasks' => 'Pending Tasks', + 'opensearch_c_in_fl_fetch' => 'In Flight Fetches', + 'opensearch_status' => 'Status: 0=Green, 1=Yellow, 2=Red, 3=Unknown', + 'opensearch_c_task_max_in_time' => 'Tasks Max Time In Milliseconds', + 'opensearch_c_act_shards_perc' => 'Active Shards Percentage', + 'opensearch_c_act_pri_shards' => 'Active Primary Shards', + 'opensearch_c_act_shards' => 'Active Shards', + 'opensearch_c_rel_shards' => 'Relocating Shards', + 'opensearch_c_init_shards' => 'Initializing Shards', + 'opensearch_c_delayed_shards' => 'Delayed Shards', + 'opensearch_c_unass_shards' => 'Unassigned Shards', ]; } elseif ($graph_set == 'translog') { $graphs = [ @@ -175,7 +175,7 @@ if ($graph_set == 'cluster') { ]; } elseif ($graph_set == 'time') { $graphs = [ - 'opensearch_c_task_max_in_time'=>'Tasks Max Time', + 'opensearch_c_task_max_in_time' => 'Tasks Max Time', 'opensearch_time_all' => 'Combined', 'opensearch_ti_time' => 'Index Time', 'opensearch_ti_del_time' => 'Delete Time', @@ -213,20 +213,20 @@ if ($graph_set == 'cluster') { ]; } else { $graphs = [ - 'opensearch_c_nodes'=>'Nodes', - 'opensearch_c_data_nodes'=>'Data Nodes', - 'opensearch_c_all_shards'=>'Combined Shard Stats', - 'opensearch_c_pending_tasks'=>'Pending Tasks', - 'opensearch_c_in_fl_fetch'=>'In Flight Fetches', - 'opensearch_status'=>'Status: 0=Green, 1=Yellow, 2=Red, 3=Unknown', - 'opensearch_c_task_max_in_time'=>'Tasks Max Time In Milliseconds', - 'opensearch_c_act_shards_perc'=>'Active Shards Percentage', - 'opensearch_c_act_pri_shards'=>'Active Primary Shards', - 'opensearch_c_act_shards'=>'Active Shards', - 'opensearch_c_rel_shards'=>'Relocating Shards', - 'opensearch_c_init_shards'=>'Initializing Shards', - 'opensearch_c_delayed_shards'=>'Delayed Shards', - 'opensearch_c_unass_shards'=>'Unassigned Shards', + 'opensearch_c_nodes' => 'Nodes', + 'opensearch_c_data_nodes' => 'Data Nodes', + 'opensearch_c_all_shards' => 'Combined Shard Stats', + 'opensearch_c_pending_tasks' => 'Pending Tasks', + 'opensearch_c_in_fl_fetch' => 'In Flight Fetches', + 'opensearch_status' => 'Status: 0=Green, 1=Yellow, 2=Red, 3=Unknown', + 'opensearch_c_task_max_in_time' => 'Tasks Max Time In Milliseconds', + 'opensearch_c_act_shards_perc' => 'Active Shards Percentage', + 'opensearch_c_act_pri_shards' => 'Active Primary Shards', + 'opensearch_c_act_shards' => 'Active Shards', + 'opensearch_c_rel_shards' => 'Relocating Shards', + 'opensearch_c_init_shards' => 'Initializing Shards', + 'opensearch_c_delayed_shards' => 'Delayed Shards', + 'opensearch_c_unass_shards' => 'Unassigned Shards', ]; } diff --git a/includes/html/pages/device/apps/opensips.inc.php b/includes/html/pages/device/apps/opensips.inc.php index 4b0d696dcb..6042d99ce3 100644 --- a/includes/html/pages/device/apps/opensips.inc.php +++ b/includes/html/pages/device/apps/opensips.inc.php @@ -1,8 +1,8 @@ 'Load Average', - 'opensips_memory' => 'Memory', + 'opensips_load' => 'Load Average', + 'opensips_memory' => 'Memory', 'opensips_openfiles' => 'Open files', ]; diff --git a/includes/html/pages/device/apps/portactivity.inc.php b/includes/html/pages/device/apps/portactivity.inc.php index 82bdeec45b..7494b35962 100644 --- a/includes/html/pages/device/apps/portactivity.inc.php +++ b/includes/html/pages/device/apps/portactivity.inc.php @@ -1,10 +1,10 @@ 'device', + 'page' => 'device', 'device' => $device['device_id'], - 'tab' => 'apps', - 'app' => 'portactivity', + 'tab' => 'apps', + 'app' => 'portactivity', ]; print_optionbar_start(); @@ -34,10 +34,10 @@ if (! isset($vars['port'])) { ]; } else { $graphs = [ - 'portactivity_totals'=>'Total Connections', - 'portactivity_total_details'=>'Total Connections Details', - 'portactivity_to'=>'Connections To Server', - 'portactivity_from'=>'Connections From Server', + 'portactivity_totals' => 'Total Connections', + 'portactivity_total_details' => 'Total Connections Details', + 'portactivity_to' => 'Connections To Server', + 'portactivity_from' => 'Connections From Server', ]; } diff --git a/includes/html/pages/device/apps/postgres.inc.php b/includes/html/pages/device/apps/postgres.inc.php index d40f55d3e2..01d2c92503 100644 --- a/includes/html/pages/device/apps/postgres.inc.php +++ b/includes/html/pages/device/apps/postgres.inc.php @@ -1,10 +1,10 @@ 'device', + 'page' => 'device', 'device' => $device['device_id'], - 'tab' => 'apps', - 'app' => 'postgres', + 'tab' => 'apps', + 'app' => 'postgres', ]; print_optionbar_start(); diff --git a/includes/html/pages/device/apps/powerdns.inc.php b/includes/html/pages/device/apps/powerdns.inc.php index 4929ac45a6..557f46d005 100644 --- a/includes/html/pages/device/apps/powerdns.inc.php +++ b/includes/html/pages/device/apps/powerdns.inc.php @@ -1,12 +1,12 @@ 'PowerDNS - Latency', - 'powerdns_fail' => 'PowerDNS - Corrupt / Failed / Timed out', + 'powerdns_latency' => 'PowerDNS - Latency', + 'powerdns_fail' => 'PowerDNS - Corrupt / Failed / Timed out', 'powerdns_packetcache' => 'PowerDNS - Packet Cache', - 'powerdns_querycache' => 'PowerDNS - Query Cache', - 'powerdns_recursing' => 'PowerDNS - Recursing Queries and Answers', - 'powerdns_queries' => 'PowerDNS - Total UDP/TCP Queries and Answers', + 'powerdns_querycache' => 'PowerDNS - Query Cache', + 'powerdns_recursing' => 'PowerDNS - Recursing Queries and Answers', + 'powerdns_queries' => 'PowerDNS - Total UDP/TCP Queries and Answers', 'powerdns_queries_udp' => 'PowerDNS - Detail UDP IPv4/IPv6 Queries and Answers', ]; diff --git a/includes/html/pages/device/apps/powermon.inc.php b/includes/html/pages/device/apps/powermon.inc.php index 6edae2b56b..148c795a56 100644 --- a/includes/html/pages/device/apps/powermon.inc.php +++ b/includes/html/pages/device/apps/powermon.inc.php @@ -17,7 +17,7 @@ version 3. See https://www.gnu.org/licenses/gpl-3.0.txt */ $graphs = [ - 'powermon_consumption' => 'PowerMon - Consumption', + 'powermon_consumption' => 'PowerMon - Consumption', ]; foreach ($graphs as $key => $text) { diff --git a/includes/html/pages/device/apps/privoxy.inc.php b/includes/html/pages/device/apps/privoxy.inc.php index a87f9e5747..3f25d522a4 100644 --- a/includes/html/pages/device/apps/privoxy.inc.php +++ b/includes/html/pages/device/apps/privoxy.inc.php @@ -14,43 +14,43 @@ if (! isset($vars['privoxyPage'])) { print_optionbar_start(); -$link_tmp = generate_link('General', $link_array, ['app'=>'privoxy', 'privoxyPage'=>'general']); +$link_tmp = generate_link('General', $link_array, ['app' => 'privoxy', 'privoxyPage' => 'general']); if ($vars['privoxyPage'] == 'general') { $link_tmp = '' . $link_tmp . ''; } echo $link_tmp . ' | '; -$link_tmp = generate_link('Blocks', $link_array, ['app'=>'privoxy', 'privoxyPage'=>'blocks']); +$link_tmp = generate_link('Blocks', $link_array, ['app' => 'privoxy', 'privoxyPage' => 'blocks']); if ($vars['privoxyPage'] == 'blocks') { $link_tmp = '' . $link_tmp . ''; } echo $link_tmp . ' | '; -$link_tmp = generate_link('Connections', $link_array, ['app'=>'privoxy', 'privoxyPage'=>'conn']); +$link_tmp = generate_link('Connections', $link_array, ['app' => 'privoxy', 'privoxyPage' => 'conn']); if ($vars['privoxyPage'] == 'conn') { $link_tmp = '' . $link_tmp . ''; } echo $link_tmp . ' | '; -$link_tmp = generate_link('Domains', $link_array, ['app'=>'privoxy', 'privoxyPage'=>'domains']); +$link_tmp = generate_link('Domains', $link_array, ['app' => 'privoxy', 'privoxyPage' => 'domains']); if ($vars['privoxyPage'] == 'domains') { $link_tmp = '' . $link_tmp . ''; } echo $link_tmp . ' | '; -$link_tmp = generate_link('HTTP Req Type', $link_array, ['app'=>'privoxy', 'privoxyPage'=>'http_type']); +$link_tmp = generate_link('HTTP Req Type', $link_array, ['app' => 'privoxy', 'privoxyPage' => 'http_type']); if ($vars['privoxyPage'] == 'http_type') { $link_tmp = '' . $link_tmp . ''; } echo $link_tmp . ' | '; -$link_tmp = generate_link('HTTP Response Codes', $link_array, ['app'=>'privoxy', 'privoxyPage'=>'http_resp']); +$link_tmp = generate_link('HTTP Response Codes', $link_array, ['app' => 'privoxy', 'privoxyPage' => 'http_resp']); if ($vars['privoxyPage'] == 'http_resp') { $link_tmp = '' . $link_tmp . ''; } echo $link_tmp . ' | '; -$link_tmp = generate_link('HTTP Version', $link_array, ['app'=>'privoxy', 'privoxyPage'=>'http_ver']); +$link_tmp = generate_link('HTTP Version', $link_array, ['app' => 'privoxy', 'privoxyPage' => 'http_ver']); if ($vars['privoxyPage'] == 'http_ver') { $link_tmp = '' . $link_tmp . ''; } @@ -63,10 +63,10 @@ if ($vars['privoxyPage'] == 'general') { 'privoxy_client_requests' => 'Client Requests', 'privoxy_blocks' => 'Blocked Requests', 'privoxy_block_percent' => 'Blocked Requests, Percent', - 'privoxy_crunches'=>'Crunches', - 'privoxy_unique_domains'=>'Unique Domains', - 'privoxy_unique_bdomains'=>'Unique Domains Blocked', - 'privoxy_ubd_per'=>'Unique Domains Blocked, Percent', + 'privoxy_crunches' => 'Crunches', + 'privoxy_unique_domains' => 'Unique Domains', + 'privoxy_unique_bdomains' => 'Unique Domains Blocked', + 'privoxy_ubd_per' => 'Unique Domains Blocked, Percent', 'privoxy_bytes_to_client' => 'Bytes Sent To Clients', 'privoxy_imp_accounted' => 'Improperly Accounted', ]; @@ -82,7 +82,7 @@ if ($vars['privoxyPage'] == 'general') { $graphs = [ 'privoxy_blocks' => 'Blocked Requests', 'privoxy_block_percent' => 'Blocked Requests, Percent', - 'privoxy_crunches'=>'Crunches', + 'privoxy_crunches' => 'Crunches', 'privoxy_unique_bdomains' => 'Unique Domains, Blocked', 'privoxy_unique_bdomains_np' => 'Unique Domains Without Port, Blocked', ]; diff --git a/includes/html/pages/device/apps/proxmox.inc.php b/includes/html/pages/device/apps/proxmox.inc.php index 91fc6dca73..3336d8d74e 100644 --- a/includes/html/pages/device/apps/proxmox.inc.php +++ b/includes/html/pages/device/apps/proxmox.inc.php @@ -22,7 +22,7 @@ if (! \LibreNMS\Config::get('enable_proxmox')) { print_error('Proxmox agent was discovered on this host. Please enable Proxmox in your config.'); } else { $graphs = [ - 'proxmox_traffic' => 'Traffic', + 'proxmox_traffic' => 'Traffic', ]; foreach (proxmox_node_vms(var_get('device')) as $nvm) { diff --git a/includes/html/pages/device/apps/pureftpd.inc.php b/includes/html/pages/device/apps/pureftpd.inc.php index a65af086a9..782f318966 100644 --- a/includes/html/pages/device/apps/pureftpd.inc.php +++ b/includes/html/pages/device/apps/pureftpd.inc.php @@ -1,9 +1,9 @@ 'PureFTPd - Bitrate', + 'pureftpd_bitrate' => 'PureFTPd - Bitrate', 'pureftpd_connections' => 'PureFTPd - Connections', - 'pureftpd_users' => 'PureFTPd - Users Connected', + 'pureftpd_users' => 'PureFTPd - Users Connected', ]; foreach ($graphs as $key => $text) { diff --git a/includes/html/pages/device/apps/pwrstatd.inc.php b/includes/html/pages/device/apps/pwrstatd.inc.php index e26852d07a..86be829624 100644 --- a/includes/html/pages/device/apps/pwrstatd.inc.php +++ b/includes/html/pages/device/apps/pwrstatd.inc.php @@ -5,10 +5,10 @@ $psu_list = Rrd::getRrdApplicationArrays($device, $app['app_id'], 'pwrstatd'); print_optionbar_start(); $link_array = [ - 'page' => 'device', + 'page' => 'device', 'device' => $device['device_id'], - 'tab' => 'apps', - 'app' => 'pwrstatd', + 'tab' => 'apps', + 'app' => 'pwrstatd', ]; $sn_list = []; @@ -28,10 +28,10 @@ printf('%s | PSUs: %s', generate_link('All PSUs', $link_array), implode(', ', $s print_optionbar_end(); $graphs = [ - 'pwrstatd_minutes' => 'Battery Runtime Remaining', + 'pwrstatd_minutes' => 'Battery Runtime Remaining', 'pwrstatd_percentage' => 'Percentage Readings', - 'pwrstatd_voltage' => 'Voltage Readings', - 'pwrstatd_wattage' => 'Power Readings', + 'pwrstatd_voltage' => 'Voltage Readings', + 'pwrstatd_wattage' => 'Power Readings', ]; foreach ($graphs as $key => $text) { diff --git a/includes/html/pages/device/apps/redis.inc.php b/includes/html/pages/device/apps/redis.inc.php index 780a7f254e..c71e026f13 100644 --- a/includes/html/pages/device/apps/redis.inc.php +++ b/includes/html/pages/device/apps/redis.inc.php @@ -1,17 +1,17 @@ 'Clients', - 'redis_memory' => 'Memory', - 'redis_commands' => 'Commands', - 'redis_connections' => 'Connections', - 'redis_defrag' => 'Defrag', + 'redis_clients' => 'Clients', + 'redis_memory' => 'Memory', + 'redis_commands' => 'Commands', + 'redis_connections' => 'Connections', + 'redis_defrag' => 'Defrag', 'redis_fragmentation' => 'Fragmentation', - 'redis_keyspace' => 'Keyspace', - 'redis_net' => 'Net', - 'redis_objects' => 'Objects', - 'redis_sync' => 'Sync', - 'redis_usage' => 'Usage', + 'redis_keyspace' => 'Keyspace', + 'redis_net' => 'Net', + 'redis_objects' => 'Objects', + 'redis_sync' => 'Sync', + 'redis_usage' => 'Usage', ]; foreach ($graphs as $key => $text) { diff --git a/includes/html/pages/device/apps/rrdcached.inc.php b/includes/html/pages/device/apps/rrdcached.inc.php index 4098b5da2e..a26673a875 100644 --- a/includes/html/pages/device/apps/rrdcached.inc.php +++ b/includes/html/pages/device/apps/rrdcached.inc.php @@ -24,9 +24,9 @@ */ $graphs = [ 'rrdcached_queue_length' => 'Queue Length', - 'rrdcached_events' => 'Events', - 'rrdcached_tree' => 'Tree', - 'rrdcached_journal' => 'Journal', + 'rrdcached_events' => 'Events', + 'rrdcached_tree' => 'Tree', + 'rrdcached_journal' => 'Journal', ]; foreach ($graphs as $key => $text) { diff --git a/includes/html/pages/device/apps/sagan.inc.php b/includes/html/pages/device/apps/sagan.inc.php index a23abae87c..19a72e13fb 100644 --- a/includes/html/pages/device/apps/sagan.inc.php +++ b/includes/html/pages/device/apps/sagan.inc.php @@ -1,10 +1,10 @@ 'device', + 'page' => 'device', 'device' => $device['device_id'], - 'tab' => 'apps', - 'app' => 'sagan', + 'tab' => 'apps', + 'app' => 'sagan', ]; print_optionbar_start(); @@ -28,21 +28,21 @@ foreach ($sagan_instances as $index => $sinstance) { print_optionbar_end(); $graphs = [ - 'sagan_bytes'=>'Bytes', - 'sagan_eps'=>'Events Per Second', - 'sagan_total'=>'Recieved Log Entries', - 'sagan_drop'=>'Drop', - 'sagan_drop_percent'=>'Drop Percent', - 'sagan_f_total'=>'Flows Total', - 'sagan_f_dropped'=>'Flows Dropped', - 'sagan_f_drop_percent'=>'Flows Dropped Percent', - 'sagan_ignore'=>'Ignore', - 'sagan_bytes_ignored'=>'Bytes Ignored', - 'sagan_match'=>'Match', - 'sagan_max_bytes_log_line'=>'Max Bytes Log Line', - 'sagan_threshold'=>'Threshold', - 'sagan_uptime'=>'Uptime', - 'sagan_alert'=>'Alert: 0=OK, 1=WARNING, 2=CRITICAL, 3+UNKNOWN', + 'sagan_bytes' => 'Bytes', + 'sagan_eps' => 'Events Per Second', + 'sagan_total' => 'Recieved Log Entries', + 'sagan_drop' => 'Drop', + 'sagan_drop_percent' => 'Drop Percent', + 'sagan_f_total' => 'Flows Total', + 'sagan_f_dropped' => 'Flows Dropped', + 'sagan_f_drop_percent' => 'Flows Dropped Percent', + 'sagan_ignore' => 'Ignore', + 'sagan_bytes_ignored' => 'Bytes Ignored', + 'sagan_match' => 'Match', + 'sagan_max_bytes_log_line' => 'Max Bytes Log Line', + 'sagan_threshold' => 'Threshold', + 'sagan_uptime' => 'Uptime', + 'sagan_alert' => 'Alert: 0=OK, 1=WARNING, 2=CRITICAL, 3+UNKNOWN', ]; foreach ($graphs as $key => $text) { diff --git a/includes/html/pages/device/apps/seafile.inc.php b/includes/html/pages/device/apps/seafile.inc.php index 1ab3c9182a..dd39026ee0 100644 --- a/includes/html/pages/device/apps/seafile.inc.php +++ b/includes/html/pages/device/apps/seafile.inc.php @@ -1,14 +1,14 @@ 'Connected Devices', - 'seafile_enabled' => 'activated Accounts', - 'seafile_libraries' => 'Libraries', + 'seafile_connected' => 'Connected Devices', + 'seafile_enabled' => 'activated Accounts', + 'seafile_libraries' => 'Libraries', 'seafile_trashed_libraries' => 'Trashed Libraries', - 'seafile_size_consumption' => 'Size Consumption', - 'seafile_groups' => 'Groups', - 'seafile_version' => 'Client Version', - 'seafile_platform' => 'Client Platform', + 'seafile_size_consumption' => 'Size Consumption', + 'seafile_groups' => 'Groups', + 'seafile_version' => 'Client Version', + 'seafile_platform' => 'Client Platform', ]; foreach ($graphs as $key => $text) { diff --git a/includes/html/pages/device/apps/shoutcast.inc.php b/includes/html/pages/device/apps/shoutcast.inc.php index 004ec090c0..191d29d8e0 100644 --- a/includes/html/pages/device/apps/shoutcast.inc.php +++ b/includes/html/pages/device/apps/shoutcast.inc.php @@ -4,7 +4,7 @@ $total = true; if (isset($total) && $total === true) { $graphs = [ - 'shoutcast_multi_bits' => 'Traffic Statistics - Total of all Shoutcast servers', + 'shoutcast_multi_bits' => 'Traffic Statistics - Total of all Shoutcast servers', 'shoutcast_multi_stats' => 'Shoutcast Statistics - Total of all Shoutcast servers', ]; @@ -35,7 +35,7 @@ foreach ($files as $file) { $hostname = end($pieces); [$host, $port] = explode('_', $hostname, 2); $graphs = [ - 'shoutcast_bits' => 'Traffic Statistics - ' . $host . ' (Port: ' . $port . ')', + 'shoutcast_bits' => 'Traffic Statistics - ' . $host . ' (Port: ' . $port . ')', 'shoutcast_stats' => 'Shoutcast Statistics - ' . $host . ' (Port: ' . $port . ')', ]; diff --git a/includes/html/pages/device/apps/smart.inc.php b/includes/html/pages/device/apps/smart.inc.php index 0e428f2726..9f3bc98eca 100644 --- a/includes/html/pages/device/apps/smart.inc.php +++ b/includes/html/pages/device/apps/smart.inc.php @@ -3,10 +3,10 @@ print_optionbar_start(); $link_array = [ - 'page' => 'device', + 'page' => 'device', 'device' => $device['device_id'], - 'tab' => 'apps', - 'app' => 'smart', + 'tab' => 'apps', + 'app' => 'smart', ]; $drives = []; @@ -28,7 +28,7 @@ foreach ($app_data['disks'] as $label => $disk_data) { } } - array_push($drives, generate_link($label, $link_array, ['disk'=>$disk]) . $health_status); + array_push($drives, generate_link($label, $link_array, ['disk' => $disk]) . $health_status); } printf('%s | drives: %s', generate_link('All Drives', $link_array), implode(', ', $drives)); @@ -71,13 +71,13 @@ if (isset($vars['disk'])) { } print_optionbar_end(); $graphs = [ - 'smart_big5' => 'Reliability / Age', - 'smart_temp' => 'Temperature', - 'smart_ssd' => 'SSD-specific', - 'smart_other' => 'Other', - 'smart_tests_status'=> 'S.M.A.R.T self-tests results', - 'smart_tests_ran' => 'S.M.A.R.T self-tests run count', - 'smart_runtime' => 'Power On Hours', + 'smart_big5' => 'Reliability / Age', + 'smart_temp' => 'Temperature', + 'smart_ssd' => 'SSD-specific', + 'smart_other' => 'Other', + 'smart_tests_status' => 'S.M.A.R.T self-tests results', + 'smart_tests_ran' => 'S.M.A.R.T self-tests run count', + 'smart_runtime' => 'Power On Hours', ]; if ($app_data['disks'][$vars['disk']]['is_ssd'] != 1) { unset($graphs['smart_ssd']); diff --git a/includes/html/pages/device/apps/sneck.inc.php b/includes/html/pages/device/apps/sneck.inc.php index e537d5871f..95e2a91172 100644 --- a/includes/html/pages/device/apps/sneck.inc.php +++ b/includes/html/pages/device/apps/sneck.inc.php @@ -1,22 +1,22 @@ 'device', + 'page' => 'device', 'device' => $device['device_id'], - 'tab' => 'apps', - 'app' => 'sneck', + 'tab' => 'apps', + 'app' => 'sneck', ]; $link_array = [ - 'page' => 'device', + 'page' => 'device', 'device' => $device['device_id'], - 'tab' => 'apps', - 'app' => 'sneck', + 'tab' => 'apps', + 'app' => 'sneck', ]; $graphs = [ - 'sneck_results'=>'Results', - 'sneck_time'=>'Time Difference', + 'sneck_results' => 'Results', + 'sneck_time' => 'Time Difference', ]; foreach ($graphs as $key => $text) { diff --git a/includes/html/pages/device/apps/suricata.inc.php b/includes/html/pages/device/apps/suricata.inc.php index ab00589926..3f817613f1 100644 --- a/includes/html/pages/device/apps/suricata.inc.php +++ b/includes/html/pages/device/apps/suricata.inc.php @@ -1,10 +1,10 @@ 'device', + 'page' => 'device', 'device' => $device['device_id'], - 'tab' => 'apps', - 'app' => 'suricata', + 'tab' => 'apps', + 'app' => 'suricata', ]; print_optionbar_start(); @@ -28,17 +28,17 @@ foreach ($suricata_instances as $index => $sinstance) { print_optionbar_end(); $graphs = [ - 'suricata_packets'=>'Packets', - 'suricata_bytes'=>'Bytes', - 'suricata_nasty_delta'=>'Drops or Errors Delta', - 'suricata_nasty_percent'=>'Drops or Errors Percent', - 'suricata_dec_proto'=>'Decoder Protocols', - 'suricata_flow_proto'=>'Flow Protocols', - 'suricata_app_flows'=>'App Layer Flows', - 'suricata_app_tx'=>'App Layer TX', - 'suricata_mem_use'=>'Memory Usage', - 'suricata_uptime'=>'Uptime', - 'suricata_alert'=>'Alert Status', + 'suricata_packets' => 'Packets', + 'suricata_bytes' => 'Bytes', + 'suricata_nasty_delta' => 'Drops or Errors Delta', + 'suricata_nasty_percent' => 'Drops or Errors Percent', + 'suricata_dec_proto' => 'Decoder Protocols', + 'suricata_flow_proto' => 'Flow Protocols', + 'suricata_app_flows' => 'App Layer Flows', + 'suricata_app_tx' => 'App Layer TX', + 'suricata_mem_use' => 'Memory Usage', + 'suricata_uptime' => 'Uptime', + 'suricata_alert' => 'Alert Status', ]; foreach ($graphs as $key => $text) { diff --git a/includes/html/pages/device/apps/suricata_extract.inc.php b/includes/html/pages/device/apps/suricata_extract.inc.php index 7f898a0bea..2deaf645ad 100644 --- a/includes/html/pages/device/apps/suricata_extract.inc.php +++ b/includes/html/pages/device/apps/suricata_extract.inc.php @@ -2,20 +2,20 @@ $graphs = [ 'suricata_extract_sub' => 'Submission', - 'suricata_extract_ignored_host' => 'Ignored By Host', - 'suricata_extract_ignored_ip' => 'Ignored By IP', - 'suricata_extract_ignored_ip_src' => 'Ignored By IP Source', - 'suricata_extract_ignored_ip_dest' => 'Ignored By IP Destination', - 'suricata_extract_sub_fail' => 'Submission Failure', - 'suricata_extract_errors' => 'Errors', - 'suricata_extract_truncated' => 'File Truncated', - 'suricata_extract_zero_sized' => 'File Zero Sized', - 'suricata_extract_sub_size' => 'Total Size Of Submissions', - 'suricata_extract_sub_codes' => 'HTTP Submission Result Codes', - 'suricata_extract_sub_2xx' => 'HTTP Submission Result Code, 2xx', - 'suricata_extract_sub_3xx' => 'HTTP Submission Result Code, 3xx', - 'suricata_extract_sub_4xx' => 'HTTP Submission Result Code, 4xx', - 'suricata_extract_sub_5xx' => 'HTTP Submission Result Code, 5xx', + 'suricata_extract_ignored_host' => 'Ignored By Host', + 'suricata_extract_ignored_ip' => 'Ignored By IP', + 'suricata_extract_ignored_ip_src' => 'Ignored By IP Source', + 'suricata_extract_ignored_ip_dest' => 'Ignored By IP Destination', + 'suricata_extract_sub_fail' => 'Submission Failure', + 'suricata_extract_errors' => 'Errors', + 'suricata_extract_truncated' => 'File Truncated', + 'suricata_extract_zero_sized' => 'File Zero Sized', + 'suricata_extract_sub_size' => 'Total Size Of Submissions', + 'suricata_extract_sub_codes' => 'HTTP Submission Result Codes', + 'suricata_extract_sub_2xx' => 'HTTP Submission Result Code, 2xx', + 'suricata_extract_sub_3xx' => 'HTTP Submission Result Code, 3xx', + 'suricata_extract_sub_4xx' => 'HTTP Submission Result Code, 4xx', + 'suricata_extract_sub_5xx' => 'HTTP Submission Result Code, 5xx', ]; foreach ($graphs as $key => $text) { diff --git a/includes/html/pages/device/apps/tinydns.inc.php b/includes/html/pages/device/apps/tinydns.inc.php index d4e0b30665..1a61b0f9ba 100644 --- a/includes/html/pages/device/apps/tinydns.inc.php +++ b/includes/html/pages/device/apps/tinydns.inc.php @@ -26,9 +26,9 @@ $graphs = [ 'tinydns_queries' => 'Queries', - 'tinydns_errors' => 'Errors', - 'tinydns_dnssec' => 'DNSSec', - 'tinydns_other' => 'Other', + 'tinydns_errors' => 'Errors', + 'tinydns_dnssec' => 'DNSSec', + 'tinydns_other' => 'Other', ]; foreach ($graphs as $key => $text) { diff --git a/includes/html/pages/device/apps/unbound.inc.php b/includes/html/pages/device/apps/unbound.inc.php index c53457bcbc..19b3b63821 100644 --- a/includes/html/pages/device/apps/unbound.inc.php +++ b/includes/html/pages/device/apps/unbound.inc.php @@ -2,10 +2,10 @@ $graphs = [ 'unbound_queries' => 'Unbound - Queries', - 'unbound_cache' => 'Unbound - Cache', - 'unbound_operations' => 'Unbound - Operations', - 'unbound_requestlist' => 'Unbound - Request list', - 'unbound_recursiontime' => 'Unbound - Recursion time', + 'unbound_cache' => 'Unbound - Cache', + 'unbound_operations' => 'Unbound - Operations', + 'unbound_requestlist' => 'Unbound - Request list', + 'unbound_recursiontime' => 'Unbound - Recursion time', ]; foreach ($graphs as $key => $text) { $graph_type = $key; diff --git a/includes/html/pages/device/apps/voip-monitor.inc.php b/includes/html/pages/device/apps/voip-monitor.inc.php index a113bd793f..fbbb8f8335 100644 --- a/includes/html/pages/device/apps/voip-monitor.inc.php +++ b/includes/html/pages/device/apps/voip-monitor.inc.php @@ -1,9 +1,9 @@ 'CPU Load', - 'voip-monitor_memoryusage' => 'Used Memory', - 'voip-monitor_openfiles' => 'Open files', + 'voip-monitor_cpuload' => 'CPU Load', + 'voip-monitor_memoryusage' => 'Used Memory', + 'voip-monitor_openfiles' => 'Open files', ]; foreach ($graphs as $key => $text) { diff --git a/includes/html/pages/device/apps/zfs.inc.php b/includes/html/pages/device/apps/zfs.inc.php index c4e5ba8d89..7e931ebe79 100644 --- a/includes/html/pages/device/apps/zfs.inc.php +++ b/includes/html/pages/device/apps/zfs.inc.php @@ -1,16 +1,16 @@ 'device', + 'page' => 'device', 'device' => $device['device_id'], - 'tab' => 'apps', - 'app' => 'zfs', + 'tab' => 'apps', + 'app' => 'zfs', ]; print_optionbar_start(); echo generate_link('ARC', $link_array); -echo ' | ' . generate_link('L2', $link_array, ['zfs_page'=>'l2']); +echo ' | ' . generate_link('L2', $link_array, ['zfs_page' => 'l2']); echo ' | Pools: '; $pools = $app->data['pools'] ?? []; @@ -31,9 +31,9 @@ print_optionbar_end(); if (isset($vars['pool'])) { $graphs = [ - 'zfs_pool_space'=>'Pool Space', - 'zfs_pool_cap'=>'Pool Capacity', - 'zfs_pool_frag'=>'Pool Fragmentation', + 'zfs_pool_space' => 'Pool Space', + 'zfs_pool_cap' => 'Pool Capacity', + 'zfs_pool_frag' => 'Pool Fragmentation', ]; } elseif (isset($vars['zfs_page']) && $vars['zfs_page'] == 'l2') { $graphs = [ diff --git a/includes/html/pages/device/collectd.inc.php b/includes/html/pages/device/collectd.inc.php index 28583ab95b..febb99b563 100644 --- a/includes/html/pages/device/collectd.inc.php +++ b/includes/html/pages/device/collectd.inc.php @@ -48,9 +48,9 @@ function dhtml_response_list(&$items, $method) print_optionbar_start(); $link_array = [ - 'page' => 'device', + 'page' => 'device', 'device' => $device['device_id'], - 'tab' => 'collectd', + 'tab' => 'collectd', ]; $plugins = collectd_list_plugins($device['hostname']); diff --git a/includes/html/pages/device/edit.inc.php b/includes/html/pages/device/edit.inc.php index 164d65c493..17d36a59a9 100644 --- a/includes/html/pages/device/edit.inc.php +++ b/includes/html/pages/device/edit.inc.php @@ -2,8 +2,8 @@ $no_refresh = true; -$link_array = ['page' => 'device', - 'device' => $device['device_id'], +$link_array = ['page' => 'device', + 'device' => $device['device_id'], 'tab' => 'edit', ]; if (! Auth::user()->hasGlobalAdmin()) { @@ -69,7 +69,7 @@ if (! Auth::user()->hasGlobalAdmin()) { } else { } - echo generate_link($text, $link_array, ['section'=>$type]); + echo generate_link($text, $link_array, ['section' => $type]); if ($vars['section'] == $type) { echo ''; diff --git a/includes/html/pages/device/graphs.inc.php b/includes/html/pages/device/graphs.inc.php index afc15f1d49..789def962b 100644 --- a/includes/html/pages/device/graphs.inc.php +++ b/includes/html/pages/device/graphs.inc.php @@ -2,9 +2,9 @@ // Graphs are printed in the order they exist in \LibreNMS\Config::get('graph_types') $link_array = [ - 'page' => 'device', + 'page' => 'device', 'device' => $device['device_id'], - 'tab' => 'graphs', + 'tab' => 'graphs', ]; $bg = '#ffffff'; diff --git a/includes/html/pages/device/health.inc.php b/includes/html/pages/device/health.inc.php index 219d0989e4..068eab7c69 100644 --- a/includes/html/pages/device/health.inc.php +++ b/includes/html/pages/device/health.inc.php @@ -36,7 +36,7 @@ use App\Models\Storage; $qfp = 0; if ($device['os_group'] == 'cisco') { $component = new LibreNMS\Component(); - $components = $component->getComponents($device['device_id'], ['type'=> 'cisco-qfp']); + $components = $component->getComponents($device['device_id'], ['type' => 'cisco-qfp']); $components = $components[$device['device_id']]; $qfp = isset($components) ? count($components) : 0; } @@ -87,9 +87,9 @@ $type_text['storage'] = 'Disk Usage'; $type_text['diskio'] = 'Disk I/O'; $link_array = [ - 'page' => 'device', + 'page' => 'device', 'device' => $device['device_id'], - 'tab' => 'health', + 'tab' => 'health', ]; print_optionbar_start(); diff --git a/includes/html/pages/device/loadbalancer.inc.php b/includes/html/pages/device/loadbalancer.inc.php index 8f8134e3c4..1e9ef41414 100644 --- a/includes/html/pages/device/loadbalancer.inc.php +++ b/includes/html/pages/device/loadbalancer.inc.php @@ -1,9 +1,9 @@ 'device', + 'page' => 'device', 'device' => $device['device_id'], - 'tab' => 'loadbalancer', + 'tab' => 'loadbalancer', ]; $type_text['loadbalancer_rservers'] = 'Rservers'; // Cisco ACE diff --git a/includes/html/pages/device/loadbalancer/ace_rservers.inc.php b/includes/html/pages/device/loadbalancer/ace_rservers.inc.php index 45617ddff1..afa16fc782 100644 --- a/includes/html/pages/device/loadbalancer/ace_rservers.inc.php +++ b/includes/html/pages/device/loadbalancer/ace_rservers.inc.php @@ -33,9 +33,9 @@ echo ' Graphs: '; // "pkts" => "Packets", // "errors" => "Errors"); $graph_types = [ - 'curr' => 'CurrentConns', + 'curr' => 'CurrentConns', 'failed' => 'FailedConns', - 'total' => 'TotalConns', + 'total' => 'TotalConns', ]; foreach ($graph_types as $type => $descr) { diff --git a/includes/html/pages/device/loadbalancer/ace_vservers.inc.php b/includes/html/pages/device/loadbalancer/ace_vservers.inc.php index 4125a67aea..93b19a4b45 100644 --- a/includes/html/pages/device/loadbalancer/ace_vservers.inc.php +++ b/includes/html/pages/device/loadbalancer/ace_vservers.inc.php @@ -30,8 +30,8 @@ unset($sep); echo ' Graphs: '; $graph_types = [ - 'bits' => 'Bits', - 'pkts' => 'Packets', + 'bits' => 'Bits', + 'pkts' => 'Packets', 'conns' => 'Connections', ]; diff --git a/includes/html/pages/device/loadbalancer/netscaler_vsvr.inc.php b/includes/html/pages/device/loadbalancer/netscaler_vsvr.inc.php index 2039e9c223..46606578cd 100644 --- a/includes/html/pages/device/loadbalancer/netscaler_vsvr.inc.php +++ b/includes/html/pages/device/loadbalancer/netscaler_vsvr.inc.php @@ -6,10 +6,10 @@ if (is_numeric($vars['vsvr'])) { // echo('All'); // print_optionbar_end(); $graph_types = [ - 'bits' => 'Bits', - 'pkts' => 'Packets', - 'conns' => 'Connections', - 'reqs' => 'Requests', + 'bits' => 'Bits', + 'pkts' => 'Packets', + 'conns' => 'Connections', + 'reqs' => 'Requests', 'hitmiss' => 'Hit/Miss', ]; @@ -96,10 +96,10 @@ if (is_numeric($vars['vsvr'])) { unset($sep); echo ' Graphs: '; $graph_types = [ - 'bits' => 'Bits', - 'pkts' => 'Packets', - 'conns' => 'Connections', - 'reqs' => 'Requests', + 'bits' => 'Bits', + 'pkts' => 'Packets', + 'conns' => 'Connections', + 'reqs' => 'Requests', 'hitmiss' => 'Hit/Miss', ]; diff --git a/includes/html/pages/device/munin.inc.php b/includes/html/pages/device/munin.inc.php index 7113b18cd6..512697996e 100644 --- a/includes/html/pages/device/munin.inc.php +++ b/includes/html/pages/device/munin.inc.php @@ -2,9 +2,9 @@ // Graphs are printed in the order they exist in \LibreNMS\Config::get('graph_types') $link_array = [ - 'page' => 'device', + 'page' => 'device', 'device' => $device['device_id'], - 'tab' => 'munin', + 'tab' => 'munin', ]; $bg = '#ffffff'; diff --git a/includes/html/pages/device/nfsen.inc.php b/includes/html/pages/device/nfsen.inc.php index 2a29a6bef1..15151963e5 100644 --- a/includes/html/pages/device/nfsen.inc.php +++ b/includes/html/pages/device/nfsen.inc.php @@ -3,9 +3,9 @@ print_optionbar_start(); $link_array = [ - 'page' => 'device', + 'page' => 'device', 'device' => $device['device_id'], - 'tab' => 'netflow', + 'tab' => 'netflow', ]; echo generate_link('General', $link_array, ['nfsen' => 'general']); diff --git a/includes/html/pages/device/nfsen/channel.inc.php b/includes/html/pages/device/nfsen/channel.inc.php index 9a92312f6e..d50de31ffb 100644 --- a/includes/html/pages/device/nfsen/channel.inc.php +++ b/includes/html/pages/device/nfsen/channel.inc.php @@ -1,7 +1,7 @@ 'nfsen_channel_flows', + 'Flows' => 'nfsen_channel_flows', 'Packets' => 'nfsen_channel_packets', 'Traffic' => 'nfsen_channel_traffic', ]; diff --git a/includes/html/pages/device/nfsen/general.inc.php b/includes/html/pages/device/nfsen/general.inc.php index 9bb6b22052..5de04f98d0 100644 --- a/includes/html/pages/device/nfsen/general.inc.php +++ b/includes/html/pages/device/nfsen/general.inc.php @@ -1,7 +1,7 @@ 'nfsen_flows', + 'Flows' => 'nfsen_flows', 'Packets' => 'nfsen_packets', 'Traffic' => 'nfsen_traffic', ]; diff --git a/includes/html/pages/device/nfsen/stats.inc.php b/includes/html/pages/device/nfsen/stats.inc.php index c844588d22..b3bfd768db 100644 --- a/includes/html/pages/device/nfsen/stats.inc.php +++ b/includes/html/pages/device/nfsen/stats.inc.php @@ -44,19 +44,19 @@ echo ' $option_default = $vars['stattype'] ?? \LibreNMS\Config::get('nfsen_stats_default'); $stat_types = [ - 'record'=>'Flow Records', - 'ip'=>'Any IP Address', - 'srcip'=>'SRC IP Address', - 'dstip'=>'DST IP Address', - 'port'=>'Any Port', - 'srcport'=>'SRC Port', - 'dstport'=>'DST Port', - 'srctos'=>'SRC TOS', - 'dsttos'=>'DST TOS', - 'tos'=>'TOS', - 'as'=>'AS', - 'srcas'=>'SRC AS', - 'dstas'=>'DST AS', + 'record' => 'Flow Records', + 'ip' => 'Any IP Address', + 'srcip' => 'SRC IP Address', + 'dstip' => 'DST IP Address', + 'port' => 'Any Port', + 'srcport' => 'SRC Port', + 'dstport' => 'DST Port', + 'srctos' => 'SRC TOS', + 'dsttos' => 'DST TOS', + 'tos' => 'TOS', + 'as' => 'AS', + 'srcas' => 'SRC AS', + 'dstas' => 'DST AS', ]; // puts together the drop down options @@ -82,12 +82,12 @@ if (isset($vars['statorder'])) { // WARNING: order is relevant as it has to match the // check later in the process part of this page. $order_types = [ - 'flows'=>1, - 'packets'=>1, - 'bytes'=>1, - 'pps'=>1, - 'bps'=>1, - 'bpp'=>1, + 'flows' => 1, + 'packets' => 1, + 'bytes' => 1, + 'pps' => 1, + 'bps' => 1, + 'bpp' => 1, ]; // puts together the drop down options diff --git a/includes/html/pages/device/port.inc.php b/includes/html/pages/device/port.inc.php index 3e38a10ade..cfec5dc91c 100644 --- a/includes/html/pages/device/port.inc.php +++ b/includes/html/pages/device/port.inc.php @@ -66,10 +66,10 @@ echo "
"; print_optionbar_start(); $link_array = [ - 'page' => 'device', + 'page' => 'device', 'device' => $device['device_id'], - 'tab' => 'port', - 'port' => $port->port_id, + 'tab' => 'port', + 'port' => $port->port_id, ]; $menu_options['graphs'] = 'Graphs'; diff --git a/includes/html/pages/device/processes.inc.php b/includes/html/pages/device/processes.inc.php index f91d82a6bb..cd3b9df4b5 100644 --- a/includes/html/pages/device/processes.inc.php +++ b/includes/html/pages/device/processes.inc.php @@ -57,11 +57,11 @@ if (isset($vars['by']) && $vars['by'] == 'desc') { } $heads = [ - 'PID' => '', - 'VSZ' => 'Virtual Memory', - 'RSS' => 'Resident Memory', + 'PID' => '', + 'VSZ' => 'Virtual Memory', + 'RSS' => 'Resident Memory', 'cputime' => '', - 'user' => '', + 'user' => '', 'command' => '', ]; diff --git a/includes/html/pages/device/routing.inc.php b/includes/html/pages/device/routing.inc.php index 981efdcaaa..d8ea8929d3 100644 --- a/includes/html/pages/device/routing.inc.php +++ b/includes/html/pages/device/routing.inc.php @@ -1,9 +1,9 @@ 'device', + 'page' => 'device', 'device' => $device['device_id'], - 'tab' => 'routing', + 'tab' => 'routing', ]; // $type_text['overview'] = "Overview"; diff --git a/includes/html/pages/device/routing/cef.inc.php b/includes/html/pages/device/routing/cef.inc.php index 8ab6b72d4b..3b8b358483 100644 --- a/includes/html/pages/device/routing/cef.inc.php +++ b/includes/html/pages/device/routing/cef.inc.php @@ -3,10 +3,10 @@ print_optionbar_start(); $link_array = [ - 'page' => 'device', + 'page' => 'device', 'device' => $device['device_id'], - 'tab' => 'routing', - 'proto' => 'cef', + 'tab' => 'routing', + 'proto' => 'cef', ]; if (! isset($vars['view'])) { diff --git a/includes/html/pages/device/routing/mpls.inc.php b/includes/html/pages/device/routing/mpls.inc.php index a792be8acc..2c99f02731 100644 --- a/includes/html/pages/device/routing/mpls.inc.php +++ b/includes/html/pages/device/routing/mpls.inc.php @@ -5,10 +5,10 @@ use LibreNMS\Util\Number; print_optionbar_start(); $link_array = [ - 'page' => 'device', + 'page' => 'device', 'device' => $device['device_id'], - 'tab' => 'routing', - 'proto' => 'mpls', + 'tab' => 'routing', + 'proto' => 'mpls', ]; if (! isset($vars['view'])) { diff --git a/includes/html/pages/device/routing/vrf.inc.php b/includes/html/pages/device/routing/vrf.inc.php index 5d37ea69d2..c19501172a 100644 --- a/includes/html/pages/device/routing/vrf.inc.php +++ b/includes/html/pages/device/routing/vrf.inc.php @@ -1,10 +1,10 @@ 'device', + 'page' => 'device', 'device' => $device['device_id'], - 'tab' => 'routing', - 'proto' => 'vrf', + 'tab' => 'routing', + 'proto' => 'vrf', ]; // echo(generate_link("Basic", $link_array,array('view'=>'basic'))); @@ -43,10 +43,10 @@ unset($sep); echo ' Graphs: '; $graph_types = [ - 'bits' => 'Bits', - 'upkts' => 'Unicast Packets', - 'nupkts' => 'Non-Unicast Packets', - 'errors' => 'Errors', + 'bits' => 'Bits', + 'upkts' => 'Unicast Packets', + 'nupkts' => 'Non-Unicast Packets', + 'errors' => 'Errors', 'etherlike' => 'Etherlike', ]; diff --git a/includes/html/pages/device/wireless.inc.php b/includes/html/pages/device/wireless.inc.php index 3c1cfba119..52cd317487 100644 --- a/includes/html/pages/device/wireless.inc.php +++ b/includes/html/pages/device/wireless.inc.php @@ -13,9 +13,9 @@ $sensors = dbFetchColumn( $datas = array_intersect(array_keys($types), $sensors); $wireless_link_array = [ - 'page' => 'device', + 'page' => 'device', 'device' => $device['device_id'], - 'tab' => 'wireless', + 'tab' => 'wireless', ]; print_optionbar_start(); diff --git a/includes/html/pages/health.inc.php b/includes/html/pages/health.inc.php index e1c52d5303..9991e9e00d 100644 --- a/includes/html/pages/health.inc.php +++ b/includes/html/pages/health.inc.php @@ -77,7 +77,7 @@ foreach ($datas as $texttype) { if ($active_metric == $metric) { $navbar .= ''; } - $navbar .= generate_link($type_text[$metric], $link_array, ['metric'=> $metric, 'view' => $vars['view']]); + $navbar .= generate_link($type_text[$metric], $link_array, ['metric' => $metric, 'view' => $vars['view']]); if ($active_metric == $metric) { $navbar .= ''; } @@ -90,7 +90,7 @@ if ($vars['view'] == 'graphs') { $displayoptions = ''; } -$displayoptions .= generate_link('Graphs', $link_array, ['metric'=> $active_metric, 'view' => 'graphs']); +$displayoptions .= generate_link('Graphs', $link_array, ['metric' => $active_metric, 'view' => 'graphs']); if ($vars['view'] == 'graphs') { $displayoptions .= ''; @@ -102,7 +102,7 @@ if ($vars['view'] != 'graphs') { $displayoptions .= ''; } -$displayoptions .= generate_link('No Graphs', $link_array, ['metric'=> $active_metric, 'view' => 'detail']); +$displayoptions .= generate_link('No Graphs', $link_array, ['metric' => $active_metric, 'view' => 'detail']); if ($vars['view'] != 'graphs') { $displayoptions .= ''; diff --git a/includes/html/pages/routing/bgp.inc.php b/includes/html/pages/routing/bgp.inc.php index 44597339a1..76f542a052 100644 --- a/includes/html/pages/routing/bgp.inc.php +++ b/includes/html/pages/routing/bgp.inc.php @@ -11,7 +11,7 @@ if (! Auth::user()->hasGlobalRead()) { include 'includes/html/error-no-perm.inc.php'; } else { $link_array = [ - 'page' => 'routing', + 'page' => 'routing', 'protocol' => 'bgp', ]; diff --git a/includes/html/pages/routing/isis.inc.php b/includes/html/pages/routing/isis.inc.php index 693a9f824e..66b66a76bb 100644 --- a/includes/html/pages/routing/isis.inc.php +++ b/includes/html/pages/routing/isis.inc.php @@ -6,7 +6,7 @@ if (! Auth::user()->hasGlobalRead()) { include 'includes/html/error-no-perm.inc.php'; } else { $link_array = [ - 'page' => 'routing', + 'page' => 'routing', 'protocol' => 'isis', ]; diff --git a/includes/html/pages/routing/mpls.inc.php b/includes/html/pages/routing/mpls.inc.php index e076f17cb7..db8f7a237c 100644 --- a/includes/html/pages/routing/mpls.inc.php +++ b/includes/html/pages/routing/mpls.inc.php @@ -5,8 +5,8 @@ use LibreNMS\Util\Number; print_optionbar_start(); $link_array = [ - 'page' => 'routing', - 'protocol' => 'mpls', + 'page' => 'routing', + 'protocol' => 'mpls', ]; if (! isset($vars['view'])) { diff --git a/includes/html/pages/routing/vrf.inc.php b/includes/html/pages/routing/vrf.inc.php index 1901d3c25c..e1c3543c53 100644 --- a/includes/html/pages/routing/vrf.inc.php +++ b/includes/html/pages/routing/vrf.inc.php @@ -7,7 +7,7 @@ if (! Auth::user()->hasGlobalRead()) { include 'includes/html/error-no-perm.inc.php'; } else { $link_array = [ - 'page' => 'routing', + 'page' => 'routing', 'protocol' => 'vrf', ]; @@ -41,10 +41,10 @@ if (! Auth::user()->hasGlobalRead()) { echo ' Graphs: '; $graph_types = [ - 'bits' => 'Bits', - 'upkts' => 'Unicast Packets', - 'nupkts' => 'Non-Unicast Packets', - 'errors' => 'Errors', + 'bits' => 'Bits', + 'upkts' => 'Unicast Packets', + 'nupkts' => 'Non-Unicast Packets', + 'errors' => 'Errors', 'etherlike' => 'Etherlike', ]; diff --git a/includes/html/pages/search.inc.php b/includes/html/pages/search.inc.php index 842327246f..679816c78f 100644 --- a/includes/html/pages/search.inc.php +++ b/includes/html/pages/search.inc.php @@ -7,9 +7,9 @@ $pagetitle[] = 'Search'; $sections = [ 'ipv4' => 'IPv4 Address', 'ipv6' => 'IPv6 Address', - 'mac' => 'MAC Address', - 'arp' => 'ARP Table', - 'fdb' => 'FDB Table', + 'mac' => 'MAC Address', + 'arp' => 'ARP Table', + 'fdb' => 'FDB Table', ]; if (dbFetchCell('SELECT 1 from `packages` LIMIT 1')) { diff --git a/includes/html/pages/wireless.inc.php b/includes/html/pages/wireless.inc.php index c8d5991a1e..be3a806c68 100644 --- a/includes/html/pages/wireless.inc.php +++ b/includes/html/pages/wireless.inc.php @@ -42,7 +42,7 @@ foreach ($valid_wireless_types as $type => $details) { $linkoptions .= ''; } - $linkoptions .= generate_link(__("wireless.$type.short"), $link_array, ['metric'=> $type, 'view' => $vars['view']]); + $linkoptions .= generate_link(__("wireless.$type.short"), $link_array, ['metric' => $type, 'view' => $vars['view']]); if ($class == $type) { $linkoptions .= ''; @@ -56,7 +56,7 @@ $displayoptions = ''; if ($vars['view'] == 'graphs') { $displayoptions .= ''; } -$displayoptions .= generate_link('Graphs', $link_array, ['metric'=> $class, 'view' => 'graphs']); +$displayoptions .= generate_link('Graphs', $link_array, ['metric' => $class, 'view' => 'graphs']); if ($vars['view'] == 'graphs') { $displayoptions .= ''; } @@ -67,7 +67,7 @@ if ($vars['view'] != 'graphs') { $displayoptions .= ''; } -$displayoptions .= generate_link('No Graphs', $link_array, ['metric'=> $class, 'view' => 'nographs']); +$displayoptions .= generate_link('No Graphs', $link_array, ['metric' => $class, 'view' => 'nographs']); if ($vars['view'] != 'graphs') { $displayoptions .= ''; diff --git a/includes/html/table/address-search.inc.php b/includes/html/table/address-search.inc.php index 1c723aa94a..bd71f88d74 100644 --- a/includes/html/table/address-search.inc.php +++ b/includes/html/table/address-search.inc.php @@ -104,9 +104,9 @@ foreach (dbFetchRows($sql, $param) as $interface) { if (port_permitted($interface['port_id'])) { $interface = cleanPort($interface, $interface); $row = [ - 'hostname' => generate_device_link($interface), - 'interface' => generate_port_link($interface) . ' ' . $error_img, - 'address' => $address, + 'hostname' => generate_device_link($interface), + 'interface' => generate_port_link($interface) . ' ' . $error_img, + 'address' => $address, 'description' => $interface['ifAlias'], ]; if ($vars['search_type'] == 'mac') { @@ -117,9 +117,9 @@ foreach (dbFetchRows($sql, $param) as $interface) { }//end foreach $output = [ - 'current' => $current, + 'current' => $current, 'rowCount' => $rowCount, - 'rows' => $response, - 'total' => $total, + 'rows' => $response, + 'total' => $total, ]; echo json_encode($output, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE); diff --git a/includes/html/table/app_ntp.inc.php b/includes/html/table/app_ntp.inc.php index 297b30b85b..fed388c7d6 100644 --- a/includes/html/table/app_ntp.inc.php +++ b/includes/html/table/app_ntp.inc.php @@ -72,10 +72,10 @@ foreach ($components as $devid => $comp) { } $response[] = [ - 'device' => $device_link, - 'peer' => $array['peer'], - 'stratum' => $array['stratum'], - 'error' => $array['error'], + 'device' => $device_link, + 'peer' => $array['peer'], + 'stratum' => $array['stratum'], + 'error' => $array['error'], ]; // Do we want a graphrow. @@ -84,10 +84,10 @@ foreach ($components as $devid => $comp) { require 'includes/html/print-graphrow.inc.php'; unset($return_data); $response[] = [ - 'device' => $graph_data[0], - 'peer' => $graph_data[1], - 'stratum' => $graph_data[2], - 'error' => $graph_data[3], + 'device' => $graph_data[0], + 'peer' => $graph_data[1], + 'stratum' => $graph_data[2], + 'error' => $graph_data[3], ]; } } // End if in range @@ -101,9 +101,9 @@ if ($count == 0) { } $output = [ - 'current' => $current, + 'current' => $current, 'rowCount' => $rowCount, - 'rows' => $response, - 'total' => $count, + 'rows' => $response, + 'total' => $count, ]; echo json_encode($output, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE); diff --git a/includes/html/table/arp-search.inc.php b/includes/html/table/arp-search.inc.php index 3c2e8603fd..71ec687be6 100644 --- a/includes/html/table/arp-search.inc.php +++ b/includes/html/table/arp-search.inc.php @@ -99,12 +99,12 @@ foreach (dbFetchRows($sql, $param) as $entry) { $mac = Mac::parse($entry['mac_address']); $response[] = [ - 'mac_address' => $mac->readable(), - 'mac_oui' => $mac->vendor(), - 'ipv4_address' => $entry['ipv4_address'], - 'hostname' => generate_device_link($entry), - 'interface' => generate_port_link($entry, makeshortif($entry['label'])) . ' ' . $error_img, - 'remote_device' => $arp_name, + 'mac_address' => $mac->readable(), + 'mac_oui' => $mac->vendor(), + 'ipv4_address' => $entry['ipv4_address'], + 'hostname' => generate_device_link($entry), + 'interface' => generate_port_link($entry, makeshortif($entry['label'])) . ' ' . $error_img, + 'remote_device' => $arp_name, 'remote_interface' => $arp_if, ]; }//end if @@ -113,9 +113,9 @@ foreach (dbFetchRows($sql, $param) as $entry) { }//end foreach $output = [ - 'current' => $current, + 'current' => $current, 'rowCount' => $rowCount, - 'rows' => $response, - 'total' => $total, + 'rows' => $response, + 'total' => $total, ]; echo json_encode($output, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE); diff --git a/includes/html/table/as-selection.inc.php b/includes/html/table/as-selection.inc.php index 8e558b8817..cfb44f8c32 100644 --- a/includes/html/table/as-selection.inc.php +++ b/includes/html/table/as-selection.inc.php @@ -40,16 +40,16 @@ $sql = "SELECT `bgpLocalAs` $sql"; foreach (dbFetchRows($sql, $param) as $asn) { $astext = \LibreNMS\Util\AutonomousSystem::get($asn['bgpLocalAs'])->name(); $response[] = [ - 'bgpLocalAs' => $asn['bgpLocalAs'], + 'bgpLocalAs' => $asn['bgpLocalAs'], 'asname' => $astext, 'action' => " 'peering', 'section' => 'ix-list', 'bgpLocalAs' => $asn['bgpLocalAs']]) . "' role='button'>Show connected IXes", ]; } $output = [ - 'current' => $current, + 'current' => $current, 'rowCount' => $rowCount, - 'rows' => $response, - 'total' => $total, + 'rows' => $response, + 'total' => $total, ]; echo json_encode($output, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE); diff --git a/includes/html/table/bills.inc.php b/includes/html/table/bills.inc.php index 78eb78b11c..b296cbaad1 100644 --- a/includes/html/table/bills.inc.php +++ b/includes/html/table/bills.inc.php @@ -159,19 +159,19 @@ foreach (dbFetchRows($sql, $param) as $bill) { } $response[] = [ - 'bill_name' => $bill_name, - 'notes' => $notes, - 'bill_type' => $type, - 'bill_allowed' => $allowed, + 'bill_name' => $bill_name, + 'notes' => $notes, + 'bill_type' => $type, + 'bill_allowed' => $allowed, 'total_data_in' => $in, - 'total_data_out'=> $out, - 'total_data' => $total_data, - 'rate_95th' => $rate_95th, - 'used' => $used, - 'overusage' => $overuse_formatted, - 'predicted' => $predicted, - 'graph' => $bar, - 'actions' => $actions, + 'total_data_out' => $out, + 'total_data' => $total_data, + 'rate_95th' => $rate_95th, + 'used' => $used, + 'overusage' => $overuse_formatted, + 'predicted' => $predicted, + 'graph' => $bar, + 'actions' => $actions, ]; } diff --git a/includes/html/table/component.inc.php b/includes/html/table/component.inc.php index 6d4b04c11c..8888a46d47 100644 --- a/includes/html/table/component.inc.php +++ b/includes/html/table/component.inc.php @@ -60,9 +60,9 @@ foreach ($COMPONENTS[$device_id] as $ID => $AVP) { }//end foreach $output = [ - 'current' => $current, + 'current' => $current, 'rowCount' => $rowCount, - 'rows' => $response, - 'total' => ! empty($COMPONENTS[$device_id]) ? count($COMPONENTS[$device_id]) : 0, + 'rows' => $response, + 'total' => ! empty($COMPONENTS[$device_id]) ? count($COMPONENTS[$device_id]) : 0, ]; echo json_encode($output, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE); diff --git a/includes/html/table/ix-list.inc.php b/includes/html/table/ix-list.inc.php index 50c8914a21..d5402fb27e 100644 --- a/includes/html/table/ix-list.inc.php +++ b/includes/html/table/ix-list.inc.php @@ -58,15 +58,15 @@ foreach (dbFetchRows($sql, $params) as $ix) { $ix_id = $ix['ix_id']; $response[] = [ 'exchange' => $ix['name'], - 'action' => " 'peering', 'section' => 'ix-peers', 'asn' => $asn, 'ixid' => $ix['ix_id']]) . "' role='button'>Show Peers", - 'links' => "", + 'action' => " 'peering', 'section' => 'ix-peers', 'asn' => $asn, 'ixid' => $ix['ix_id']]) . "' role='button'>Show Peers", + 'links' => "", ]; } $output = [ - 'current' => $current, + 'current' => $current, 'rowCount' => $rowCount, - 'rows' => $response, - 'total' => $total, + 'rows' => $response, + 'total' => $total, ]; echo json_encode($output, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE); diff --git a/includes/html/table/ix-peers.inc.php b/includes/html/table/ix-peers.inc.php index a586e455ac..f789e47a67 100644 --- a/includes/html/table/ix-peers.inc.php +++ b/includes/html/table/ix-peers.inc.php @@ -75,18 +75,18 @@ foreach (dbFetchRows($sql, $params) as $peer) { } $peer_id = $peer['peer_id']; $response[] = [ - 'remote_asn' => $peer['remote_asn'], + 'remote_asn' => $peer['remote_asn'], 'remote_ipaddr4' => $peer['remote_ipaddr4'], - 'peer' => $peer['name'], - 'connected' => "$connected", - 'links' => "", + 'peer' => $peer['name'], + 'connected' => "$connected", + 'links' => "", ]; } $output = [ - 'current' => $current, + 'current' => $current, 'rowCount' => $rowCount, - 'rows' => $response, - 'total' => $total, + 'rows' => $response, + 'total' => $total, ]; echo json_encode($output, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE); diff --git a/includes/html/table/mempool-edit.inc.php b/includes/html/table/mempool-edit.inc.php index c1b0108a9d..f99f2dd9af 100644 --- a/includes/html/table/mempool-edit.inc.php +++ b/includes/html/table/mempool-edit.inc.php @@ -48,5 +48,5 @@ foreach (dbFetchRows($sql, $param) as $drive) { 'mempool_perc_warn' => $perc_warn, ]; } -$output = ['current'=>$current, 'rowCount'=>$rowCount, 'rows'=>$response, 'total'=>$total]; +$output = ['current' => $current, 'rowCount' => $rowCount, 'rows' => $response, 'total' => $total]; echo json_encode($output, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE); diff --git a/includes/html/table/poll-log.inc.php b/includes/html/table/poll-log.inc.php index 81d6621159..a5bb1d21f7 100644 --- a/includes/html/table/poll-log.inc.php +++ b/includes/html/table/poll-log.inc.php @@ -62,18 +62,18 @@ foreach (dbFetchRows($sql, $param) as $device) { $device['group_name'] = 'General'; } $response[] = [ - 'hostname' => generate_device_link($device, null, ['tab' => 'graphs', 'group' => 'poller']), - 'last_polled' => $device['last_polled'], - 'poller_group' => $device['group_name'], - 'location' => $device['location'], + 'hostname' => generate_device_link($device, null, ['tab' => 'graphs', 'group' => 'poller']), + 'last_polled' => $device['last_polled'], + 'poller_group' => $device['group_name'], + 'location' => $device['location'], 'last_polled_timetaken' => round($device['last_polled_timetaken'], 2), ]; } $output = [ - 'current' => $current, + 'current' => $current, 'rowCount' => $rowCount, - 'rows' => $response, - 'total' => $total, + 'rows' => $response, + 'total' => $total, ]; echo json_encode($output); diff --git a/includes/html/table/processor-edit.inc.php b/includes/html/table/processor-edit.inc.php index edce1f8975..dffbf9cf4e 100644 --- a/includes/html/table/processor-edit.inc.php +++ b/includes/html/table/processor-edit.inc.php @@ -48,5 +48,5 @@ foreach (dbFetchRows($sql, $param) as $drive) { 'processor_perc_warn' => $perc_warn, ]; } -$output = ['current'=>$current, 'rowCount'=>$rowCount, 'rows'=>$response, 'total'=>$total]; +$output = ['current' => $current, 'rowCount' => $rowCount, 'rows' => $response, 'total' => $total]; echo json_encode($output, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE); diff --git a/includes/html/table/processor.inc.php b/includes/html/table/processor.inc.php index 9e522a224e..6de6245289 100644 --- a/includes/html/table/processor.inc.php +++ b/includes/html/table/processor.inc.php @@ -71,9 +71,9 @@ foreach (dbFetchRows($sql, $param) as $processor) { $bar_link = \LibreNMS\Util\Url::overlibLink($link, print_percentage_bar(400, 20, $perc, $perc . '%', 'ffffff', $background['left'], (100 - $perc) . '%', 'ffffff', $background['right']), \LibreNMS\Util\Url::graphTag($graph_array_zoom)); $response[] = [ - 'hostname' => generate_device_link($processor), + 'hostname' => generate_device_link($processor), 'processor_descr' => $processor['processor_descr'], - 'graph' => $mini_graph, + 'graph' => $mini_graph, 'processor_usage' => $bar_link, ]; if ($vars['view'] == 'graphs') { @@ -86,18 +86,18 @@ foreach (dbFetchRows($sql, $param) as $processor) { include 'includes/html/print-graphrow.inc.php'; unset($return_data); $response[] = [ - 'hostname' => $graph_data[0], + 'hostname' => $graph_data[0], 'processor_descr' => $graph_data[1], - 'graph' => $graph_data[2], + 'graph' => $graph_data[2], 'processor_usage' => $graph_data[3], ]; } //end if }//end foreach $output = [ - 'current' => $current, + 'current' => $current, 'rowCount' => $rowCount, - 'rows' => $response, - 'total' => $total, + 'rows' => $response, + 'total' => $total, ]; echo json_encode($output, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE); diff --git a/includes/html/table/routing-edit.inc.php b/includes/html/table/routing-edit.inc.php index 0e098904b8..c18f8a9db6 100644 --- a/includes/html/table/routing-edit.inc.php +++ b/includes/html/table/routing-edit.inc.php @@ -57,5 +57,5 @@ foreach (dbFetchRows($sql, $param) as $routing) { 'bgpPeerDescr' => $routing['bgpPeerDescr'], ]; } -$output = ['current'=>$current, 'rowCount'=>$rowCount, 'rows'=>$response, 'total'=>$total]; +$output = ['current' => $current, 'rowCount' => $rowCount, 'rows' => $response, 'total' => $total]; echo json_encode($output, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE); diff --git a/includes/html/table/sensors-common.php b/includes/html/table/sensors-common.php index 9e1b0f8a39..bcd0032d1e 100644 --- a/includes/html/table/sensors-common.php +++ b/includes/html/table/sensors-common.php @@ -116,14 +116,14 @@ foreach (dbFetchRows($sql, $param) as $sensor) { $sensor_current = $graph_type == 'sensor_state' ? get_state_label($sensor) : get_sensor_label_color($sensor, $translations); $response[] = [ - 'hostname' => generate_device_link($sensor), - 'sensor_descr' => \LibreNMS\Util\Url::overlibLink($link, $sensor['sensor_descr'], $overlib_content), - 'graph' => \LibreNMS\Util\Url::overlibLink($link_graph, $sensor_minigraph, $overlib_content), - 'alert' => $alert, - 'sensor_current' => $sensor_current, + 'hostname' => generate_device_link($sensor), + 'sensor_descr' => \LibreNMS\Util\Url::overlibLink($link, $sensor['sensor_descr'], $overlib_content), + 'graph' => \LibreNMS\Util\Url::overlibLink($link_graph, $sensor_minigraph, $overlib_content), + 'alert' => $alert, + 'sensor_current' => $sensor_current, 'sensor_limit_low' => is_null($sensor['sensor_limit_low']) ? '-' : '' . trim(\LibreNMS\Util\Number::formatSi($sensor['sensor_limit_low'], 2, 3, '') . $unit) . '', - 'sensor_limit' => is_null($sensor['sensor_limit']) ? '-' : + 'sensor_limit' => is_null($sensor['sensor_limit']) ? '-' : '' . trim(\LibreNMS\Util\Number::formatSi($sensor['sensor_limit'], 2, 3, '') . $unit) . '', ]; @@ -141,24 +141,24 @@ foreach (dbFetchRows($sql, $param) as $sensor) { $yearly_url = 'graph.php?id=' . $sensor['sensor_id'] . '&type=' . $graph_type . '&from=' . Config::get('time.year') . '&to=' . Config::get('time.now') . '&width=400&height=150'; $response[] = [ - 'hostname' => "', LEFT);\" onmouseout=\"return nd();\"> + 'hostname' => "', LEFT);\" onmouseout=\"return nd();\"> ", - 'sensor_descr' => "', LEFT);\" onmouseout=\"return nd();\"> + 'sensor_descr' => "', LEFT);\" onmouseout=\"return nd();\"> ", - 'graph' => "', LEFT);\" onmouseout=\"return nd();\"> + 'graph' => "', LEFT);\" onmouseout=\"return nd();\"> ", - 'alert' => '', + 'alert' => '', 'sensor_current' => "', LEFT);\" onmouseout=\"return nd();\"> ", - 'sensor_range' => '', + 'sensor_range' => '', ]; } //end if }//end foreach $output = [ - 'current' => $current, + 'current' => $current, 'rowCount' => $rowCount, - 'rows' => $response, - 'total' => $count, + 'rows' => $response, + 'total' => $count, ]; echo json_encode($output, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE); diff --git a/includes/html/table/storage-edit.inc.php b/includes/html/table/storage-edit.inc.php index a317b0f504..21bad15298 100644 --- a/includes/html/table/storage-edit.inc.php +++ b/includes/html/table/storage-edit.inc.php @@ -52,5 +52,5 @@ foreach (dbFetchRows($sql, $param) as $drive) { ]; } -$output = ['current'=>$current, 'rowCount'=>$rowCount, 'rows'=>$response, 'total'=>$total]; +$output = ['current' => $current, 'rowCount' => $rowCount, 'rows' => $response, 'total' => $total]; echo json_encode($output, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE); diff --git a/includes/html/table/storage.inc.php b/includes/html/table/storage.inc.php index 9a6d33df2b..4dcea49bab 100644 --- a/includes/html/table/storage.inc.php +++ b/includes/html/table/storage.inc.php @@ -83,11 +83,11 @@ foreach (dbFetchRows($sql, $param) as $drive) { $bar_link = \LibreNMS\Util\Url::overlibLink($link, print_percentage_bar(400, 20, $perc, "$used / $total", 'ffffff', $background['left'], $free, 'ffffff', $background['right']), \LibreNMS\Util\Url::graphTag($graph_array_zoom)); $response[] = [ - 'hostname' => generate_device_link($drive), + 'hostname' => generate_device_link($drive), 'storage_descr' => $drive['storage_descr'], - 'graph' => $mini_graph, - 'storage_used' => $bar_link, - 'storage_perc' => $perc . '%', + 'graph' => $mini_graph, + 'storage_used' => $bar_link, + 'storage_perc' => $perc . '%', ]; if ($vars['view'] == 'graphs') { $graph_array['height'] = '100'; @@ -100,19 +100,19 @@ foreach (dbFetchRows($sql, $param) as $drive) { include 'includes/html/print-graphrow.inc.php'; unset($return_data); $response[] = [ - 'hostname' => $graph_data[0], + 'hostname' => $graph_data[0], 'storage_descr' => $graph_data[1], - 'graph' => $graph_data[2], - 'storage_used' => $graph_data[3], - 'storage_perc' => '', + 'graph' => $graph_data[2], + 'storage_used' => $graph_data[3], + 'storage_perc' => '', ]; } //end if }//end foreach $output = [ - 'current' => $current, + 'current' => $current, 'rowCount' => $rowCount, - 'rows' => $response, - 'total' => $count, + 'rows' => $response, + 'total' => $count, ]; echo json_encode($output, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE); diff --git a/includes/html/table/toner.inc.php b/includes/html/table/toner.inc.php index 2e310be65f..e1cbcc6520 100644 --- a/includes/html/table/toner.inc.php +++ b/includes/html/table/toner.inc.php @@ -92,20 +92,20 @@ foreach (dbFetchRows($sql, $param) as $toner) { include 'includes/html/print-graphrow.inc.php'; unset($return_data); $response[] = [ - 'hostname' => $graph_data[0], + 'hostname' => $graph_data[0], 'mempool_descr' => $graph_data[1], - 'graph' => $graph_data[2], - 'mempool_used' => $graph_data[3], - 'mempool_perc' => '', + 'graph' => $graph_data[2], + 'mempool_used' => $graph_data[3], + 'mempool_perc' => '', ]; } } } $output = [ - 'current' => $current, + 'current' => $current, 'rowCount' => $rowCount, - 'rows' => $response, - 'total' => $count, + 'rows' => $response, + 'total' => $count, ]; echo json_encode($output, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE); diff --git a/includes/polling/applications/apache.inc.php b/includes/polling/applications/apache.inc.php index 2fd204441c..93c983d298 100644 --- a/includes/polling/applications/apache.inc.php +++ b/includes/polling/applications/apache.inc.php @@ -48,26 +48,26 @@ $rrd_def = RrdDefinition::make() ->addDataset('sb_open', 'GAUGE', 0, 125000000000); $fields = [ - 'access' => intval(trim($total_access, '"')), - 'kbyte' => $total_kbyte, - 'cpu' => $cpuload, - 'uptime' => $uptime, - 'reqpersec' => $reqpersec, - 'bytespersec' => $bytespersec, - 'byesperreq' => $bytesperreq, - 'busyworkers' => $busyworkers, - 'idleworkers' => $idleworkers, - 'sb_wait' => $score_wait, - 'sb_start' => $score_start, - 'sb_reading' => $score_reading, - 'sb_writing' => $score_writing, + 'access' => intval(trim($total_access, '"')), + 'kbyte' => $total_kbyte, + 'cpu' => $cpuload, + 'uptime' => $uptime, + 'reqpersec' => $reqpersec, + 'bytespersec' => $bytespersec, + 'byesperreq' => $bytesperreq, + 'busyworkers' => $busyworkers, + 'idleworkers' => $idleworkers, + 'sb_wait' => $score_wait, + 'sb_start' => $score_start, + 'sb_reading' => $score_reading, + 'sb_writing' => $score_writing, 'sb_keepalive' => $score_keepalive, - 'sb_dns' => $score_dns, - 'sb_closing' => $score_closing, - 'sb_logging' => $score_logging, - 'sb_graceful' => $score_graceful, - 'sb_idle' => $score_idle, - 'sb_open' => intval(trim($score_open, '"')), + 'sb_dns' => $score_dns, + 'sb_closing' => $score_closing, + 'sb_logging' => $score_logging, + 'sb_graceful' => $score_graceful, + 'sb_idle' => $score_idle, + 'sb_open' => intval(trim($score_open, '"')), ]; $tags = [ diff --git a/includes/polling/applications/backupninja.inc.php b/includes/polling/applications/backupninja.inc.php index 6fc675506d..5974003042 100644 --- a/includes/polling/applications/backupninja.inc.php +++ b/includes/polling/applications/backupninja.inc.php @@ -30,10 +30,10 @@ $rrd_def = RrdDefinition::make() ->addDataset('last_warning', 'GAUGE', 0); $fields = [ - 'last_actions' => $backupninja_data['last_actions'], - 'last_fatal' => $backupninja_data['last_fatal'], - 'last_error' => $backupninja_data['last_error'], - 'last_warning' => $backupninja_data['last_warning'], + 'last_actions' => $backupninja_data['last_actions'], + 'last_fatal' => $backupninja_data['last_fatal'], + 'last_error' => $backupninja_data['last_error'], + 'last_warning' => $backupninja_data['last_warning'], ]; $metrics[$category] = $fields; diff --git a/includes/polling/applications/bind.inc.php b/includes/polling/applications/bind.inc.php index 5dc0bb16e8..05df1942b7 100644 --- a/includes/polling/applications/bind.inc.php +++ b/includes/polling/applications/bind.inc.php @@ -44,16 +44,16 @@ $rrd_def = RrdDefinition::make() ->addDataset('spf', 'DERIVE', 0); $fields = [ - 'any' => $any, - 'a' => $a, - 'aaaa' => $aaaa, + 'any' => $any, + 'a' => $a, + 'aaaa' => $aaaa, 'cname' => $cname, - 'mx' => $mx, - 'ns' => $ns, - 'ptr' => $ptr, - 'soa' => $soa, - 'srv' => $srv, - 'spf' => $spf, + 'mx' => $mx, + 'ns' => $ns, + 'ptr' => $ptr, + 'soa' => $soa, + 'srv' => $srv, + 'spf' => $spf, ]; $metrics['queries'] = $fields; @@ -187,16 +187,16 @@ $rrd_def = RrdDefinition::make() ->addDataset('opt', 'DERIVE', 0); $fields = [ - 'any' => $any, - 'a' => $a, - 'aaaa' => $aaaa, + 'any' => $any, + 'a' => $a, + 'aaaa' => $aaaa, 'cname' => $cname, - 'mx' => $mx, - 'ns' => $ns, - 'ptr' => $ptr, - 'soa' => $soa, - 'srv' => $srv, - 'spf' => $spf, + 'mx' => $mx, + 'ns' => $ns, + 'ptr' => $ptr, + 'soa' => $soa, + 'srv' => $srv, + 'spf' => $spf, 'afsdb' => $afsdb, 'apl' => $apl, 'caa' => $caa, @@ -580,16 +580,16 @@ $rrd_def = RrdDefinition::make() $rrd_name = ['app', $name, $app->app_id, 'rrpositive']; $fields = [ - 'any' => $any, - 'a' => $a, - 'aaaa' => $aaaa, + 'any' => $any, + 'a' => $a, + 'aaaa' => $aaaa, 'cname' => $cname, - 'mx' => $mx, - 'ns' => $ns, - 'ptr' => $ptr, - 'soa' => $soa, - 'srv' => $srv, - 'spf' => $spf, + 'mx' => $mx, + 'ns' => $ns, + 'ptr' => $ptr, + 'soa' => $soa, + 'srv' => $srv, + 'spf' => $spf, 'afsdb' => $afsdb, 'apl' => $apl, 'caa' => $caa, @@ -633,16 +633,16 @@ data_update($device, 'app', $tags, $fields); $rrd_name = ['app', $name, $app->app_id, 'rrnegative']; $fields = [ - 'any' => $notany, - 'a' => $nota, - 'aaaa' => $notaaaa, + 'any' => $notany, + 'a' => $nota, + 'aaaa' => $notaaaa, 'cname' => $notcname, - 'mx' => $notmx, - 'ns' => $notns, - 'ptr' => $notptr, - 'soa' => $notsoa, - 'srv' => $notsrv, - 'spf' => $notspf, + 'mx' => $notmx, + 'ns' => $notns, + 'ptr' => $notptr, + 'soa' => $notsoa, + 'srv' => $notsrv, + 'spf' => $notspf, 'afsdb' => $notafsdb, 'apl' => $notapl, 'caa' => $notcaa, @@ -672,7 +672,7 @@ $fields = [ 'txt' => $nottxt, 'uri' => $noturi, 'dname' => $notdname, - 'nxdomain'=> $notnxdomain, + 'nxdomain' => $notnxdomain, 'axfr' => $notaxfr, 'ixfr' => $notixfr, 'opt' => $notopt, diff --git a/includes/polling/applications/certificate.inc.php b/includes/polling/applications/certificate.inc.php index 54ea3528b8..3b788a78b4 100644 --- a/includes/polling/applications/certificate.inc.php +++ b/includes/polling/applications/certificate.inc.php @@ -32,7 +32,7 @@ foreach ($certificate_data as $data) { $rrd_name = ['app', $name, $app->app_id, $cert_name]; $fields = [ - 'age' => $age, + 'age' => $age, 'remaining_days' => $remaining_days, ]; diff --git a/includes/polling/applications/chronyd.inc.php b/includes/polling/applications/chronyd.inc.php index 5c6e1b1253..232b53bf2b 100644 --- a/includes/polling/applications/chronyd.inc.php +++ b/includes/polling/applications/chronyd.inc.php @@ -28,17 +28,17 @@ $rrd_def = RrdDefinition::make() ->addDataset('update_interval', 'GAUGE', 0, 4096); // good for >1h $fields = [ - 'stratum' => $chronyd['tracking']['stratum'], - 'reference_time' => $chronyd['tracking']['reference_time'], - 'system_time' => $chronyd['tracking']['system_time'], - 'last_offset' => $chronyd['tracking']['last_offset'], - 'rms_offset' => $chronyd['tracking']['rms_offset'], - 'frequency' => $chronyd['tracking']['frequency'], - 'residual_frequency' => $chronyd['tracking']['residual_frequency'], - 'skew' => $chronyd['tracking']['skew'], - 'root_delay' => $chronyd['tracking']['root_delay'], - 'root_dispersion' => $chronyd['tracking']['root_dispersion'], - 'update_interval' => $chronyd['tracking']['update_interval'], + 'stratum' => $chronyd['tracking']['stratum'], + 'reference_time' => $chronyd['tracking']['reference_time'], + 'system_time' => $chronyd['tracking']['system_time'], + 'last_offset' => $chronyd['tracking']['last_offset'], + 'rms_offset' => $chronyd['tracking']['rms_offset'], + 'frequency' => $chronyd['tracking']['frequency'], + 'residual_frequency' => $chronyd['tracking']['residual_frequency'], + 'skew' => $chronyd['tracking']['skew'], + 'root_delay' => $chronyd['tracking']['root_delay'], + 'root_dispersion' => $chronyd['tracking']['root_dispersion'], + 'update_interval' => $chronyd['tracking']['update_interval'], ]; $tags = ['name' => $name, 'app_id' => $app->app_id, 'rrd_def' => $rrd_def, 'rrd_name' => $rrd_name]; @@ -69,19 +69,19 @@ foreach ($chronyd['sources'] as $source) { $sources[] = $source['source_name']; $rrd_name = ['app', $name, $app->app_id, $source['source_name']]; $fields = [ - 'stratum' => $source['stratum'], - 'polling_rate' => $source['polling_rate'], - 'last_rx' => $source['last_rx'], - 'adjusted_offset' => $source['adjusted_offset'], - 'measured_offset' => $source['measured_offset'], - 'estimated_error' => $source['estimated_error'], - 'number_samplepoints' => $source['number_samplepoints'], - 'number_runs' => $source['number_runs'], - 'span' => $source['span'], - 'frequency' => $source['frequency'], - 'frequency_skew' => $source['frequency_skew'], - 'offset' => $source['offset'], - 'stddev' => $source['stddev'], + 'stratum' => $source['stratum'], + 'polling_rate' => $source['polling_rate'], + 'last_rx' => $source['last_rx'], + 'adjusted_offset' => $source['adjusted_offset'], + 'measured_offset' => $source['measured_offset'], + 'estimated_error' => $source['estimated_error'], + 'number_samplepoints' => $source['number_samplepoints'], + 'number_runs' => $source['number_runs'], + 'span' => $source['span'], + 'frequency' => $source['frequency'], + 'frequency_skew' => $source['frequency_skew'], + 'offset' => $source['offset'], + 'stddev' => $source['stddev'], ]; $tags = ['name' => $name, 'app_id' => $app->app_id, 'rrd_def' => $source_rrd_def, 'rrd_name' => $rrd_name]; diff --git a/includes/polling/applications/dhcp-stats.inc.php b/includes/polling/applications/dhcp-stats.inc.php index 7f870c5eab..a59d564ba4 100644 --- a/includes/polling/applications/dhcp-stats.inc.php +++ b/includes/polling/applications/dhcp-stats.inc.php @@ -65,15 +65,15 @@ $rrd_def = RrdDefinition::make() ->addDataset('dhcp_free', 'GAUGE', 0); $fields = [ - 'dhcp_total' => $dhcp_total, - 'dhcp_active' => $dhcp_active, - 'dhcp_expired' => $dhcp_expired, - 'dhcp_released' => $dhcp_released, + 'dhcp_total' => $dhcp_total, + 'dhcp_active' => $dhcp_active, + 'dhcp_expired' => $dhcp_expired, + 'dhcp_released' => $dhcp_released, 'dhcp_abandoned' => $dhcp_abandoned, - 'dhcp_reset' => $dhcp_reset, - 'dhcp_bootp' => $dhcp_bootp, - 'dhcp_backup' => $dhcp_backup, - 'dhcp_free' => $dhcp_free, + 'dhcp_reset' => $dhcp_reset, + 'dhcp_bootp' => $dhcp_bootp, + 'dhcp_backup' => $dhcp_backup, + 'dhcp_free' => $dhcp_free, ]; $metrics[$name . '_' . $category] = $fields; @@ -99,7 +99,7 @@ if ($version == 2) { $fields = [ 'current' => $dhcp_current, - 'max' => $dhcp_max, + 'max' => $dhcp_max, 'percent' => $dhcp_percent, ]; @@ -126,7 +126,7 @@ if ($version == 2) { $fields = [ 'current' => $dhcp_current, - 'max' => $dhcp_max, + 'max' => $dhcp_max, 'percent' => $dhcp_percent, ]; diff --git a/includes/polling/applications/drbd.inc.php b/includes/polling/applications/drbd.inc.php index 0f3f239835..007e0d7ab2 100644 --- a/includes/polling/applications/drbd.inc.php +++ b/includes/polling/applications/drbd.inc.php @@ -26,16 +26,16 @@ $rrd_def = RrdDefinition::make() ->addDataset('oos', 'GAUGE', 0, 125000000000); $fields = [ - 'ns' => $drbd['ns'], - 'nr' => $drbd['nr'], - 'dw' => $drbd['dw'], - 'dr' => $drbd['dr'], - 'al' => $drbd['al'], - 'bm' => $drbd['bm'], - 'lo' => $drbd['lo'], - 'pe' => $drbd['pe'], - 'ua' => $drbd['ua'], - 'ap' => $drbd['ap'], + 'ns' => $drbd['ns'], + 'nr' => $drbd['nr'], + 'dw' => $drbd['dw'], + 'dr' => $drbd['dr'], + 'al' => $drbd['al'], + 'bm' => $drbd['bm'], + 'lo' => $drbd['lo'], + 'pe' => $drbd['pe'], + 'ua' => $drbd['ua'], + 'ap' => $drbd['ap'], 'oos' => $drbd['oos'], ]; diff --git a/includes/polling/applications/logsize.inc.php b/includes/polling/applications/logsize.inc.php index e4264ce5c5..9b19255cfb 100644 --- a/includes/polling/applications/logsize.inc.php +++ b/includes/polling/applications/logsize.inc.php @@ -28,7 +28,7 @@ $set_rrd_def = RrdDefinition::make() ->addDataset('min_size', 'GAUGE') ->addDataset('size', 'GAUGE'); -$app_data = ['sets'=>[], 'no_minus_d'=>$data['no_minus_d']]; +$app_data = ['sets' => [], 'no_minus_d' => $data['no_minus_d']]; $rrd_name = ['app', $name, $app->app_id]; $fields = [ diff --git a/includes/polling/applications/mailscanner.inc.php b/includes/polling/applications/mailscanner.inc.php index f83f1cc696..504247765d 100644 --- a/includes/polling/applications/mailscanner.inc.php +++ b/includes/polling/applications/mailscanner.inc.php @@ -22,13 +22,13 @@ $rrd_def = RrdDefinition::make() ->addDataset('virus', 'COUNTER', 0, 125000000000); $fields = [ - 'msg_recv' => $msg_recv, + 'msg_recv' => $msg_recv, 'msg_rejected' => $msg_rejected, - 'msg_relay' => $msg_relay, - 'msg_sent' => $msg_sent, - 'msg_waiting' => $msg_waiting, - 'spam' => $spam, - 'virus' => $virus, + 'msg_relay' => $msg_relay, + 'msg_sent' => $msg_sent, + 'msg_waiting' => $msg_waiting, + 'spam' => $spam, + 'virus' => $virus, ]; $tags = [ diff --git a/includes/polling/applications/mdadm.inc.php b/includes/polling/applications/mdadm.inc.php index 5fa8b0cd3f..4331cf4199 100644 --- a/includes/polling/applications/mdadm.inc.php +++ b/includes/polling/applications/mdadm.inc.php @@ -46,12 +46,12 @@ foreach ($mdadm_data as $data) { $array_level = str_replace('raid', '', $level); $fields = [ - 'level' => $array_level, - 'size' => $size, - 'disc_count' => $disc_count, + 'level' => $array_level, + 'size' => $size, + 'disc_count' => $disc_count, 'hotspare_count' => $hotspare_count, - 'degraded' => $degraded, - 'sync_speed' => $sync_speed, + 'degraded' => $degraded, + 'sync_speed' => $sync_speed, 'sync_completed' => $sync_completed, ]; diff --git a/includes/polling/applications/memcached.inc.php b/includes/polling/applications/memcached.inc.php index 02b7dfb613..fb42e221ae 100644 --- a/includes/polling/applications/memcached.inc.php +++ b/includes/polling/applications/memcached.inc.php @@ -43,24 +43,24 @@ $rrd_def = RrdDefinition::make() ->addDataset('bytes_written', 'DERIVE', 0, 125000000000); $fields = [ - 'uptime' => $data['uptime'] ?? null, - 'threads' => $data['threads'] ?? null, - 'rusage_user_ms' => $data['rusage_user_microseconds'] ?? null, - 'rusage_system_ms' => $data['rusage_system_microseconds'] ?? null, - 'curr_items' => $data['curr_items'] ?? null, - 'total_items' => $data['total_items'] ?? null, - 'limit_maxbytes' => $data['limit_maxbytes'] ?? null, - 'curr_connections' => $data['curr_connections'] ?? null, + 'uptime' => $data['uptime'] ?? null, + 'threads' => $data['threads'] ?? null, + 'rusage_user_ms' => $data['rusage_user_microseconds'] ?? null, + 'rusage_system_ms' => $data['rusage_system_microseconds'] ?? null, + 'curr_items' => $data['curr_items'] ?? null, + 'total_items' => $data['total_items'] ?? null, + 'limit_maxbytes' => $data['limit_maxbytes'] ?? null, + 'curr_connections' => $data['curr_connections'] ?? null, 'total_connections' => $data['total_connections'] ?? null, - 'conn_structures' => $data['connection_structures'] ?? null, - 'bytes' => $data['bytes'] ?? null, - 'cmd_get' => $data['cmd_get'] ?? null, - 'cmd_set' => $data['cmd_set'] ?? null, - 'get_hits' => $data['get_hits'] ?? null, - 'get_misses' => $data['get_misses'] ?? null, - 'evictions' => $data['evictions'] ?? null, - 'bytes_read' => $data['bytes_read'] ?? null, - 'bytes_written' => $data['bytes_written'] ?? null, + 'conn_structures' => $data['connection_structures'] ?? null, + 'bytes' => $data['bytes'] ?? null, + 'cmd_get' => $data['cmd_get'] ?? null, + 'cmd_set' => $data['cmd_set'] ?? null, + 'get_hits' => $data['get_hits'] ?? null, + 'get_misses' => $data['get_misses'] ?? null, + 'evictions' => $data['evictions'] ?? null, + 'bytes_read' => $data['bytes_read'] ?? null, + 'bytes_written' => $data['bytes_written'] ?? null, ]; $tags = [ diff --git a/includes/polling/applications/mysql.inc.php b/includes/polling/applications/mysql.inc.php index fe03a9976d..aa6d87f801 100644 --- a/includes/polling/applications/mysql.inc.php +++ b/includes/polling/applications/mysql.inc.php @@ -17,85 +17,85 @@ $metrics = []; // General Stats $mapping = [ 'IDBLBSe' => 'cr', - 'IBLFh' => 'ct', - 'IBLWn' => 'cu', - 'SRows' => 'ck', - 'SRange' => 'cj', - 'SMPs' => 'ci', - 'SScan' => 'cl', - 'IBIRd' => 'ai', - 'IBIWr' => 'aj', - 'IBILg' => 'ak', - 'IBIFSc' => 'ah', - 'IDBRDd' => 'b2', - 'IDBRId' => 'b0', - 'IDBRRd' => 'b3', - 'IDBRUd' => 'b1', - 'IBRd' => 'ae', - 'IBCd' => 'af', - 'IBWr' => 'ag', - 'TLIe' => 'b5', - 'TLWd' => 'b4', - 'IBPse' => 'aa', - 'IBPDBp' => 'ac', - 'IBPFe' => 'ab', - 'IBPMps' => 'ad', - 'TOC' => 'bc', - 'OFs' => 'b7', - 'OTs' => 'b8', - 'OdTs' => 'b9', - 'IBSRs' => 'ay', - 'IBSWs' => 'ax', - 'IBOWs' => 'az', - 'QCs' => 'c1', - 'QCeFy' => 'bu', - 'MaCs' => 'bl', - 'MUCs' => 'bf', - 'ACs' => 'bd', - 'AdCs' => 'be', - 'TCd' => 'bi', - 'Cs' => 'bn', - 'IBTNx' => 'a5', - 'KRRs' => 'a0', - 'KRs' => 'a1', - 'KWR' => 'a2', - 'KWs' => 'a3', - 'QCQICe' => 'bz', - 'QCHs' => 'bv', - 'QCIs' => 'bw', - 'QCNCd' => 'by', - 'QCLMPs' => 'bx', + 'IBLFh' => 'ct', + 'IBLWn' => 'cu', + 'SRows' => 'ck', + 'SRange' => 'cj', + 'SMPs' => 'ci', + 'SScan' => 'cl', + 'IBIRd' => 'ai', + 'IBIWr' => 'aj', + 'IBILg' => 'ak', + 'IBIFSc' => 'ah', + 'IDBRDd' => 'b2', + 'IDBRId' => 'b0', + 'IDBRRd' => 'b3', + 'IDBRUd' => 'b1', + 'IBRd' => 'ae', + 'IBCd' => 'af', + 'IBWr' => 'ag', + 'TLIe' => 'b5', + 'TLWd' => 'b4', + 'IBPse' => 'aa', + 'IBPDBp' => 'ac', + 'IBPFe' => 'ab', + 'IBPMps' => 'ad', + 'TOC' => 'bc', + 'OFs' => 'b7', + 'OTs' => 'b8', + 'OdTs' => 'b9', + 'IBSRs' => 'ay', + 'IBSWs' => 'ax', + 'IBOWs' => 'az', + 'QCs' => 'c1', + 'QCeFy' => 'bu', + 'MaCs' => 'bl', + 'MUCs' => 'bf', + 'ACs' => 'bd', + 'AdCs' => 'be', + 'TCd' => 'bi', + 'Cs' => 'bn', + 'IBTNx' => 'a5', + 'KRRs' => 'a0', + 'KRs' => 'a1', + 'KWR' => 'a2', + 'KWs' => 'a3', + 'QCQICe' => 'bz', + 'QCHs' => 'bv', + 'QCIs' => 'bw', + 'QCNCd' => 'by', + 'QCLMPs' => 'bx', 'CTMPDTs' => 'cn', - 'CTMPTs' => 'cm', - 'CTMPFs' => 'co', - 'IBIIs' => 'au', - 'IBIMRd' => 'av', - 'IBIMs' => 'aw', - 'IBILog' => 'al', - 'IBISc' => 'am', - 'IBIFLg' => 'an', - 'IBFBl' => 'aq', - 'IBIIAo' => 'ap', - 'IBIAd' => 'as', - 'IBIAe' => 'at', - 'SFJn' => 'cd', - 'SFRJn' => 'ce', - 'SRe' => 'cf', - 'SRCk' => 'cg', - 'SSn' => 'ch', - 'SQs' => 'b6', - 'BRd' => 'cq', - 'BSt' => 'cp', - 'CDe' => 'c6', - 'CIt' => 'c4', - 'CISt' => 'ca', - 'CLd' => 'c8', - 'CRe' => 'c7', - 'CRSt' => 'cc', - 'CSt' => 'c5', - 'CUe' => 'c3', - 'CUMi' => 'c9', - 'SlLa' => 'br', + 'CTMPTs' => 'cm', + 'CTMPFs' => 'co', + 'IBIIs' => 'au', + 'IBIMRd' => 'av', + 'IBIMs' => 'aw', + 'IBILog' => 'al', + 'IBISc' => 'am', + 'IBIFLg' => 'an', + 'IBFBl' => 'aq', + 'IBIIAo' => 'ap', + 'IBIAd' => 'as', + 'IBIAe' => 'at', + 'SFJn' => 'cd', + 'SFRJn' => 'ce', + 'SRe' => 'cf', + 'SRCk' => 'cg', + 'SSn' => 'ch', + 'SQs' => 'b6', + 'BRd' => 'cq', + 'BSt' => 'cp', + 'CDe' => 'c6', + 'CIt' => 'c4', + 'CISt' => 'ca', + 'CLd' => 'c8', + 'CRe' => 'c7', + 'CRSt' => 'cc', + 'CSt' => 'c5', + 'CUe' => 'c3', + 'CUMi' => 'c9', + 'SlLa' => 'br', ]; $data = explode("\n", $mysql); @@ -211,22 +211,22 @@ data_update($device, 'app', $tags, $fields); // Process state statistics $mapping_status = [ - 'State_closing_tables' => 'd2', + 'State_closing_tables' => 'd2', 'State_copying_to_tmp_table' => 'd3', - 'State_end' => 'd4', - 'State_freeing_items' => 'd5', - 'State_init' => 'd6', - 'State_locked' => 'd7', - 'State_login' => 'd8', - 'State_preparing' => 'd9', - 'State_reading_from_net' => 'da', - 'State_sending_data' => 'db', - 'State_sorting_result' => 'dc', - 'State_statistics' => 'dd', - 'State_updating' => 'de', - 'State_writing_to_net' => 'df', - 'State_none' => 'dg', - 'State_other' => 'dh', + 'State_end' => 'd4', + 'State_freeing_items' => 'd5', + 'State_init' => 'd6', + 'State_locked' => 'd7', + 'State_login' => 'd8', + 'State_preparing' => 'd9', + 'State_reading_from_net' => 'da', + 'State_sending_data' => 'db', + 'State_sorting_result' => 'dc', + 'State_statistics' => 'dd', + 'State_updating' => 'de', + 'State_writing_to_net' => 'df', + 'State_none' => 'dg', + 'State_other' => 'dh', ]; $rrd_def = new RrdDefinition(); diff --git a/includes/polling/applications/nginx.inc.php b/includes/polling/applications/nginx.inc.php index c675e8bf7f..eb03a3a674 100644 --- a/includes/polling/applications/nginx.inc.php +++ b/includes/polling/applications/nginx.inc.php @@ -29,10 +29,10 @@ $rrd_def = RrdDefinition::make() $fields = [ 'Requests' => $req, - 'Active' => $active, - 'Reading' => $reading, - 'Writing' => $writing, - 'Waiting' => $waiting, + 'Active' => $active, + 'Reading' => $reading, + 'Writing' => $writing, + 'Waiting' => $waiting, ]; $tags = [ diff --git a/includes/polling/applications/ntp-server.inc.php b/includes/polling/applications/ntp-server.inc.php index 809b35d8da..f16445507a 100644 --- a/includes/polling/applications/ntp-server.inc.php +++ b/includes/polling/applications/ntp-server.inc.php @@ -44,20 +44,20 @@ $rrd_def = RrdDefinition::make() ->addDataset('packets_sent', 'DERIVE', 0, 125000000000); $fields = [ - 'stratum' => $ntp['data']['stratum'], - 'offset' => $ntp['data']['offset'], - 'frequency' => $ntp['data']['frequency'], - 'jitter' => $ntp['data']['sys_jitter'], - 'noise' => $ntp['data']['clk_jitter'], - 'stability' => $ntp['data']['clk_wander'], - 'uptime' => $ntp['data']['time_since_reset'], - 'buffer_recv' => $ntp['data']['receive_buffers'], - 'buffer_free' => $ntp['data']['free_receive_buffers'], - 'buffer_used' => $ntp['data']['used_receive_buffers'], - 'packets_drop' => $ntp['data']['dropped_packets'], + 'stratum' => $ntp['data']['stratum'], + 'offset' => $ntp['data']['offset'], + 'frequency' => $ntp['data']['frequency'], + 'jitter' => $ntp['data']['sys_jitter'], + 'noise' => $ntp['data']['clk_jitter'], + 'stability' => $ntp['data']['clk_wander'], + 'uptime' => $ntp['data']['time_since_reset'], + 'buffer_recv' => $ntp['data']['receive_buffers'], + 'buffer_free' => $ntp['data']['free_receive_buffers'], + 'buffer_used' => $ntp['data']['used_receive_buffers'], + 'packets_drop' => $ntp['data']['dropped_packets'], 'packets_ignore' => $ntp['data']['ignored_packets'], - 'packets_recv' => $ntp['data']['received_packets'], - 'packets_sent' => $ntp['data']['packets_sent'], + 'packets_recv' => $ntp['data']['received_packets'], + 'packets_sent' => $ntp['data']['packets_sent'], ]; $tags = [ diff --git a/includes/polling/applications/postfix.inc.php b/includes/polling/applications/postfix.inc.php index 027bbc8561..d014e45f75 100644 --- a/includes/polling/applications/postfix.inc.php +++ b/includes/polling/applications/postfix.inc.php @@ -72,7 +72,7 @@ $fields = [ 'senders' => $senders, 'sendinghd' => $sendinghd, 'recipients' => $recipients, - 'recipienthd'=> $recipienthd, + 'recipienthd' => $recipienthd, 'deferralcr' => $deferralcr, 'deferralhid' => $deferralhid, 'chr' => $chr, diff --git a/includes/polling/applications/powermon.inc.php b/includes/polling/applications/powermon.inc.php index 163d45fe6b..2f0d94fd25 100644 --- a/includes/polling/applications/powermon.inc.php +++ b/includes/polling/applications/powermon.inc.php @@ -40,9 +40,9 @@ $rrd_def = RrdDefinition::make() ->addDataset('rate', 'GAUGE', 0); $fields = [ - 'watts-gauge' => $result['data']['reading'], - 'watts-abs' => $result['data']['reading'], - 'rate' => $result['data']['supply']['rate'], + 'watts-gauge' => $result['data']['reading'], + 'watts-abs' => $result['data']['reading'], + 'rate' => $result['data']['supply']['rate'], ]; /* diff --git a/includes/polling/applications/pwrstatd.inc.php b/includes/polling/applications/pwrstatd.inc.php index 9d3aaec71e..0f52bccc9e 100644 --- a/includes/polling/applications/pwrstatd.inc.php +++ b/includes/polling/applications/pwrstatd.inc.php @@ -51,14 +51,14 @@ foreach ($pwrstatd_data as $data) { $rrd_name = ['app', $name, $app->app_id, $sn]; $fields = [ - 'mruntime' => $mruntime, + 'mruntime' => $mruntime, 'pcapacity' => $pcapacity, - 'pload' => $pload, - 'voutput' => $voutput, - 'vrating' => $vrating, - 'vutility' => $vutility, - 'wload' => $wload, - 'wrating' => $wrating, + 'pload' => $pload, + 'voutput' => $voutput, + 'vrating' => $vrating, + 'vutility' => $vutility, + 'wload' => $wload, + 'wrating' => $wrating, ]; $metrics[$sn] = $fields; diff --git a/includes/polling/applications/redis.inc.php b/includes/polling/applications/redis.inc.php index d4e522d0c9..ab04adcfa4 100644 --- a/includes/polling/applications/redis.inc.php +++ b/includes/polling/applications/redis.inc.php @@ -36,7 +36,7 @@ $metrics = []; $category = 'clients'; $fields = [ 'connected' => $client_data['connected_clients'], - 'blocked' => $client_data['blocked_clients'], + 'blocked' => $client_data['blocked_clients'], ]; $rrd_def = RrdDefinition::make() ->addDataset('connected', 'GAUGE', 0) @@ -50,10 +50,10 @@ data_update($device, 'app', $tags, $fields); $category = 'memory'; $fields = [ 'active' => $memory_data['allocator'], - 'allocated' => $memory_data['allocator_allocated'], - 'resident' => $memory_data['allocator_resident'], - 'frag_bytes' => $memory_data['allocator_frag_bytes'], - 'rss_bytes' => $memory_data['allocator_rss_bytes'], + 'allocated' => $memory_data['allocator_allocated'], + 'resident' => $memory_data['allocator_resident'], + 'frag_bytes' => $memory_data['allocator_frag_bytes'], + 'rss_bytes' => $memory_data['allocator_rss_bytes'], ]; $rrd_def = RrdDefinition::make() ->addDataset('active', 'GAUGE', 0) @@ -120,9 +120,9 @@ data_update($device, 'app', $tags, $fields); $category = 'defrag'; $fields = [ 'hits' => $stats_data['active_defrag_hits'], - 'misses' => $stats_data['active_defrag_misses'], - 'key_hits' => $stats_data['active_defrag_key_hits'], - 'key_misses' => $stats_data['active_defrag_key_misses'], + 'misses' => $stats_data['active_defrag_misses'], + 'key_hits' => $stats_data['active_defrag_key_hits'], + 'key_misses' => $stats_data['active_defrag_key_misses'], ]; $rrd_def = RrdDefinition::make() ->addDataset('hits', 'GAUGE', 0) @@ -138,7 +138,7 @@ data_update($device, 'app', $tags, $fields); $category = 'keyspace'; $fields = [ 'hits' => $stats_data['keyspace_hits'], - 'misses' => $stats_data['keyspace_misses'], + 'misses' => $stats_data['keyspace_misses'], ]; $rrd_def = RrdDefinition::make() ->addDataset('hits', 'COUNTER', 0) diff --git a/includes/polling/applications/sagan.inc.php b/includes/polling/applications/sagan.inc.php index b91d73f792..285dfab530 100644 --- a/includes/polling/applications/sagan.inc.php +++ b/includes/polling/applications/sagan.inc.php @@ -19,7 +19,7 @@ try { } // grab the alert here as it is the global one -$metrics = ['alert'=>$sagan['alert']]; +$metrics = ['alert' => $sagan['alert']]; $rrd_def = RrdDefinition::make() ->addDataset('after', 'GAUGE', 0) diff --git a/includes/polling/applications/seafile.inc.php b/includes/polling/applications/seafile.inc.php index 0b49a902ec..8a45fbe83a 100644 --- a/includes/polling/applications/seafile.inc.php +++ b/includes/polling/applications/seafile.inc.php @@ -44,10 +44,10 @@ foreach ($account_data as $data) { $rrd_name = ['app', $name, $app->app_id, $category, $owner_name]; $fields = [ - 'enabled' => $enabled, - 'libraries' => $libraries, + 'enabled' => $enabled, + 'libraries' => $libraries, 'trashed_libraries' => $trashed_libraries, - 'size_consumption' => $size_consumption, + 'size_consumption' => $size_consumption, ]; $metrics[$owner_name . '_' . $category] = $fields; diff --git a/includes/polling/applications/shoutcast.inc.php b/includes/polling/applications/shoutcast.inc.php index 7190c3f44f..74ce8b003a 100644 --- a/includes/polling/applications/shoutcast.inc.php +++ b/includes/polling/applications/shoutcast.inc.php @@ -31,14 +31,14 @@ foreach ($servers as $item => $server) { ->addDataset('unique', 'GAUGE', 0, 125000000000); $fields = [ - 'bitrate' => $data['1'], - 'traf_in' => $data['2'], + 'bitrate' => $data['1'], + 'traf_in' => $data['2'], 'traf_out' => $data['3'], - 'current' => $data['4'], - 'status' => $data['5'], - 'peak' => $data['6'], - 'max' => $data['7'], - 'unique' => $data['8'], + 'current' => $data['4'], + 'status' => $data['5'], + 'peak' => $data['6'], + 'max' => $data['7'], + 'unique' => $data['8'], ]; $metrics[$server] = $fields; diff --git a/includes/polling/applications/suricata.inc.php b/includes/polling/applications/suricata.inc.php index f1f041bdd2..6075b378d6 100644 --- a/includes/polling/applications/suricata.inc.php +++ b/includes/polling/applications/suricata.inc.php @@ -14,7 +14,7 @@ try { } // grab the alert here as it is the global one -$metrics = ['alert'=>$suricata['alert']]; +$metrics = ['alert' => $suricata['alert']]; $rrd_def = RrdDefinition::make() ->addDataset('af_dcerpc_tcp', 'DERIVE', 0) diff --git a/includes/polling/applications/tinydns.inc.php b/includes/polling/applications/tinydns.inc.php index 6002297bb7..97efa52092 100644 --- a/includes/polling/applications/tinydns.inc.php +++ b/includes/polling/applications/tinydns.inc.php @@ -58,26 +58,26 @@ if (! empty($agent_data['app'][$name]) && $app->app_id > 0) { ] = explode(':', $agent_data['app'][$name]); $fields = [ - 'a' => $a, - 'ns' => $ns, - 'cname' => $cname, - 'soa' => $soa, - 'ptr' => $ptr, - 'hinfo' => $hinfo, - 'mx' => $mx, - 'txt' => $txt, - 'rp' => $rp, - 'sig' => $sig, - 'key' => $key, - 'aaaa' => $aaaa, - 'axfr' => $axfr, - 'any' => $any, - 'total' => $total, - 'other' => $other, - 'notauth' => $notauth, - 'notimpl' => $notimpl, + 'a' => $a, + 'ns' => $ns, + 'cname' => $cname, + 'soa' => $soa, + 'ptr' => $ptr, + 'hinfo' => $hinfo, + 'mx' => $mx, + 'txt' => $txt, + 'rp' => $rp, + 'sig' => $sig, + 'key' => $key, + 'aaaa' => $aaaa, + 'axfr' => $axfr, + 'any' => $any, + 'total' => $total, + 'other' => $other, + 'notauth' => $notauth, + 'notimpl' => $notimpl, 'badclass' => $badclass, - 'noquery' => $noquery, + 'noquery' => $noquery, ]; $tags = [ diff --git a/includes/polling/aruba-controller.inc.php b/includes/polling/aruba-controller.inc.php index c209903978..8c46b11486 100644 --- a/includes/polling/aruba-controller.inc.php +++ b/includes/polling/aruba-controller.inc.php @@ -52,7 +52,7 @@ if ($device['type'] == 'wireless' && $device['os'] == 'arubaos') { ->addDataset('NUMCLIENTS', 'GAUGE', 0, 12500000000); $fields = [ - 'NUMAPS' => $aruba_stats[0]['wlsxSwitchTotalNumAccessPoints'], + 'NUMAPS' => $aruba_stats[0]['wlsxSwitchTotalNumAccessPoints'], 'NUMCLIENTS' => $aruba_stats[0]['wlsxSwitchTotalNumStationsAssociated'], ]; @@ -104,13 +104,13 @@ if ($device['type'] == 'wireless' && $device['os'] == 'arubaos') { ->addDataset('interference', 'GAUGE', 0, 2000); $fields = [ - 'channel' => $channel, - 'txpow' => $txpow, - 'radioutil' => $radioutil, - 'nummonclients' => $nummonclients, - 'nummonbssid' => $nummonbssid, - 'numasoclients' => $numasoclients, - 'interference' => $interference, + 'channel' => $channel, + 'txpow' => $txpow, + 'radioutil' => $radioutil, + 'nummonclients' => $nummonclients, + 'nummonbssid' => $nummonbssid, + 'numasoclients' => $numasoclients, + 'interference' => $interference, ]; $tags = [ @@ -145,39 +145,39 @@ if ($device['type'] == 'wireless' && $device['os'] == 'arubaos') { if ($foundid == 0) { $ap_id = dbInsert( [ - 'channel' => $channel, - 'deleted' => 0, - 'device_id' => $device['device_id'], - 'interference' => $interference, - 'mac_addr' => $mac, - 'name' => $name, - 'numactbssid' => $numactbssid, + 'channel' => $channel, + 'deleted' => 0, + 'device_id' => $device['device_id'], + 'interference' => $interference, + 'mac_addr' => $mac, + 'name' => $name, + 'numactbssid' => $numactbssid, 'numasoclients' => $numasoclients, - 'nummonbssid' => $nummonbssid, + 'nummonbssid' => $nummonbssid, 'nummonclients' => $nummonclients, - 'radio_number' => $radionum, - 'radioutil' => $radioutil, - 'txpow' => $txpow, - 'type' => $type, + 'radio_number' => $radionum, + 'radioutil' => $radioutil, + 'txpow' => $txpow, + 'type' => $type, ], 'access_points' ); } else { dbUpdate( [ - 'channel' => $channel, - 'deleted' => 0, - 'interference' => $interference, - 'mac_addr' => $mac, - 'name' => $name, - 'numactbssid' => $numactbssid, + 'channel' => $channel, + 'deleted' => 0, + 'interference' => $interference, + 'mac_addr' => $mac, + 'name' => $name, + 'numactbssid' => $numactbssid, 'numasoclients' => $numasoclients, - 'nummonbssid' => $nummonbssid, + 'nummonbssid' => $nummonbssid, 'nummonclients' => $nummonclients, - 'radio_number' => $radionum, - 'radioutil' => $radioutil, - 'txpow' => $txpow, - 'type' => $type, + 'radio_number' => $radionum, + 'radioutil' => $radioutil, + 'txpow' => $txpow, + 'type' => $type, ], 'access_points', '`accesspoint_id` = ?', diff --git a/includes/polling/bgp-peers.inc.php b/includes/polling/bgp-peers.inc.php index bed7730cbe..e4ac30a749 100644 --- a/includes/polling/bgp-peers.inc.php +++ b/includes/polling/bgp-peers.inc.php @@ -729,14 +729,14 @@ if (! empty($peers)) { $cbgpPeerWithdrawnPrefixes = set_numeric($cbgpPeerWithdrawnPrefixes); $cbgpPeers_cbgp_fields = [ - 'AcceptedPrefixes' => $cbgpPeerAcceptedPrefixes, - 'DeniedPrefixes' => $cbgpPeerDeniedPrefixes, - 'PrefixAdminLimit' => $cbgpPeerPrefixAdminLimit, - 'PrefixThreshold' => $cbgpPeerPrefixThreshold, + 'AcceptedPrefixes' => $cbgpPeerAcceptedPrefixes, + 'DeniedPrefixes' => $cbgpPeerDeniedPrefixes, + 'PrefixAdminLimit' => $cbgpPeerPrefixAdminLimit, + 'PrefixThreshold' => $cbgpPeerPrefixThreshold, 'PrefixClearThreshold' => $cbgpPeerPrefixClearThreshold, - 'AdvertisedPrefixes' => $cbgpPeerAdvertisedPrefixes, - 'SuppressedPrefixes' => $cbgpPeerSuppressedPrefixes, - 'WithdrawnPrefixes' => $cbgpPeerWithdrawnPrefixes, + 'AdvertisedPrefixes' => $cbgpPeerAdvertisedPrefixes, + 'SuppressedPrefixes' => $cbgpPeerSuppressedPrefixes, + 'WithdrawnPrefixes' => $cbgpPeerWithdrawnPrefixes, ]; foreach ($cbgpPeers_cbgp_fields as $field => $value) { @@ -781,11 +781,11 @@ if (! empty($peers)) { ->addDataset('SuppressedPrefixes', 'GAUGE', null, 100000000000) ->addDataset('WithdrawnPrefixes', 'GAUGE', null, 100000000000); $fields = [ - 'AcceptedPrefixes' => $cbgpPeerAcceptedPrefixes, - 'DeniedPrefixes' => $cbgpPeerDeniedPrefixes, - 'AdvertisedPrefixes' => $cbgpPeerAdvertisedPrefixes, - 'SuppressedPrefixes' => $cbgpPeerSuppressedPrefixes, - 'WithdrawnPrefixes' => $cbgpPeerWithdrawnPrefixes, + 'AcceptedPrefixes' => $cbgpPeerAcceptedPrefixes, + 'DeniedPrefixes' => $cbgpPeerDeniedPrefixes, + 'AdvertisedPrefixes' => $cbgpPeerAdvertisedPrefixes, + 'SuppressedPrefixes' => $cbgpPeerSuppressedPrefixes, + 'WithdrawnPrefixes' => $cbgpPeerWithdrawnPrefixes, ]; $tags = [ diff --git a/includes/polling/cisco-cef.inc.php b/includes/polling/cisco-cef.inc.php index 41842cb45b..6b82d3b4cc 100644 --- a/includes/polling/cisco-cef.inc.php +++ b/includes/polling/cisco-cef.inc.php @@ -78,9 +78,9 @@ if ($device['os_group'] == 'cisco') { dbUpdate($cef_stat['update'], 'cef_switching', '`device_id` = ? AND `entPhysicalIndex` = ? AND `afi` = ? AND `cef_index` = ?', [$device['device_id'], $entity, $afi, $index]); $fields = [ - 'drop' => $cef_stat['cefSwitchingDrop'], - 'punt' => $cef_stat['cefSwitchingPunt'], - 'hostpunt' => $cef_stat['cefSwitchingPunt2Host'], + 'drop' => $cef_stat['cefSwitchingDrop'], + 'punt' => $cef_stat['cefSwitchingPunt'], + 'hostpunt' => $cef_stat['cefSwitchingPunt2Host'], ]; $tags = compact('entity', 'afi', 'index', 'rrd_name', 'rrd_def'); diff --git a/includes/polling/cisco-ipsec-flow-monitor.inc.php b/includes/polling/cisco-ipsec-flow-monitor.inc.php index b1012e89e3..5f4b7c0f28 100644 --- a/includes/polling/cisco-ipsec-flow-monitor.inc.php +++ b/includes/polling/cisco-ipsec-flow-monitor.inc.php @@ -79,27 +79,27 @@ if ($device['os_group'] == 'cisco') { ->addDataset('SysCapFails', 'COUNTER', 0, 100000000000); $fields = [ - 'Tunnels' => $data['cipSecGlobalActiveTunnels'], - 'InOctets' => $data['cipSecGlobalInOctets'], - 'OutOctets' => $data['cipSecGlobalOutOctets'], - 'InDecompOctets' => $data['cipSecGlobalInDecompOctets'], - 'OutUncompOctets' => $data['cipSecGlobalOutUncompOctets'], - 'InPkts' => $data['cipSecGlobalInPkts'], - 'OutPkts' => $data['cipSecGlobalOutPkts'], - 'InDrops' => $data['cipSecGlobalInDrops'], - 'InReplayDrops' => $data['cipSecGlobalInReplayDrops'], - 'OutDrops' => $data['cipSecGlobalOutDrops'], - 'InAuths' => $data['cipSecGlobalInAuths'], - 'OutAuths' => $data['cipSecGlobalOutAuths'], - 'InAuthFails' => $data['cipSecGlobalInAuthFails'], - 'OutAuthFails' => $data['cipSecGlobalOutAuthFails'], - 'InDencrypts' => $data['cipSecGlobalInDecrypts'], - 'OutEncrypts' => $data['cipSecGlobalOutEncrypts'], - 'InDecryptFails' => $data['cipSecGlobalInDecryptFails'], - 'OutEncryptFails' => $data['cipSecGlobalOutEncryptFails'], + 'Tunnels' => $data['cipSecGlobalActiveTunnels'], + 'InOctets' => $data['cipSecGlobalInOctets'], + 'OutOctets' => $data['cipSecGlobalOutOctets'], + 'InDecompOctets' => $data['cipSecGlobalInDecompOctets'], + 'OutUncompOctets' => $data['cipSecGlobalOutUncompOctets'], + 'InPkts' => $data['cipSecGlobalInPkts'], + 'OutPkts' => $data['cipSecGlobalOutPkts'], + 'InDrops' => $data['cipSecGlobalInDrops'], + 'InReplayDrops' => $data['cipSecGlobalInReplayDrops'], + 'OutDrops' => $data['cipSecGlobalOutDrops'], + 'InAuths' => $data['cipSecGlobalInAuths'], + 'OutAuths' => $data['cipSecGlobalOutAuths'], + 'InAuthFails' => $data['cipSecGlobalInAuthFails'], + 'OutAuthFails' => $data['cipSecGlobalOutAuthFails'], + 'InDencrypts' => $data['cipSecGlobalInDecrypts'], + 'OutEncrypts' => $data['cipSecGlobalOutEncrypts'], + 'InDecryptFails' => $data['cipSecGlobalInDecryptFails'], + 'OutEncryptFails' => $data['cipSecGlobalOutEncryptFails'], 'ProtocolUseFails' => $data['cipSecGlobalProtocolUseFails'], - 'NoSaFails' => $data['cipSecGlobalNoSaFails'], - 'SysCapFails' => $data['cipSecGlobalSysCapFails'], + 'NoSaFails' => $data['cipSecGlobalNoSaFails'], + 'SysCapFails' => $data['cipSecGlobalSysCapFails'], ]; $tags = compact('rrd_def'); diff --git a/includes/polling/cisco-remote-access-monitor.inc.php b/includes/polling/cisco-remote-access-monitor.inc.php index 7cad68baed..8e61938787 100644 --- a/includes/polling/cisco-remote-access-monitor.inc.php +++ b/includes/polling/cisco-remote-access-monitor.inc.php @@ -53,12 +53,12 @@ if ($device['os_group'] == 'cisco') { ->addDataset('webvpn', 'GAUGE', 0); $fields = [ - 'email' => $data['crasEmailNumSessions'], - 'ipsec' => $data['crasIPSecNumSessions'], - 'l2l' => $data['crasL2LNumSessions'], - 'lb' => $data['crasLBNumSessions'], - 'svc' => $data['crasSVCNumSessions'], - 'webvpn' => $data['crasWebvpnNumSessions'], + 'email' => $data['crasEmailNumSessions'], + 'ipsec' => $data['crasIPSecNumSessions'], + 'l2l' => $data['crasL2LNumSessions'], + 'lb' => $data['crasLBNumSessions'], + 'svc' => $data['crasSVCNumSessions'], + 'webvpn' => $data['crasWebvpnNumSessions'], ]; $tags = compact('rrd_def'); diff --git a/includes/polling/cisco-voice/cisco-iosmtp.inc.php b/includes/polling/cisco-voice/cisco-iosmtp.inc.php index ea6b682af9..519f0fddad 100644 --- a/includes/polling/cisco-voice/cisco-iosmtp.inc.php +++ b/includes/polling/cisco-voice/cisco-iosmtp.inc.php @@ -31,7 +31,7 @@ if ($device['os_group'] == 'cisco') { ->addDataset('active', 'GAUGE', 0); $fields = [ - 'total' => $total, + 'total' => $total, 'active' => $active, ]; diff --git a/includes/polling/cisco-voice/cisco-iosxcode.inc.php b/includes/polling/cisco-voice/cisco-iosxcode.inc.php index 2d24c50b28..d3ca17c882 100644 --- a/includes/polling/cisco-voice/cisco-iosxcode.inc.php +++ b/includes/polling/cisco-voice/cisco-iosxcode.inc.php @@ -31,7 +31,7 @@ if ($device['os_group'] == 'cisco') { ->addDataset('active', 'GAUGE', 0); $fields = [ - 'total' => $total, + 'total' => $total, 'active' => $active, ]; diff --git a/includes/polling/cisco-vpdn.inc.php b/includes/polling/cisco-vpdn.inc.php index 469705586e..aa1a653598 100644 --- a/includes/polling/cisco-vpdn.inc.php +++ b/includes/polling/cisco-vpdn.inc.php @@ -21,9 +21,9 @@ if ($device['os_group'] == 'cisco') { ->addDataset('denied', 'COUNTER', 0, 100000); $fields = [ - 'tunnels' => $vpdn['cvpdnSystemTunnelTotal'], - 'sessions' => $vpdn['cvpdnSystemSessionTotal'], - 'denied' => $vpdn['cvpdnSystemDeniedUsersTotal'], + 'tunnels' => $vpdn['cvpdnSystemTunnelTotal'], + 'sessions' => $vpdn['cvpdnSystemSessionTotal'], + 'denied' => $vpdn['cvpdnSystemDeniedUsersTotal'], ]; $tags = compact('type', 'rrd_name', 'rrd_def'); diff --git a/includes/polling/entity-physical/cimc.inc.php b/includes/polling/entity-physical/cimc.inc.php index 7a1277a448..e7bc89d4a5 100644 --- a/includes/polling/entity-physical/cimc.inc.php +++ b/includes/polling/entity-physical/cimc.inc.php @@ -12,7 +12,7 @@ */ $component = new LibreNMS\Component(); -$components = $component->getComponents($device['device_id'], ['type'=>'Cisco-CIMC']); +$components = $component->getComponents($device['device_id'], ['type' => 'Cisco-CIMC']); // We only care about our device id. $components = $components[$device['device_id']]; diff --git a/includes/polling/entity-physical/ios.inc.php b/includes/polling/entity-physical/ios.inc.php index 948ec14d15..a02dc1590d 100644 --- a/includes/polling/entity-physical/ios.inc.php +++ b/includes/polling/entity-physical/ios.inc.php @@ -35,11 +35,11 @@ foreach ($chan_stats as $index => $entry) { ->addDataset('inerrors', 'DERIVE', 0, 125000000000); $fields = [ - 'inutil' => $entry['cc6kxbarStatisticsInUtil'], - 'oututil' => $entry['cc6kxbarStatisticsOutUtil'], - 'outdropped' => $entry['cc6kxbarStatisticsOutDropped'], - 'outerrors' => $entry['cc6kxbarStatisticsOutErrors'], - 'inerrors' => $entry['cc6kxbarStatisticsInErrors'], + 'inutil' => $entry['cc6kxbarStatisticsInUtil'], + 'oututil' => $entry['cc6kxbarStatisticsOutUtil'], + 'outdropped' => $entry['cc6kxbarStatisticsOutDropped'], + 'outerrors' => $entry['cc6kxbarStatisticsOutErrors'], + 'inerrors' => $entry['cc6kxbarStatisticsInErrors'], ]; $tags = compact('index', 'subindex', 'rrd_name', 'rrd_def'); diff --git a/includes/polling/functions.inc.php b/includes/polling/functions.inc.php index d64ce079d1..88eb46e767 100644 --- a/includes/polling/functions.inc.php +++ b/includes/polling/functions.inc.php @@ -135,36 +135,36 @@ function poll_sensor($device, $class) function record_sensor_data($device, $all_sensors) { $supported_sensors = [ - 'airflow' => 'cfm', - 'ber' => '', - 'bitrate' => 'bps', - 'charge' => '%', + 'airflow' => 'cfm', + 'ber' => '', + 'bitrate' => 'bps', + 'charge' => '%', 'chromatic_dispersion' => 'ps/nm', - 'cooling' => 'W', - 'count' => '', - 'current' => 'A', - 'delay' => 's', - 'dbm' => 'dBm', - 'eer' => 'eer', - 'fanspeed' => 'rpm', - 'frequency' => 'Hz', - 'humidity' => '%', - 'load' => '%', - 'loss' => '%', - 'percent' => '%', - 'power' => 'W', + 'cooling' => 'W', + 'count' => '', + 'current' => 'A', + 'delay' => 's', + 'dbm' => 'dBm', + 'eer' => 'eer', + 'fanspeed' => 'rpm', + 'frequency' => 'Hz', + 'humidity' => '%', + 'load' => '%', + 'loss' => '%', + 'percent' => '%', + 'power' => 'W', 'power_consumed' => 'kWh', - 'power_factor' => '', - 'pressure' => 'kPa', + 'power_factor' => '', + 'pressure' => 'kPa', 'quality_factor' => 'dB', - 'runtime' => 'Min', - 'signal' => 'dBm', - 'snr' => 'SNR', - 'state' => '#', - 'temperature' => 'C', - 'tv_signal' => 'dBmV', - 'voltage' => 'V', - 'waterflow' => 'l/m', + 'runtime' => 'Min', + 'signal' => 'dBm', + 'snr' => 'SNR', + 'state' => '#', + 'temperature' => 'C', + 'tv_signal' => 'dBmV', + 'voltage' => 'V', + 'waterflow' => 'l/m', ]; foreach ($all_sensors as $sensor) { diff --git a/includes/polling/junose-atm-vp.inc.php b/includes/polling/junose-atm-vp.inc.php index 471f961684..4431758c22 100644 --- a/includes/polling/junose-atm-vp.inc.php +++ b/includes/polling/junose-atm-vp.inc.php @@ -44,13 +44,13 @@ if (count($vp_rows)) { $rrd_name = ['vp', $ifIndex, $vp_id]; $fields = [ - 'incells' => $t_vp['juniAtmVpStatsInCells'], - 'outcells' => $t_vp['juniAtmVpStatsOutCells'], - 'inpackets' => $t_vp['juniAtmVpStatsInPackets'], - 'outpackets' => $t_vp['juniAtmVpStatsOutPackets'], - 'inpacketoctets' => $t_vp['juniAtmVpStatsInPacketOctets'], + 'incells' => $t_vp['juniAtmVpStatsInCells'], + 'outcells' => $t_vp['juniAtmVpStatsOutCells'], + 'inpackets' => $t_vp['juniAtmVpStatsInPackets'], + 'outpackets' => $t_vp['juniAtmVpStatsOutPackets'], + 'inpacketoctets' => $t_vp['juniAtmVpStatsInPacketOctets'], 'outpacketoctets' => $t_vp['juniAtmVpStatsOutPacketOctets'], - 'inpacketerrors' => $t_vp['juniAtmVpStatsInPacketErrors'], + 'inpacketerrors' => $t_vp['juniAtmVpStatsInPacketErrors'], 'outpacketerrors' => $t_vp['juniAtmVpStatsOutPacketErrors'], ]; diff --git a/includes/polling/netscaler-vsvr.inc.php b/includes/polling/netscaler-vsvr.inc.php index 83a6d51b38..1888bd1b40 100644 --- a/includes/polling/netscaler-vsvr.inc.php +++ b/includes/polling/netscaler-vsvr.inc.php @@ -101,13 +101,13 @@ if ($device['os'] == 'netscaler') { echo ' | ' . str_pad($vsvr['vsvrRequestRate'], 8) . ' | ' . str_pad($vsvr['vsvrRxBytesRate'] . 'B/s', 8) . ' | ' . str_pad($vsvr['vsvrTxBytesRate'] . 'B/s', 8); $db_update = [ - 'vsvr_ip' => $vsvr['vsvrIpAddress'], - 'vsvr_port' => $vsvr['vsvrPort'], - 'vsvr_state' => $vsvr['vsvrState'], - 'vsvr_type' => $vsvr['vsvrType'], + 'vsvr_ip' => $vsvr['vsvrIpAddress'], + 'vsvr_port' => $vsvr['vsvrPort'], + 'vsvr_state' => $vsvr['vsvrState'], + 'vsvr_type' => $vsvr['vsvrType'], 'vsvr_req_rate' => $vsvr['RequestRate'], - 'vsvr_bps_in' => $vsvr['vsvrRxBytesRate'], - 'vsvr_bps_out' => $vsvr['vsvrTxBytesRate'], + 'vsvr_bps_in' => $vsvr['vsvrRxBytesRate'], + 'vsvr_bps_out' => $vsvr['vsvrTxBytesRate'], ]; if (! is_array($vsvrs[$vsvr['vsvrFullName']])) { diff --git a/includes/polling/ports/os/cnmatrix.inc.php b/includes/polling/ports/os/cnmatrix.inc.php index 0037005a51..68d5e5e076 100644 --- a/includes/polling/ports/os/cnmatrix.inc.php +++ b/includes/polling/ports/os/cnmatrix.inc.php @@ -1,6 +1,6 @@ $port) { +foreach ($port_stats as $index => $port) { $port_stats[$index]['ifAlias'] = $int_desc[$index]['ifMainDesc']; } diff --git a/includes/polling/ports/os/infinera-groove.inc.php b/includes/polling/ports/os/infinera-groove.inc.php index 4d447b284f..c3b3b96e3d 100644 --- a/includes/polling/ports/os/infinera-groove.inc.php +++ b/includes/polling/ports/os/infinera-groove.inc.php @@ -33,19 +33,19 @@ foreach (['eth100g', 'eth40g', 'eth10g', 'fc16g', 'fc8g'] as $infineratype) { $cg_stats = snmpwalk_cache_multi_oid($device, $infineratype . 'Statistics', $cg_stats, 'CORIANT-GROOVE-MIB'); $required = [ - 'ifAlias' => $infineratype . 'AliasName', - 'ifAdminStatus' => $infineratype . 'AdminStatus', - 'ifOperStatus' => $infineratype . 'OperStatus', - 'ifType' => 'Ethernet', - 'ifHCInBroadcastPkts' => $infineratype . 'StatisticsEntryInBroadcastPackets', - 'ifHCInMulticastPkts' => $infineratype . 'StatisticsEntryInMulticastPackets', - 'ifHCInOctets' => $infineratype . 'StatisticsEntryInOctets', - 'ifHCInUcastPkts' => $infineratype . 'StatisticsEntryInPackets', - 'ifHCOutBroadcastPkts' => $infineratype . 'StatisticsEntryOutBroadcastPackets', - 'ifHCOutMulticastPkts' => $infineratype . 'StatisticsEntryOutMulticastPackets', - 'ifHCOutOctets' => $infineratype . 'StatisticsEntryOutOctets', - 'ifHCOutUcastPkts' => $infineratype . 'StatisticsEntryOutPackets', - 'ifHighSpeed' => $infspeed * 1000, + 'ifAlias' => $infineratype . 'AliasName', + 'ifAdminStatus' => $infineratype . 'AdminStatus', + 'ifOperStatus' => $infineratype . 'OperStatus', + 'ifType' => 'Ethernet', + 'ifHCInBroadcastPkts' => $infineratype . 'StatisticsEntryInBroadcastPackets', + 'ifHCInMulticastPkts' => $infineratype . 'StatisticsEntryInMulticastPackets', + 'ifHCInOctets' => $infineratype . 'StatisticsEntryInOctets', + 'ifHCInUcastPkts' => $infineratype . 'StatisticsEntryInPackets', + 'ifHCOutBroadcastPkts' => $infineratype . 'StatisticsEntryOutBroadcastPackets', + 'ifHCOutMulticastPkts' => $infineratype . 'StatisticsEntryOutMulticastPackets', + 'ifHCOutOctets' => $infineratype . 'StatisticsEntryOutOctets', + 'ifHCOutUcastPkts' => $infineratype . 'StatisticsEntryOutPackets', + 'ifHighSpeed' => $infspeed * 1000, ]; foreach ($cg_stats as $index => $tmp_stats) { diff --git a/includes/polling/ports/os/procera.inc.php b/includes/polling/ports/os/procera.inc.php index 16289ff5da..0e9a84d573 100644 --- a/includes/polling/ports/os/procera.inc.php +++ b/includes/polling/ports/os/procera.inc.php @@ -47,7 +47,7 @@ $required = [ // Media Types as per PACKETLOGIC-CHANNEL-MIB $mediaType = [ - 0 => ['ifDuplex' => null, 'ifSpeed' => 0, 'label'=> 'linkdown'], + 0 => ['ifDuplex' => null, 'ifSpeed' => 0, 'label' => 'linkdown'], 1 => ['ifDuplex' => 'halfDuplex', 'ifSpeed' => '10000000', 'label' => 'hd10'], 2 => ['ifDuplex' => 'fullDuplex', 'ifSpeed' => '10000000', 'label' => 'fd10'], 3 => ['ifDuplex' => 'halfDuplex', 'ifSpeed' => '100000000', 'label' => 'hd100'], diff --git a/includes/polling/ports/os/timos.inc.php b/includes/polling/ports/os/timos.inc.php index e8ab604b47..67dc5b50f5 100644 --- a/includes/polling/ports/os/timos.inc.php +++ b/includes/polling/ports/os/timos.inc.php @@ -45,16 +45,16 @@ foreach ($timos_vrf_stats as $vrf) { unset($timos_vrf_stats); $translate = [ - 'ifName' => 'vRtrIfName', - 'ifAlias' => 'vRtrIfAlias', - 'ifDescr' => 'vRtrIfDescription', - 'ifSpeed' => 'vRtrIfSpeed', - 'ifType' => 'vRtrIfType', - 'ifMtu' => 'vRtrIfMtu', - 'ifHCInOctets' => 'vRtrIfRxBytes', - 'ifHCOutOctets' => 'vRtrIfTxBytes', - 'ifHCInUcastPkts' => 'vRtrIfRxPkts', - 'ifHCOutUcastPkts' => 'vRtrIfTxPkts', + 'ifName' => 'vRtrIfName', + 'ifAlias' => 'vRtrIfAlias', + 'ifDescr' => 'vRtrIfDescription', + 'ifSpeed' => 'vRtrIfSpeed', + 'ifType' => 'vRtrIfType', + 'ifMtu' => 'vRtrIfMtu', + 'ifHCInOctets' => 'vRtrIfRxBytes', + 'ifHCOutOctets' => 'vRtrIfTxBytes', + 'ifHCInUcastPkts' => 'vRtrIfRxPkts', + 'ifHCOutUcastPkts' => 'vRtrIfTxPkts', ]; $timos_ports = []; diff --git a/includes/polling/ports/port-poe.inc.php b/includes/polling/ports/port-poe.inc.php index 0bb1c4f862..79c630ab34 100644 --- a/includes/polling/ports/port-poe.inc.php +++ b/includes/polling/ports/port-poe.inc.php @@ -15,10 +15,10 @@ if ($device['os'] == 'vrp') { $upd = "$polled:" . $this_port['hwPoePortReferencePower'] . ':' . $this_port['hwPoePortMaximumPower'] . ':' . $this_port['hwPoePortConsumingPower'] . ':' . $this_port['hwPoePortPeakPower']; $fields = [ - 'PortPwrAllocated' => $this_port['hwPoePortReferencePower'], - 'PortPwrAvailable' => $this_port['hwPoePortMaximumPower'], - 'PortConsumption' => $this_port['hwPoePortConsumingPower'], - 'PortMaxPwrDrawn' => $this_port['hwPoePortPeakPower'], + 'PortPwrAllocated' => $this_port['hwPoePortReferencePower'], + 'PortPwrAvailable' => $this_port['hwPoePortMaximumPower'], + 'PortConsumption' => $this_port['hwPoePortConsumingPower'], + 'PortMaxPwrDrawn' => $this_port['hwPoePortPeakPower'], ]; $tags = compact('ifName', 'rrd_name', 'rrd_def'); @@ -31,10 +31,10 @@ if ($device['os'] == 'vrp') { $upd = "$polled:" . $this_port['rlPethPsePortPowerLimit'] . ':' . $this_port['rlPethPsePortOutputPower']; $fields = [ - 'PortPwrAllocated' => $this_port['rlPethPsePortPowerLimit'], - 'PortPwrAvailable' => $this_port['rlPethPsePortPowerLimit'], - 'PortConsumption' => $this_port['rlPethPsePortOutputPower'], - 'PortMaxPwrDrawn' => $this_port['rlPethPsePortPowerLimit'], + 'PortPwrAllocated' => $this_port['rlPethPsePortPowerLimit'], + 'PortPwrAvailable' => $this_port['rlPethPsePortPowerLimit'], + 'PortConsumption' => $this_port['rlPethPsePortOutputPower'], + 'PortMaxPwrDrawn' => $this_port['rlPethPsePortPowerLimit'], ]; $tags = compact('ifName', 'rrd_name', 'rrd_def'); @@ -49,10 +49,10 @@ if ($device['os'] == 'vrp') { $port['cpeExtPsePortPwrConsumption'] . ':' . $port['cpeExtPsePortMaxPwrDrawn']; echo "$this_port[cpeExtPsePortPwrAllocated],$this_port[cpeExtPsePortPwrAvailable],$this_port[cpeExtPsePortPwrConsumption],$this_port[cpeExtPsePortMaxPwrDrawn]\n"; $fields = [ - 'PortPwrAllocated' => $this_port['cpeExtPsePortPwrAllocated'], - 'PortPwrAvailable' => $this_port['cpeExtPsePortPwrAvailable'], - 'PortConsumption' => $this_port['cpeExtPsePortPwrConsumption'], - 'PortMaxPwrDrawn' => $this_port['cpeExtPsePortMaxPwrDrawn'], + 'PortPwrAllocated' => $this_port['cpeExtPsePortPwrAllocated'], + 'PortPwrAvailable' => $this_port['cpeExtPsePortPwrAvailable'], + 'PortConsumption' => $this_port['cpeExtPsePortPwrConsumption'], + 'PortMaxPwrDrawn' => $this_port['cpeExtPsePortMaxPwrDrawn'], ]; $tags = compact('ifName', 'rrd_name', 'rrd_def'); @@ -63,10 +63,10 @@ if ($device['os'] == 'vrp') { if (isset($this_port['tpPoePortStatus'])) { // TP-Link uses .1W for their units; convert to milliwatts. $fields = [ - 'PortPwrAllocated' => $this_port['tpPoePowerLimit'] * 100, - 'PortPwrAvailable' => $this_port['tpPoePowerLimit'] * 100, - 'PortConsumption' => $this_port['tpPoePower'] * 100, - 'PortMaxPwrDrawn' => $this_port['tpPoePowerLimit'] * 100, + 'PortPwrAllocated' => $this_port['tpPoePowerLimit'] * 100, + 'PortPwrAvailable' => $this_port['tpPoePowerLimit'] * 100, + 'PortConsumption' => $this_port['tpPoePower'] * 100, + 'PortMaxPwrDrawn' => $this_port['tpPoePowerLimit'] * 100, ]; $tags = compact('ifName', 'rrd_name', 'rrd_def'); diff --git a/includes/polling/storage.inc.php b/includes/polling/storage.inc.php index 6b3f353038..38e3c28192 100644 --- a/includes/polling/storage.inc.php +++ b/includes/polling/storage.inc.php @@ -26,8 +26,8 @@ foreach (dbFetchRows('SELECT * FROM storage WHERE device_id = ?', [$device['devi echo $percent . '% '; $fields = [ - 'used' => $storage['used'], - 'free' => $storage['free'], + 'used' => $storage['used'], + 'free' => $storage['free'], ]; $tags = compact('mib', 'descr', 'rrd_name', 'rrd_def'); diff --git a/includes/polling/ucd-diskio.inc.php b/includes/polling/ucd-diskio.inc.php index 6188b149b7..b6678909ae 100644 --- a/includes/polling/ucd-diskio.inc.php +++ b/includes/polling/ucd-diskio.inc.php @@ -18,20 +18,20 @@ if (count($diskio_data)) { d_echo($entry); $tags = [ - 'rrd_name' => ['ucd_diskio', $diskio['diskio_descr']], - 'rrd_def' => RrdDefinition::make() + 'rrd_name' => ['ucd_diskio', $diskio['diskio_descr']], + 'rrd_def' => RrdDefinition::make() ->addDataset('read', 'DERIVE', 0, 125000000000) ->addDataset('written', 'DERIVE', 0, 125000000000) ->addDataset('reads', 'DERIVE', 0, 125000000000) ->addDataset('writes', 'DERIVE', 0, 125000000000), - 'descr' => $diskio['diskio_descr'], + 'descr' => $diskio['diskio_descr'], ]; $fields = [ - 'read' => $entry['diskIONReadX'], + 'read' => $entry['diskIONReadX'], 'written' => $entry['diskIONWrittenX'], - 'reads' => $entry['diskIOReads'], - 'writes' => $entry['diskIOWrites'], + 'reads' => $entry['diskIOReads'], + 'writes' => $entry['diskIOWrites'], ]; data_update($device, 'ucd_diskio', $tags, $fields); diff --git a/includes/polling/ucd-mib.inc.php b/includes/polling/ucd-mib.inc.php index 49360b001d..01015bb708 100644 --- a/includes/polling/ucd-mib.inc.php +++ b/includes/polling/ucd-mib.inc.php @@ -135,9 +135,9 @@ if (is_numeric($load_raw[2]['laLoadInt'] ?? null)) { ->addDataset('15min', 'GAUGE', 0); $fields = [ - '1min' => $load_raw[1]['laLoadInt'], - '5min' => $load_raw[2]['laLoadInt'], - '15min' => $load_raw[3]['laLoadInt'], + '1min' => $load_raw[1]['laLoadInt'], + '5min' => $load_raw[2]['laLoadInt'], + '15min' => $load_raw[3]['laLoadInt'], ]; $tags = compact('rrd_def'); diff --git a/includes/polling/unix-agent/munin-plugins.inc.php b/includes/polling/unix-agent/munin-plugins.inc.php index d89d3fc6c4..7e9566b7e7 100644 --- a/includes/polling/unix-agent/munin-plugins.inc.php +++ b/includes/polling/unix-agent/munin-plugins.inc.php @@ -45,14 +45,14 @@ if (! empty($agent_data['munin'])) { if (! is_array($plugins_db[$plugin_type])) { $insert = [ - 'device_id' => $device['device_id'], - 'mplug_type' => $plugin_type, + 'device_id' => $device['device_id'], + 'mplug_type' => $plugin_type, 'mplug_instance' => $instance, 'mplug_category' => ($plugin['graph']['category'] == null ? 'general' : strtolower($plugin['graph']['category'])), - 'mplug_title' => $plugin['graph']['title'], - 'mplug_vlabel' => $plugin['graph']['vlabel'], - 'mplug_args' => $plugin['graph']['args'], - 'mplug_info' => $plugin['graph']['info'], + 'mplug_title' => $plugin['graph']['title'], + 'mplug_vlabel' => $plugin['graph']['vlabel'], + 'mplug_args' => $plugin['graph']['args'], + 'mplug_info' => $plugin['graph']['info'], ]; $mplug_id = dbInsert($insert, 'munin_plugins'); } else { @@ -93,32 +93,32 @@ if (! empty($agent_data['munin'])) { ]; $tags = [ - 'plugin' => $plugin_type, - 'rrd_def' => RrdDefinition::make()->addDataset('val', $data['type']), + 'plugin' => $plugin_type, + 'rrd_def' => RrdDefinition::make()->addDataset('val', $data['type']), 'rrd_name' => $base_rrd_name . '_' . $name, ]; data_update($device, 'munin-plugins', $tags, $fields); if (empty($ds_list[$ds_uniq])) { $insert = [ - 'mplug_id' => $mplug_id, - 'ds_name' => $name, - 'ds_type' => $data['type'], - 'ds_label' => $data['label'], - 'ds_cdef' => $data['cdef'], - 'ds_draw' => $data['draw'], - 'ds_info' => $data['info'], - 'ds_extinfo' => $data['extinfo'], - 'ds_min' => $data['min'], - 'ds_max' => $data['max'], - 'ds_graph' => $data['graph'], + 'mplug_id' => $mplug_id, + 'ds_name' => $name, + 'ds_type' => $data['type'], + 'ds_label' => $data['label'], + 'ds_cdef' => $data['cdef'], + 'ds_draw' => $data['draw'], + 'ds_info' => $data['info'], + 'ds_extinfo' => $data['extinfo'], + 'ds_min' => $data['min'], + 'ds_max' => $data['max'], + 'ds_graph' => $data['graph'], 'ds_negative' => $data['negative'], - 'ds_warning' => $data['warning'], + 'ds_warning' => $data['warning'], 'ds_critical' => $data['critical'], - 'ds_colour' => $data['colour'], - 'ds_sum' => $data['sum'], - 'ds_stack' => $data['stack'], - 'ds_line' => $data['line'], + 'ds_colour' => $data['colour'], + 'ds_sum' => $data['sum'], + 'ds_stack' => $data['stack'], + 'ds_line' => $data['line'], ]; $ds_id = dbInsert($insert, 'munin_plugins_ds'); }//end if diff --git a/includes/rewrites.php b/includes/rewrites.php index 6f4d2bb1f2..21f0974e7e 100644 --- a/includes/rewrites.php +++ b/includes/rewrites.php @@ -95,24 +95,24 @@ function cleanPort($interface, $device = null) function makeshortif($if) { $rewrite_shortif = [ - 'tengigabitethernet' => 'Te', + 'tengigabitethernet' => 'Te', 'ten-gigabitethernet' => 'Te', - 'tengige' => 'Te', - 'gigabitethernet' => 'Gi', - 'fastethernet' => 'Fa', - 'ethernet' => 'Et', - 'serial' => 'Se', - 'pos' => 'Pos', - 'port-channel' => 'Po', - 'atm' => 'Atm', - 'null' => 'Null', - 'loopback' => 'Lo', - 'dialer' => 'Di', - 'vlan' => 'Vlan', - 'tunnel' => 'Tunnel', - 'serviceinstance' => 'SI', - 'dwdm' => 'DWDM', - 'bundle-ether' => 'BE', + 'tengige' => 'Te', + 'gigabitethernet' => 'Gi', + 'fastethernet' => 'Fa', + 'ethernet' => 'Et', + 'serial' => 'Se', + 'pos' => 'Pos', + 'port-channel' => 'Po', + 'atm' => 'Atm', + 'null' => 'Null', + 'loopback' => 'Lo', + 'dialer' => 'Di', + 'vlan' => 'Vlan', + 'tunnel' => 'Tunnel', + 'serviceinstance' => 'SI', + 'dwdm' => 'DWDM', + 'bundle-ether' => 'BE', ]; $if = \LibreNMS\Util\Rewrite::normalizeIfName($if); @@ -126,8 +126,8 @@ function rewrite_generic_hardware($hardware) { $rewrite_GenericHW = [ ' Computer Corporation' => '', - ' Corporation' => '', - ' Inc.' => '', + ' Corporation' => '', + ' Inc.' => '', ]; return str_replace(array_keys($rewrite_GenericHW), array_values($rewrite_GenericHW), $hardware); @@ -138,10 +138,10 @@ function short_hrDeviceDescr($dev) $rewrite_hrDevice = [ 'GenuineIntel:' => '', 'AuthenticAMD:' => '', - 'Intel(R)' => '', - 'CPU' => '', - '(R)' => '', - ' ' => ' ', + 'Intel(R)' => '', + 'CPU' => '', + '(R)' => '', + ' ' => ' ', ]; $dev = str_replace(array_keys($rewrite_hrDevice), array_values($rewrite_hrDevice), $dev); @@ -166,10 +166,10 @@ function short_port_descr($desc) function rewrite_adslLineType($adslLineType) { $adslLineTypes = [ - 'noChannel' => 'No Channel', - 'fastOnly' => 'Fastpath', - 'interleavedOnly' => 'Interleaved', - 'fastOrInterleaved' => 'Fast/Interleaved', + 'noChannel' => 'No Channel', + 'fastOnly' => 'Fastpath', + 'interleavedOnly' => 'Interleaved', + 'fastOrInterleaved' => 'Fast/Interleaved', 'fastAndInterleaved' => 'Fast+Interleaved', ]; @@ -297,7 +297,7 @@ function parse_entity_state($state, $value) return $data[$state][$value]; } - return ['text'=>'na', 'color'=>'default']; + return ['text' => 'na', 'color' => 'default']; } function parse_entity_state_alarm($bits) diff --git a/includes/services.inc.php b/includes/services.inc.php index 5f5c96b206..66fdff2f82 100644 --- a/includes/services.inc.php +++ b/includes/services.inc.php @@ -320,7 +320,7 @@ function check_service($command) } // We have a DS. Add an entry to the array. d_echo('Perf Data - DS: ' . $ds . ', Value: ' . $value . ', UOM: ' . $uom . "\n"); - $metrics[$ds] = ['value'=>$value, 'uom'=>$uom]; + $metrics[$ds] = ['value' => $value, 'uom' => $uom]; } else { // No DS. Don't add an entry to the array. d_echo("Perf Data - None.\n"); diff --git a/includes/syslog.php b/includes/syslog.php index b7eceb21d3..b1c4e6188a 100644 --- a/includes/syslog.php +++ b/includes/syslog.php @@ -153,12 +153,12 @@ function process_syslog($entry, $update) dbInsert( [ 'device_id' => $entry['device_id'], - 'program' => $entry['program'], - 'facility' => $entry['facility'], - 'priority' => $entry['priority'], - 'level' => $entry['level'], - 'tag' => $entry['tag'], - 'msg' => $entry['msg'], + 'program' => $entry['program'], + 'facility' => $entry['facility'], + 'priority' => $entry['priority'], + 'level' => $entry['level'], + 'tag' => $entry['tag'], + 'msg' => $entry['msg'], 'timestamp' => $entry['timestamp'], ], 'syslog' diff --git a/scripts/manage_bills.php b/scripts/manage_bills.php index 723bf6f2e6..bc65016e04 100755 --- a/scripts/manage_bills.php +++ b/scripts/manage_bills.php @@ -42,7 +42,7 @@ function create_bill($bill_name, $bill_type, $bill_cdr, $bill_day) $insert = [ 'bill_name' => $bill_name, 'bill_type' => $bill_type, - 'bill_cdr' => $bill_cdr, + 'bill_cdr' => $bill_cdr, 'bill_day' => '1', ]; $create_bill = dbInsert($insert, 'bills'); diff --git a/scripts/removespikes.php b/scripts/removespikes.php index 88d75877b3..4a6737a646 100755 --- a/scripts/removespikes.php +++ b/scripts/removespikes.php @@ -816,6 +816,7 @@ function removeComments(&$output) } } } + /* transfer the new array back to the original array */ return $new_array; } diff --git a/tests/BasicApiTest.php b/tests/BasicApiTest.php index 9cfb829a2c..bd9ce0ad66 100644 --- a/tests/BasicApiTest.php +++ b/tests/BasicApiTest.php @@ -46,7 +46,7 @@ class BasicApiTest extends DBTestCase ->assertJson([ 'status' => 'ok', 'devices' => [$device->toArray()], - 'count'=> 1, + 'count' => 1, ]); } } diff --git a/tests/CommonFunctionsTest.php b/tests/CommonFunctionsTest.php index 89bb12ab5e..72b41250b7 100644 --- a/tests/CommonFunctionsTest.php +++ b/tests/CommonFunctionsTest.php @@ -96,8 +96,8 @@ class CommonFunctionsTest extends TestCase $this->assertEquals('<script>alert("test")</script>', Clean::html('', [])); $tmp_config = [ - 'HTML.Allowed' => 'b,iframe,i,ul,li,h1,h2,h3,h4,br,p', - 'HTML.Trusted' => true, + 'HTML.Allowed' => 'b,iframe,i,ul,li,h1,h2,h3,h4,br,p', + 'HTML.Trusted' => true, 'HTML.SafeIframe' => true, ]; diff --git a/tests/SyslogTest.php b/tests/SyslogTest.php index 869fdfa0be..8bc5a07ecf 100644 --- a/tests/SyslogTest.php +++ b/tests/SyslogTest.php @@ -72,74 +72,74 @@ class SyslogTest extends TestCase // ---- IOS ---- $this->checkSyslog( '1.1.1.1||user||info||info||0e||2016-02-28 00:23:34||%CARD-SEVERITY-MSG:SLOT %FACILITY-SEVERITY-MNEMONIC: Message-text||', - ['device_id'=>1, 'program'=>'%CARD-SEVERITY-MSG:SLOT %FACILITY-SEVERITY-MNEMONIC', 'msg'=>'Message-text'] + ['device_id' => 1, 'program' => '%CARD-SEVERITY-MSG:SLOT %FACILITY-SEVERITY-MNEMONIC', 'msg' => 'Message-text'] ); $this->checkSyslog( '1.1.1.1||user||info||info||0e||2016-02-28 00:23:34||%FACILITY-SUBFACILITY-SEVERITY-MNEMONIC: Message-text||', - ['device_id'=>1, 'program'=>'%FACILITY-SUBFACILITY-SEVERITY-MNEMONIC', 'msg'=>'Message-text'] + ['device_id' => 1, 'program' => '%FACILITY-SUBFACILITY-SEVERITY-MNEMONIC', 'msg' => 'Message-text'] ); $this->checkSyslog( '1.1.1.1||local7||info||info||be||2016-03-09 03:58:25||Mar 9 11:58:24.145 UTC: %SEC-6-IPACCESSLOGS: list MNGMNT denied 120.62.186.12 1 packet ||]', - ['device_id'=>1, 'program'=>'%SEC-6-IPACCESSLOGS', 'msg'=>'list MNGMNT denied 120.62.186.12 1 packet'] + ['device_id' => 1, 'program' => '%SEC-6-IPACCESSLOGS', 'msg' => 'list MNGMNT denied 120.62.186.12 1 packet'] ); $this->checkSyslog( '1.1.1.1||local7||info||info||be||2016-04-27 021:12:28||Apr 27 21:12:28: %SYS-5-CONFIG_I: Configured from console by vty0||', - ['device_id'=>1, 'program'=>'%SYS-5-CONFIG_I', 'msg'=>'Configured from console by vty0'] + ['device_id' => 1, 'program' => '%SYS-5-CONFIG_I', 'msg' => 'Configured from console by vty0'] ); $this->checkSyslog( '1.1.1.1||local7||info||info||be||2016-04-27 021:12:28||Mar 8 20:14:08.762: %FACILITY-SUBFACILITY-SEVERITY-MNEMONIC: Message-text||000956', - ['device_id'=>1, 'program'=>'%FACILITY-SUBFACILITY-SEVERITY-MNEMONIC', 'msg'=>'Message-text'] + ['device_id' => 1, 'program' => '%FACILITY-SUBFACILITY-SEVERITY-MNEMONIC', 'msg' => 'Message-text'] ); // ---- CatOS ---- $this->checkSyslog( '1.1.1.1||user||info||info||0e||2016-02-28 00:23:34||%IP-3-UDP_SOCKOVFL:UDP socket overflow||', - ['device_id'=>1, 'program'=>'%IP-3-UDP_SOCKOVFL', 'msg'=>'UDP socket overflow'] + ['device_id' => 1, 'program' => '%IP-3-UDP_SOCKOVFL', 'msg' => 'UDP socket overflow'] ); $this->checkSyslog( '1.1.1.1||user||info||info||0e||2016-02-28 00:23:34||DTP-1-ILGLCFG: Illegal config (on, isl--on,dot1q) on Port [mod/port]||', - ['device_id'=>1, 'program'=>'DTP-1-ILGLCFG', 'msg'=>'Illegal config (on, isl--on,dot1q) on Port [mod/port]'] + ['device_id' => 1, 'program' => 'DTP-1-ILGLCFG', 'msg' => 'Illegal config (on, isl--on,dot1q) on Port [mod/port]'] ); $this->checkSyslog( '1.1.1.1||user||info||info||0e||2016-02-28 00:23:34||Cannot enable text mode config if ACL config is cleared from nvram||', - ['device_id'=>1, 'program'=>'', 'msg'=>'Cannot enable text mode config if ACL config is cleared from nvram'] + ['device_id' => 1, 'program' => '', 'msg' => 'Cannot enable text mode config if ACL config is cleared from nvram'] ); $this->checkSyslog( '1.1.1.1||user||info||info||0e||2016-02-28 00:23:34||%PAGP-5-PORTFROMSTP / %PAGP-5-PORTTOSTP||', - ['device_id'=>1, 'program'=>'%PAGP-5-PORTFROMSTP / %PAGP-5-PORTTOSTP'] + ['device_id' => 1, 'program' => '%PAGP-5-PORTFROMSTP / %PAGP-5-PORTTOSTP'] ); $this->checkSyslog( '1.1.1.1||user||info||info||0e||2016-02-28 00:23:34||%SYS-3-EOBC_CHANNELREINIT||', - ['device_id'=>1, 'program'=>'%SYS-3-EOBC_CHANNELREINIT'] + ['device_id' => 1, 'program' => '%SYS-3-EOBC_CHANNELREINIT'] ); $this->checkSyslog( '1.1.1.1||user||info||info||0e||2016-02-28 00:23:34||%SYS-4-MODHPRESET:||', - ['device_id'=>1, 'program'=>'%SYS-4-MODHPRESET', 'msg'=>''] + ['device_id' => 1, 'program' => '%SYS-4-MODHPRESET', 'msg' => ''] ); $this->checkSyslog( '1.1.1.1||user||info||info||0e||2016-02-28 00:23:34||InbandPingProcessFailure:Module x not responding over inband||', - ['device_id'=>1, 'program'=>'INBANDPINGPROCESSFAILURE', 'msg'=>'Module x not responding over inband'] + ['device_id' => 1, 'program' => 'INBANDPINGPROCESSFAILURE', 'msg' => 'Module x not responding over inband'] ); $this->checkSyslog( '1.1.1.1||user||info||info||0e||2016-02-28 00:23:34||RxSBIF_SEQ_NUM_ERROR:slot=x||', - ['device_id'=>1, 'program'=>'RXSBIF_SEQ_NUM_ERROR', 'msg'=>'slot=x'] + ['device_id' => 1, 'program' => 'RXSBIF_SEQ_NUM_ERROR', 'msg' => 'slot=x'] ); // With program from syslog $this->checkSyslog( '1.1.1.1||local7||notice||notice||bd||2016-04-04 15:18:43||Apr 4 13:18:42.670: %LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/32, changed state to up||345735', - ['device_id'=>1, 'program'=>'%LINEPROTO-5-UPDOWN', 'msg'=>'Line protocol on Interface GigabitEthernet0/32, changed state to up'] + ['device_id' => 1, 'program' => '%LINEPROTO-5-UPDOWN', 'msg' => 'Line protocol on Interface GigabitEthernet0/32, changed state to up'] ); // Incorrect time $this->checkSyslog( '1.1.1.1||user||info||info||0e||2016-04-06 15:20:35||*Apr 4 21:26:41.778 UTC: %LWAPP-3-REPLAY_ERR: 1 wcm: Received replay error on slot 1, WLAN ID 1, count 1 from AP xxxx.xxxx.xxxx||', - ['device_id'=>1, 'program'=>'%LWAPP-3-REPLAY_ERR', 'msg'=>'1 wcm: Received replay error on slot 1, WLAN ID 1, count 1 from AP xxxx.xxxx.xxxx'] + ['device_id' => 1, 'program' => '%LWAPP-3-REPLAY_ERR', 'msg' => '1 wcm: Received replay error on slot 1, WLAN ID 1, count 1 from AP xxxx.xxxx.xxxx'] ); $this->checkSyslog( '1.1.1.1||user||info||info||0e||2016-04-06 15:20:35||.Apr 4 21:26:41.778 UTC: %LWAPP-3-REPLAY_ERR: 1 wcm: Received replay error on slot 1, WLAN ID 1, count 1 from AP xxxx.xxxx.xxxx||', - ['device_id'=>1, 'program'=>'%LWAPP-3-REPLAY_ERR', 'msg'=>'1 wcm: Received replay error on slot 1, WLAN ID 1, count 1 from AP xxxx.xxxx.xxxx'] + ['device_id' => 1, 'program' => '%LWAPP-3-REPLAY_ERR', 'msg' => '1 wcm: Received replay error on slot 1, WLAN ID 1, count 1 from AP xxxx.xxxx.xxxx'] ); } @@ -152,45 +152,45 @@ class SyslogTest extends TestCase // ---- PAM ---- $this->checkSyslog( '1.1.1.1||authpriv||info||info||56||2016-02-28 00:23:34||pam_unix(cron:session): session opened for user librenms by (uid=0)||CRON', - ['device_id'=>1, 'program'=>'CRON', 'msg'=>'pam_unix(cron:session): session opened for user librenms by (uid=0)'] + ['device_id' => 1, 'program' => 'CRON', 'msg' => 'pam_unix(cron:session): session opened for user librenms by (uid=0)'] ); $this->checkSyslog( '1.1.1.1||authpriv||info||info||55||2016-02-28 00:23:34||pam_unix(sudo:session): session opened for user librenms by root (uid=0)||sudo', - ['device_id'=>1, 'program'=>'SUDO', 'msg'=>'pam_unix(sudo:session): session opened for user librenms by root (uid=0)'] + ['device_id' => 1, 'program' => 'SUDO', 'msg' => 'pam_unix(sudo:session): session opened for user librenms by root (uid=0)'] ); $this->checkSyslog( '1.1.1.1||auth||info||info||0e||2016-02-28 00:23:34||pam_krb5(sshd:auth): authentication failure; logname=root uid=0 euid=0 tty=ssh ruser= rhost=123.213.132.231||sshd', - ['device_id'=>1, 'program'=>'SSHD', 'msg'=>'pam_krb5(sshd:auth): authentication failure; logname=root uid=0 euid=0 tty=ssh ruser= rhost=123.213.132.231'] + ['device_id' => 1, 'program' => 'SSHD', 'msg' => 'pam_krb5(sshd:auth): authentication failure; logname=root uid=0 euid=0 tty=ssh ruser= rhost=123.213.132.231'] ); $this->checkSyslog( '1.1.1.1||auth||info||info||0e||2016-02-28 00:23:34||pam_krb5[sshd:auth]: authentication failure; logname=root uid=0 euid=0 tty=ssh ruser= rhost=123.213.132.231||sshd', - ['device_id'=>1, 'program'=>'SSHD', 'msg'=>'pam_krb5[sshd:auth]: authentication failure; logname=root uid=0 euid=0 tty=ssh ruser= rhost=123.213.132.231'] + ['device_id' => 1, 'program' => 'SSHD', 'msg' => 'pam_krb5[sshd:auth]: authentication failure; logname=root uid=0 euid=0 tty=ssh ruser= rhost=123.213.132.231'] ); // ---- Postfix ---- $this->checkSyslog( '1.1.1.1||mail||info||info||16||2016-02-28 00:23:34||5C62E329EF: to=, relay=mail.example.com[127.0.0.1]:25, delay=0.11, delays=0.04/0.01/0/0.06, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as 5362E6A670E)||postfix/smtp', - ['device_id'=>1, 'program'=>'POSTFIX/SMTP', 'msg'=>'5C62E329EF: to=, relay=mail.example.com[127.0.0.1]:25, delay=0.11, delays=0.04/0.01/0/0.06, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as 5362E6A670E)'] + ['device_id' => 1, 'program' => 'POSTFIX/SMTP', 'msg' => '5C62E329EF: to=, relay=mail.example.com[127.0.0.1]:25, delay=0.11, delays=0.04/0.01/0/0.06, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as 5362E6A670E)'] ); $this->checkSyslog( '1.1.1.1||mail||info||info||16||2016-02-28 00:23:34||D7256400EF: from=, size=882, nrcpt=1 (queue active)||postfix/qmgr', - ['device_id'=>1, 'program'=>'POSTFIX/QMGR', 'msg'=>'D7256400EF: from=, size=882, nrcpt=1 (queue active)'] + ['device_id' => 1, 'program' => 'POSTFIX/QMGR', 'msg' => 'D7256400EF: from=, size=882, nrcpt=1 (queue active)'] ); // ---- No program ---- $this->checkSyslog( '1.1.1.1||user||info||info||0e||2016-02-28 00:23:34||some random message||', - ['device_id'=>1, 'program'=>'USER', 'msg'=>'some random message'] + ['device_id' => 1, 'program' => 'USER', 'msg' => 'some random message'] ); // ---- Other ---- $this->checkSyslog( '1.1.1.1||cron||info||info||4e||2016-02-28 00:23:34||(librenms) CMD ( /opt/librenms/alerts.php >> /var/log/librenms_alert.log 2>&1)||CRON', - ['device_id'=>1, 'program'=>'CRON', 'msg'=>'(librenms) CMD ( /opt/librenms/alerts.php >> /var/log/librenms_alert.log 2>&1)'] + ['device_id' => 1, 'program' => 'CRON', 'msg' => '(librenms) CMD ( /opt/librenms/alerts.php >> /var/log/librenms_alert.log 2>&1)'] ); $this->checkSyslog( '1.1.1.1||authpriv||notice||notice||55||2016-02-28 00:23:34|| root : TTY=pts/1 ; PWD=/opt/librenms ; USER=librenms ; COMMAND=/usr/bin/git status||sudo', - ['device_id'=>1, 'program'=>'SUDO', 'msg'=>'root : TTY=pts/1 ; PWD=/opt/librenms ; USER=librenms ; COMMAND=/usr/bin/git status'] + ['device_id' => 1, 'program' => 'SUDO', 'msg' => 'root : TTY=pts/1 ; PWD=/opt/librenms ; USER=librenms ; COMMAND=/usr/bin/git status'] ); } @@ -203,29 +203,29 @@ class SyslogTest extends TestCase // ---- 2900/2910/3800/5400 ---- $this->checkSyslog( '1.1.1.1||user||info||info||0e||2016-02-28 00:23:34||chassis: Slot A Ready||00422', - ['device_id'=>1, 'program'=>'CHASSIS', 'msg'=>'Slot A Ready [00422]'] + ['device_id' => 1, 'program' => 'CHASSIS', 'msg' => 'Slot A Ready [00422]'] ); $this->checkSyslog( '1.1.1.1||user||info||info||0e||2016-02-28 00:23:34||ports: port 21 is now on-line||00076', - ['device_id'=>1, 'program'=>'PORTS', 'msg'=>'port 21 is now on-line [00076]'] + ['device_id' => 1, 'program' => 'PORTS', 'msg' => 'port 21 is now on-line [00076]'] ); $this->checkSyslog( '1.1.1.1||user||info||info||0e||2016-02-28 00:23:34||ports: port 21 is now off-line||00077', - ['device_id'=>1, 'program'=>'PORTS', 'msg'=>'port 21 is now off-line [00077]'] + ['device_id' => 1, 'program' => 'PORTS', 'msg' => 'port 21 is now off-line [00077]'] ); $this->checkSyslog( '1.1.1.1||user||warning||warning||0c||2016-02-28 00:23:34||FFI: port 21-High collision or drop rate. See help.||00331', - ['device_id'=>1, 'program'=>'FFI', 'msg'=>'port 21-High collision or drop rate. See help. [00331]'] + ['device_id' => 1, 'program' => 'FFI', 'msg' => 'port 21-High collision or drop rate. See help. [00331]'] ); // ---- 2610 ---- $this->checkSyslog( '1.1.1.1||user||warning||warning||0c||2016-02-28 00:23:34||port 21-Excessive undersized/giant packets. See help.||FFI', - ['device_id'=>1, 'program'=>'FFI', 'msg'=>'port 21-Excessive undersized/giant packets. See help.'] + ['device_id' => 1, 'program' => 'FFI', 'msg' => 'port 21-Excessive undersized/giant packets. See help.'] ); $this->checkSyslog( '1.1.1.1||user||info||info||0e||2016-02-28 00:23:34||updated time by -4 seconds||SNTP', - ['device_id'=>1, 'program'=>'SNTP', 'msg'=>'updated time by -4 seconds'] + ['device_id' => 1, 'program' => 'SNTP', 'msg' => 'updated time by -4 seconds'] ); } @@ -238,7 +238,7 @@ class SyslogTest extends TestCase // ---- USG60W ---- $this->checkSyslog( '1.1.1.1||local1||info||info||8e||2017-06-14 17:51:25||0" dst="0.0.0.0:0" msg="DHCP server assigned 195.159.132.109 to Chromecast(6C:AD:F8:B1:10:1D)" note="DHCP ACK" user="unknown" devID="a0e4cb7d7f52" cat="DHCP"||src="0.0.0.0', - ['device_id'=>1, 'program'=>'DHCP', 'msg'=>'src="0.0.0.0:0" dst="0.0.0.0:0" msg="DHCP server assigned 195.159.132.109 to Chromecast(6C:AD:F8:B1:10:1D)" note="DHCP ACK" user="unknown" devID="a0e4cb7d7f52" cat="DHCP"'] + ['device_id' => 1, 'program' => 'DHCP', 'msg' => 'src="0.0.0.0:0" dst="0.0.0.0:0" msg="DHCP server assigned 195.159.132.109 to Chromecast(6C:AD:F8:B1:10:1D)" note="DHCP ACK" user="unknown" devID="a0e4cb7d7f52" cat="DHCP"'] ); } }