Skip to content

Commit

Permalink
fix: replace entity that was deleted (#1524)
Browse files Browse the repository at this point in the history
* fix: replace entity that was deleted

* chore: update to new GM standards
  • Loading branch information
thezackm authored Mar 5, 2024
1 parent 00901c1 commit 879644a
Show file tree
Hide file tree
Showing 4 changed files with 346 additions and 0 deletions.
24 changes: 24 additions & 0 deletions entity-types/ext-meraki_device/definition.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Meraki devices being polled locally through their SNMP interface. This method only supports system and if-mib of the individual device
---
domain: EXT
type: MERAKI_DEVICE
synthesis:
name: device_name
identifier: device_name
encodeIdentifierInGUID: true

conditions:
- attribute: provider
value: kentik-meraki

tags:
src_addr:
entityTagName: device_ip
multiValue: false

goldenTags:
- device_ip

dashboardTemplates:
kentik:
template: meraki-device-dashboard.json
19 changes: 19 additions & 0 deletions entity-types/ext-meraki_device/golden_metrics.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
receiveErrors:
title: Aggregate Receive Errors (count)
unit: COUNT
queries:
# All Meraki devices
kentik:
select: sum(kentik.snmp.ifInErrors)
from: Metric
where: "provider = 'kentik-meraki'"

transmitErrors:
title: Aggregate Transmit Errors (count)
unit: COUNT
queries:
# All Meraki devices
kentik:
select: sum(kentik.snmp.ifOutErrors)
from: Metric
where: "provider = 'kentik-meraki'"
287 changes: 287 additions & 0 deletions entity-types/ext-meraki_device/meraki-device-dashboard.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,287 @@
{
"name": "Meraki Device",
"description": null,
"pages": [
{
"name": "Meraki Device",
"description": null,
"widgets": [
{
"title": "Summary",
"layout": {
"column": 1,
"row": 1,
"width": 4,
"height": 3
},
"visualization": {
"id": "viz.billboard"
},
"rawConfiguration": {
"dataFormatters": [
{
"name": "Uptime (Days)",
"precision": 2,
"type": "decimal"
},
{
"name": "Last Update",
"type": "date"
}
],
"nrqlQueries": [
{
"accountId": 0,
"query": "FROM Metric SELECT latest(device_name) AS 'Device Name', latest(src_addr) AS 'Device IP', latest(kentik.snmp.Uptime)/8640000 AS 'Uptime (Days)', latest(SysObjectID) AS 'SysObjectID', latest(entity.type) AS 'Entity Type', latest(instrumentation.name) AS 'Ktranslate Profile', latest(timestamp) AS 'Last Update', latest(PollingHealth) AS 'Polling Health', latest(PollingHealthReason) AS 'Health Reason' WHERE instrumentation.name = 'kentik-meraki' "
}
],
"thresholds": []
}
},
{
"title": "",
"layout": {
"column": 5,
"row": 1,
"width": 8,
"height": 1
},
"visualization": {
"id": "viz.markdown"
},
"rawConfiguration": {
"text": "## This Meraki device is being polled locally via SNMP and only exposes a limited subset of information."
}
},
{
"title": "System Description",
"layout": {
"column": 5,
"row": 2,
"width": 8,
"height": 2
},
"visualization": {
"id": "viz.billboard"
},
"rawConfiguration": {
"dataFormatters": [],
"nrqlQueries": [
{
"accountId": 0,
"query": "FROM Metric SELECT latest(SysDescr) as 'Description' where instrumentation.name = 'kentik-meraki'"
}
],
"thresholds": []
}
},
{
"title": "Interfaces Summary",
"layout": {
"column": 1,
"row": 4,
"width": 12,
"height": 3
},
"visualization": {
"id": "viz.table"
},
"rawConfiguration": {
"dataFormatters": [],
"facet": {
"showOtherSeries": false
},
"nrqlQueries": [
{
"accountId": 0,
"query": "FROM Metric SELECT latest(kentik.snmp.IfInUtilization) AS 'RX %', latest(kentik.snmp.IfOutUtilization) AS 'TX %', latest(if_OperStatus) AS 'Operational Status', latest(kentik.snmp.ifInErrorPercent) AS 'RX Error %', latest(kentik.snmp.ifOutErrorPercent) AS 'TX Error %' FACET device_name, if_name or if_interface_name AS 'Interface', if_Alias AS 'Interface Alias', if_Speed AS 'Interface Speed' WHERE instrumentation.name = 'kentik-meraki' LIMIT MAX"
}
]
}
},
{
"title": "Receive Traffic %",
"visualization": {
"id": "viz.line"
},
"layout": {
"column": 1,
"row": 7,
"width": 6,
"height": 4
},
"rawConfiguration": {
"facet": {
"showOtherSeries": false
},
"legend": {
"enabled": true
},
"nrqlQueries": [
{
"accountId": 0,
"query": "FROM Metric SELECT average(kentik.snmp.IfInUtilization) as 'RX %' FACET if_name or if_interface_name WHERE provider = 'kentik-firepower' TIMESERIES 5 MINUTES LIMIT 10"
}
],
"yAxisLeft": {
"max": 100,
"min": 0,
"zero": false
}
}
},
{
"title": "Transmit Traffic %",
"visualization": {
"id": "viz.line"
},
"layout": {
"column": 7,
"row": 7,
"width": 6,
"height": 4
},
"rawConfiguration": {
"facet": {
"showOtherSeries": false
},
"legend": {
"enabled": true
},
"nrqlQueries": [
{
"accountId": 0,
"query": "FROM Metric SELECT average(kentik.snmp.IfOutUtilization) as 'RX %' FACET if_name or if_interface_name WHERE provider = 'kentik-firepower' TIMESERIES 5 MINUTES LIMIT 10"
}
],
"yAxisLeft": {
"max": 100,
"min": 0,
"zero": false
}
}
},
{
"visualization": {
"id": "viz.line"
},
"layout": {
"column": 1,
"row": 11,
"height": 4,
"width": 6
},
"title": "Receive Traffic Mbps",
"rawConfiguration": {
"facet": {
"showOtherSeries": false
},
"legend": {
"enabled": true
},
"nrqlQueries": [
{
"accountId": 0,
"query": "FROM Metric SELECT rate(max(kentik.snmp.ifHCInOctets)*8/1000/1000, 1 second) AS 'Mbps' FACET device_name, if_name or if_interface_name WHERE provider = 'kentik-firepower' TIMESERIES 5 MINUTES LIMIT 10"
}
],
"yAxisLeft": {
"zero": true
}
}
},
{
"visualization": {
"id": "viz.line"
},
"layout": {
"column": 7,
"row": 11,
"height": 4,
"width": 6
},
"title": "Transmit Traffic Mbps",
"rawConfiguration": {
"facet": {
"showOtherSeries": false
},
"legend": {
"enabled": true
},
"nrqlQueries": [
{
"accountId": 0,
"query": "FROM Metric SELECT rate(max(kentik.snmp.ifHCOutOctets)*8/1000/1000, 1 second) AS 'Mbps' FACET device_name, if_name or if_interface_name WHERE provider = 'kentik-firepower' TIMESERIES 5 MINUTES LIMIT 10"
}
],
"yAxisLeft": {
"zero": true
}
}
},
{
"visualization": {
"id": "viz.line"
},
"layout": {
"column": 1,
"row": 15,
"height": 4,
"width": 6
},
"title": "Receive Error %",
"rawConfiguration": {
"facet": {
"showOtherSeries": false
},
"legend": {
"enabled": true
},
"nrqlQueries": [
{
"accountId": 0,
"query": "FROM Metric SELECT max(kentik.snmp.ifInErrorPercent) FACET if_name or if_interface_name WHERE provider = 'kentik-firepower' TIMESERIES 5 MINUTES LIMIT 10"
}
],
"yAxisLeft": {
"max": 100,
"min": 0,
"zero": false
}
}
},
{
"visualization": {
"id": "viz.line"
},
"layout": {
"column": 7,
"row": 15,
"height": 4,
"width": 6
},
"title": "Transmit Error %",
"rawConfiguration": {
"facet": {
"showOtherSeries": false
},
"legend": {
"enabled": true
},
"nrqlQueries": [
{
"accountId": 0,
"query": "FROM Metric SELECT max(kentik.snmp.ifOutErrorPercent) FACET if_name or if_interface_name WHERE provider = 'kentik-firepower' TIMESERIES 5 MINUTES LIMIT 10"
}
],
"yAxisLeft": {
"max": 100,
"min": 0,
"zero": false
}
}
}
]
}
]
}
16 changes: 16 additions & 0 deletions entity-types/ext-meraki_device/summary_metrics.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# All Meraki devices
ipAddress:
title: IP Address
unit: STRING
tag:
key: device_ip

receiveErrors:
title: Receive Errors
unit: COUNT
goldenMetric: receiveErrors

transmitErrors:
title: Transmit Errors
unit: COUNT
goldenMetric: transmitErrors

0 comments on commit 879644a

Please sign in to comment.