mirror of
https://github.com/librenms/librenms.git
synced 2024-09-22 02:48:37 +00:00
672fe61b5e
* Definition of a new SLA module to migrate from old cisco-sla and support other devices : Juniper RPM and Huawei * Change wrong description name of module SLA * Re implementing Juniper RPM support in a new module Slas (Cisco SLA to be added) * Added Graphs for Juniper RPM types * Tried to make discover and poller generic : to handle Cisco SLA and Juniper RPM and others * Reimplementing Cisco SLA in the new Sla module and adding condition to manage both SLA and RPM * Definition of a new SLA module to migrate from old cisco-sla and support other devices : Juniper RPM and Huawei * Change wrong description name of module SLA * Re implementing Juniper RPM support in a new module Slas (Cisco SLA to be added) * Added Graphs for Juniper RPM types * Tried to make discover and poller generic : to handle Cisco SLA and Juniper RPM and others * Reimplementing Cisco SLA in the new Sla module and adding condition to manage both SLA and RPM * Fix some error due to Elequent object replacing SQL request * Fixing indentation * Fixed continuous integrations errors * Fixed continuous integrations errors part 2 * Fixed continuous integrations errors part 3 : missing last new lines * Fixed PHP Static Analysis checks * Fixed continuous integrations errors part 4 * Fixed PHP Static Analysis checks part 2 * Trying to convert existing cisco-sla to new slas one * Trying to add slas to fix test failure (I am pretty sure this is not enough but I don't know how to do it) * Switching old cisco-sla module declaration to new slas module in concerned OS files * Fixing wrong sla module name instead of slas in concerned OS files * Fixing wrong module name sla changed to slas (as is it in power-supplies reimplementation) * Fixing some warnings shown in the Inspection CI but skipping some that are already present * Adding tests files from virtual Juniper VMX and adding slas modules in /tests/module_tables * Adding missing SNMP data files * Module Slas modifications to use inheritance * Fix CI errors * Fix CI errors part 2 * Fix CI errors part 3 * Fixing no value on RTT graphs * Fixing only last SLA to be polled : problem with loops * Fix CI errors part 4 * Optimizing a little the Juniper RPM poller part I wanted to query only the required values but it is complicated to query a specific OID as Cisco-SLA does because the owner and tag are hardcoded in ASCII decimal with strange values. So I use the function snmp_walk which gets the whole OID values in text. And I index the Juniper MIB (because we want multiple values). But I changed the DISMAN MIB requests to get only what we want. * Fix CI errors * Fix CI errors part 2 * Fix CI errors part 3 * Fixing PHP Static Analysis error 2/4 * Fix CI errors * Implementing Interfaces to fix some errors that occurs with inheritance * Adding missing Interfaces files * Moving generic Sla discovery code into Junos Class * Fix CI errors * Fix CI errors part 2 * Fixing missing definition of SlaDiscovery in Cisco shared Class * Fixing missing import for Illuminate\Database\Eloquent\Collection * Fix CI errors part 3 * Fix PHP Static Analysis error * change type strings to use translations instead of config * IOSXR test data * remove test data garbage * simplify discovery * Fix style * Updating test files to adapt mock sla_nr ID starting from 0 and not 1 : CI tests should pass * clean up polling add rtt field in the db cisco icmpjitter seems to have confused a lot of values * rtt on discovery * use crc32 for consistent sla_nr values * revert snmprec * Fix style * correct schema Co-authored-by: Tony Murray <murraytony@gmail.com>
153 lines
6.4 KiB
YAML
153 lines
6.4 KiB
YAML
applications:
|
|
applications:
|
|
excluded_fields: [device_id, app_id, timestamp]
|
|
application_metrics:
|
|
excluded_fields: [app_id]
|
|
joins:
|
|
- { custom: 'INNER JOIN (SELECT app_id, app_type FROM applications WHERE `device_id`=?) I USING (app_id)', select: ['app_type'] }
|
|
custom_where: ''
|
|
order_by: metric
|
|
arp-table:
|
|
ipv4_mac:
|
|
excluded_fields: [id, device_id, port_id]
|
|
order_by: ipv4_mac.context_name, ipv4_mac.ipv4_address, ipv4_mac.mac_address
|
|
bgp-peers:
|
|
bgpPeers:
|
|
excluded_fields: [device_id, bgpPeer_id, vrf_id]
|
|
joins:
|
|
- { left: bgpPeers.device_id, right: devices.device_id, select: [devices.bgpLocalAs] }
|
|
- { left: bgpPeers.vrf_id, right: vrfs.vrf_id, select: [vrfs.bgpLocalAs as vrfLocalAs] }
|
|
bgpPeers_cbgp:
|
|
excluded_fields: [device_id]
|
|
fdb-table:
|
|
ports_fdb:
|
|
excluded_fields: [device_id, ports_fdb_id, port_id, vlan_id, created_at, updated_at]
|
|
joins:
|
|
- { left: ports_fdb.port_id, right: ports.port_id, select: [ifIndex] }
|
|
- { left: ports_fdb.vlan_id, right: vlans.vlan_id, select: [vlan_vlan] }
|
|
order_by: ports.ifIndex, vlans.vlan_vlan, ports_fdb.mac_address
|
|
loadbalancers:
|
|
component: true
|
|
mempools:
|
|
mempools:
|
|
excluded_fields: [device_id, mempool_id]
|
|
order_by: mempool_type, mempool_id
|
|
mpls:
|
|
mpls_lsps:
|
|
excluded_fields: [lsp_id, device_id]
|
|
order_by: vrf_oid, lsp_oid
|
|
mpls_lsp_paths:
|
|
excluded_fields: [lsp_path_id, device_id, lsp_id]
|
|
joins:
|
|
- { left: mpls_lsp_paths.lsp_id, right: mpls_lsps.lsp_id, select: [vrf_oid, lsp_oid] }
|
|
order_by: vrf_oid, lsp_oid, path_oid
|
|
mpls_sdps:
|
|
excluded_fields: [sdp_id, device_id]
|
|
order_by: sdp_oid
|
|
mpls_sdp_binds:
|
|
excluded_fields: [bind_id, sdp_id, svc_id, device_id]
|
|
joins:
|
|
- { left: mpls_sdp_binds.sdp_id, right: mpls_sdps.sdp_id, select: [mpls_sdps.sdp_oid] }
|
|
- { left: mpls_sdp_binds.svc_id, right: mpls_services.svc_id, select: [mpls_services.svc_oid] }
|
|
order_by: mpls_sdps.sdp_oid, mpls_services.svc_oid
|
|
mpls_services:
|
|
excluded_fields: [svc_id, device_id]
|
|
order_by: svc_oid
|
|
mpls_saps:
|
|
excluded_fields: [sap_id, svc_id, device_id]
|
|
joins:
|
|
- { left: mpls_saps.svc_id, right: mpls_services.svc_id, select: [mpls_services.svc_oid] }
|
|
order_by: mpls_services.svc_oid, mpls_saps.sapPortId, mpls_saps.sapEncapValue
|
|
ospf:
|
|
ospf_ports:
|
|
excluded_fields: [id, device_id, port_id]
|
|
joins:
|
|
- { left: ospf_ports.port_id, right: ports.port_id, select: [ ifIndex ] }
|
|
ospf_instances:
|
|
excluded_fields: [id, device_id]
|
|
ospf_areas:
|
|
excluded_fields: [id, device_id]
|
|
ospf_nbrs:
|
|
excluded_fields: [id, device_id]
|
|
isis:
|
|
isis_adjacencies:
|
|
excluded_fields: [id, device_id, port_id]
|
|
ports:
|
|
ports:
|
|
excluded_fields: [device_id, port_id, poll_time, poll_period, ifVrf]
|
|
joins:
|
|
- { left: ports.port_id, right: ports_statistics.port_id }
|
|
order_by: ports.ifIndex, ports.ifDescr, ports.ifName
|
|
cisco-pw:
|
|
pseudowires:
|
|
excluded_fields: [pseudowire_id, device_id, port_id, peer_device_id]
|
|
joins:
|
|
- { left: excluded_fields.port_id, right: ports.port_id, select: [ ifIndex ] }
|
|
order_by: cpwVcID, ifIndex
|
|
route:
|
|
route:
|
|
excluded_fields: [port_id, device_id, route_id, created_at, updated_at]
|
|
order_by: inetCidrRouteDest
|
|
nac:
|
|
ports_nac:
|
|
excluded_fields: [ports_nac_id, device_id, port_id]
|
|
joins:
|
|
- { left: ports_nac.port_id, right: ports.port_id, select: [ifIndex] }
|
|
order_by: ports.ifIndex, mac_address
|
|
os:
|
|
devices:
|
|
included_fields: [sysName, sysObjectID, sysDescr, sysContact, version, hardware, features, location, os, type, serial, icon]
|
|
joins:
|
|
- { left: devices.location_id, right: locations.id, select: [location] }
|
|
processors:
|
|
processors:
|
|
excluded_fields: [device_id, processor_id]
|
|
sensors:
|
|
sensors:
|
|
excluded_fields: [device_id, sensor_id, state_translation_id, state_index_id, sensors_to_state_translations_id, lastupdate]
|
|
joins:
|
|
- { left: sensors.sensor_id, right: sensors_to_state_indexes.sensor_id }
|
|
- { left: sensors_to_state_indexes.state_index_id, right: state_indexes.state_index_id }
|
|
order_by: sensors.sensor_class, sensors.sensor_type, sensors.sensor_index
|
|
state_indexes:
|
|
excluded_fields: [device_id, sensor_id, state_translation_id, state_index_id, state_lastupdated]
|
|
joins:
|
|
- { left: state_indexes.state_index_id, right: state_translations.state_index_id }
|
|
- { custom: 'INNER JOIN ( SELECT i.state_index_id FROM `sensors_to_state_indexes` i LEFT JOIN `sensors` s ON (i.`sensor_id` = s.`sensor_id`) WHERE `device_id`=? GROUP BY i.state_index_id) d ON d.state_index_id = state_indexes.state_index_id' }
|
|
order_by: state_indexes.state_name, state_translations.state_value
|
|
custom_where: ''
|
|
slas:
|
|
slas:
|
|
excluded_fields: [device_id, sla_id]
|
|
order_by: sla_nr
|
|
storage:
|
|
storage:
|
|
excluded_fields: [device_id, storage_id]
|
|
order_by: storage_index, storage_type
|
|
printer-supplies:
|
|
printer_supplies:
|
|
excluded_fields: [device_id, supply_id]
|
|
order_by: supply_oid, supply_index
|
|
vlans:
|
|
vlans:
|
|
excluded_fields: [vlan_id, device_id]
|
|
order_by: vlan_domain, vlan_vlan
|
|
ports_vlans:
|
|
excluded_fields: [port_vlan_id, device_id, port_id]
|
|
order_by: vlan, baseport
|
|
vrf:
|
|
vrfs:
|
|
excluded_fields: [vrf_id, device_id]
|
|
joins:
|
|
- { custom: "LEFT JOIN (SELECT ifVrf, GROUP_CONCAT(ifIndex ORDER BY ifIndex ASC SEPARATOR ',') as ifIndices FROM ports GROUP BY ifVrf) p ON p.ifVrf = vrfs.vrf_id", select: ["p.ifIndices"] }
|
|
wireless:
|
|
wireless_sensors:
|
|
excluded_fields: [device_id, sensor_id, access_point_id, lastupdate]
|
|
cisco-mac-accounting:
|
|
mac_accounting:
|
|
excluded_fields: [ma_id, port_id, poll_time, poll_prev, poll_period, cipMacHCSwitchedBytes_input_rate, cipMacHCSwitchedBytes_output_rate, cipMacHCSwitchedPkts_input_rate, cipMacHCSwitchedPkts_output_rate]
|
|
joins:
|
|
- { left: mac_accounting.port_id, right: ports.port_id, select: [ifIndex] }
|
|
custom_where: WHERE ports.device_id=?
|
|
order_by: ports.ifIndex, mac
|