Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing tags to profiles tables #6765

Merged
merged 8 commits into from
Jun 2, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion snmp/datadog_checks/snmp/data/profiles/_base_cisco.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,11 @@ metrics:
symbols:
- OID: 1.3.6.1.4.1.9.9.13.1.4.1.3
name: ciscoEnvMonFanState
metric_tags:
- column:
OID: 1.3.6.1.4.1.9.9.13.1.4.1.1
name: ciscoEnvMonFanStatusIndex
tag: fan_status_index

# stackport specific info - every physical stackport has an entry in ifTable
- MIB: CISCO-STACKWISE-MIB
Expand Down Expand Up @@ -186,7 +191,7 @@ metrics:
- OID: 1.3.6.1.4.1.9.9.388.1.2.2.1.3
name: cvsChassisUpTime
metric_tags:
- column:
- column:
OID: 1.3.6.1.4.1.9.9.388.1.2.2.1.1
name: cvsChassisSwitchID
tag: chassis_switch_id
44 changes: 36 additions & 8 deletions snmp/datadog_checks/snmp/data/profiles/_base_cisco_voice.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,23 @@ metrics:
OID: 1.3.6.1.2.1.25.5.1.1.1
metric_tags:
- column:
name: hrSWRunStatus
OID: 1.3.6.1.2.1.25.4.2.1.7
table: hrSWRunTable
tag: status

name: hrSWRunIndex
OID: 1.3.6.1.2.1.25.4.2.1.1
table: hrSWRunTable
tag: run_index
- MIB: HOST-RESOURCES-MIB
table:
name: hrSWRunTable
OID: 1.3.6.1.2.1.25.4.2
symbols:
- name: hrSWRunStatus
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is hrSWRunStatus removed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure it makes sense to have both as a tag on the previous table and as a metric directly.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I originally had it as a metric only, but then added it also as a tag since it was in hrSWRunPerfTable and seemed like the most fitting tag there. Would it make sense to keep it as a metric and tag with a different metric here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Possibly! We need to see which entry in that table would make sense for tagging as well then.

Copy link
Contributor

@sarah-witt sarah-witt May 27, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could tag with hrSWRunName

OID: 1.3.6.1.2.1.25.4.2.1.7

metric_tags:
- column:
name: hrSWRunIndex
OID: 1.3.6.1.2.1.25.4.2.1.1
table: hrSWRunTable
tag: run_index
- MIB: CISCO-CVP-MIB
table:
name: ccvpSipTable
Expand All @@ -43,6 +47,12 @@ metrics:
OID: 1.3.6.1.4.1.9.9.590.1.6.1.1.1
- name: ccvpSipRtTotalCallLegs
OID: 1.3.6.1.4.1.9.9.590.1.6.1.1.2
metric_tags:
- column:
name: ccvpServiceIndex
OID: 1.3.6.1.4.1.9.9.590.1.5.1.1.1
table: ccvpServiceTable
tag: service_index

- MIB: CISCO-CVP-MIB
symbol:
Expand Down Expand Up @@ -79,6 +89,13 @@ metrics:
OID: 1.3.6.1.4.1.9.9.63.1.3.8.5.1.1
- name: cvCallVolMediaOutgoingCalls
OID: 1.3.6.1.4.1.9.9.63.1.3.8.5.1.2
metric_tags:
- MIB: IF-MIB
column:
OID: 1.3.6.1.2.1.31.1.1.1.1
name: ifName
table: ifXTable
tag: interface

- MIB: CISCO-VOICE-DIAL-CONTROL-MIB
table:
Expand All @@ -89,6 +106,9 @@ metrics:
OID: 1.3.6.1.4.1.9.9.63.1.3.8.4.1.1
- name: cvCallVolPeerOutgoingCalls
OID: 1.3.6.1.4.1.9.9.63.1.3.8.4.1.2
metric_tags:
- index: 1
tag: peer_index

- MIB: DIAL-CONTROL-MIB
forced_type: monotonic_count
Expand All @@ -104,7 +124,9 @@ metrics:
OID: 1.3.6.1.2.1.10.21.1.2.2.1.6
- name: dialCtlPeerStatsSuccessCalls
OID: 1.3.6.1.2.1.10.21.1.2.2.1.3

metric_tags:
- index: 1
tag: peer_index

- MIB: CISCO-CONTACT-CENTER-APPS-MIB
table:
Expand All @@ -131,10 +153,16 @@ metrics:
table:
name: cccaRouterTable
OID: 1.3.6.1.4.1.9.9.473.1.3.1
symbols:
symbols:
- name: cccaRouterAgentsLoggedOn
OID: 1.3.6.1.4.1.9.9.473.1.3.1.1.3
- name: cccaRouterCallsInProgress
OID: 1.3.6.1.4.1.9.9.473.1.3.1.1.4
- name: cccaRouterCallsInQueue
OID: 1.3.6.1.4.1.9.9.473.1.3.1.1.8
metric_tags:
- column:
OID: 1.3.6.1.4.1.9.9.473.1.2.1.1.1
name: cccaInstanceNumber
table: cccaInstanceTable
tag: instance_number
8 changes: 4 additions & 4 deletions snmp/datadog_checks/snmp/data/profiles/apc_ups.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,15 @@ metrics:
OID: 1.3.6.1.4.1.318.1.1.1.7.2.3
name: upsAdvTestDiagnosticsResults
- MIB: PowerNet-MIB
table:
table:
OID: 1.3.6.1.4.1.318.1.1.1.12.1.2
name: upsOutletGroupStatusTable
symbols:
symbols:
- OID: 1.3.6.1.4.1.318.1.1.1.12.1.2.1.3
name: upsOutletGroupStatusGroupState
metric_tags:
metric_tags:
- tag: outlet_group_name
column:
column:
OID: 1.3.6.1.4.1.318.1.1.1.12.1.2.1.2
name: upsOutletGroupStatusName

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
extends:
- _base_cisco.yaml
- _generic-router-ip.yaml

sysobjectid: 1.3.6.1.4.1.9.1.1537
2 changes: 1 addition & 1 deletion snmp/datadog_checks/snmp/data/profiles/isilon.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ metrics:
OID: 1.3.6.1.4.1.12124.1.1.2
name: clusterHealth
- MIB: ISILON-MIB
symbol:
symbol:
OID: 1.3.6.1.4.1.12124.1.2.1.1
name: clusterIfsInBytes
- MIB: ISILON-MIB
Expand Down
9 changes: 8 additions & 1 deletion snmp/datadog_checks/snmp/data/profiles/palo-alto.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,14 @@ metrics:
name: panEntryFRUModulePowerUsed
- OID: 1.3.6.1.4.1.25461.1.1.7.1.2.1.1.2
name: panEntryFRUModuleNumPorts

metric_tags:
- MIB: ENTITY-MIB
column:
OID: 1.3.6.1.2.1.47.1.1.1.1.2
name: entPhysicalDescr
table: entPhysicalTable
tag: ent_descr

- MIB: PAN-ENTITY-EXT-MIB
table:
OID: 1.3.6.1.4.1.25461.1.1.7.1.3.1
Expand Down
38 changes: 30 additions & 8 deletions snmp/tests/test_profiles.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,16 @@ def test_cisco_voice(aggregator):

tags = ['snmp_profile:cisco_icm', 'snmp_host:test'] + common.CHECK_TAGS

resources = ["hrSWRunPerfMem", "hrSWRunPerfCPU", "hrSWRunStatus"]
resources = ["hrSWRunPerfMem", "hrSWRunPerfCPU"]

for resource in resources:
aggregator.assert_metric('snmp.{}'.format(resource), metric_type=aggregator.GAUGE, tags=tags)

run_indices = [4, 7, 8, 9, 10, 18, 24, 29, 30]
for index in run_indices:
status_tags = tags + ['run_index:{}'.format(index)]
aggregator.assert_metric('snmp.hrSWRunStatus', metric_type=aggregator.GAUGE, tags=status_tags)

cvp_gauges = [
"ccvpSipIntAvgLatency1",
"ccvpSipIntAvgLatency2",
Expand Down Expand Up @@ -109,6 +114,15 @@ def test_cisco_voice(aggregator):
calls = [
"cvCallVolPeerIncomingCalls",
"cvCallVolPeerOutgoingCalls",
]

peers = [4, 13, 14, 17, 18, 22, 25, 30, 31]
for call in calls:
for peer in peers:
peer_tags = tags + ["peer_index:{}".format(peer)]
aggregator.assert_metric('snmp.{}'.format(call), metric_type=aggregator.GAUGE, tags=peer_tags)

calls = [
"cvCallVolMediaIncomingCalls",
"cvCallVolMediaOutgoingCalls",
]
Expand All @@ -124,7 +138,9 @@ def test_cisco_voice(aggregator):
]

for ctl in dial_controls:
aggregator.assert_metric('snmp.{}'.format(ctl), metric_type=aggregator.MONOTONIC_COUNT, tags=tags)
aggregator.assert_metric(
'snmp.{}'.format(ctl), metric_type=aggregator.MONOTONIC_COUNT, tags=["peer_index:7"] + tags
)

pim_tags = tags + ['pim_host:test', 'pim_name:name', 'pim_num:2']
aggregator.assert_metric('snmp.{}'.format("cccaPimStatus"), metric_type=aggregator.GAUGE, tags=pim_tags)
Expand Down Expand Up @@ -622,9 +638,12 @@ def test_cisco_nexus(aggregator):
'snmp.ciscoEnvMonSupplyState', metric_type=aggregator.GAUGE, tags=['power_source:1'] + common_tags,
)

aggregator.assert_metric(
'snmp.ciscoEnvMonFanState', metric_type=aggregator.GAUGE, tags=common_tags,
)
fan_indices = [4, 6, 7, 16, 21, 22, 25, 27]
for index in fan_indices:
tags = ['fan_status_index:{}'.format(index)] + common_tags
aggregator.assert_metric(
'snmp.ciscoEnvMonFanState', metric_type=aggregator.GAUGE, tags=tags,
)

aggregator.assert_metric('snmp.cswStackPortOperStatus', metric_type=aggregator.GAUGE)
aggregator.assert_metric(
Expand Down Expand Up @@ -1134,9 +1153,12 @@ def test_cisco_asa_5525(aggregator):
'snmp.ciscoEnvMonSupplyState', metric_type=aggregator.GAUGE, tags=['power_source:1'] + common_tags,
)

aggregator.assert_metric(
'snmp.ciscoEnvMonFanState', metric_type=aggregator.GAUGE, tags=common_tags,
)
fan_indices = [4, 6, 7, 16, 21, 22, 25, 27]
for index in fan_indices:
tags = ['fan_status_index:{}'.format(index)] + common_tags
aggregator.assert_metric(
'snmp.ciscoEnvMonFanState', metric_type=aggregator.GAUGE, tags=tags,
)

aggregator.assert_metric('snmp.cswStackPortOperStatus', metric_type=aggregator.GAUGE)
aggregator.assert_metric(
Expand Down