Skip to content

Commit 6343413

Browse files
fix: trim at dashboard port number in SNMP device address (#1092)
Signed-off-by: Ilya Kheifets <ikheifets@splunk.com>
1 parent 2c9a051 commit 6343413

File tree

5 files changed

+43
-13
lines changed

5 files changed

+43
-13
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: dashboard-release
2+
on:
3+
push:
4+
tags:
5+
- "v*"
6+
7+
jobs:
8+
dashboard-release:
9+
name: Dashboard release
10+
runs-on: ubuntu-latest
11+
permissions:
12+
contents: write
13+
packages: write
14+
steps:
15+
- name: Check out code
16+
uses: actions/checkout@v4
17+
- name: Upload dashboard to release assets
18+
run: |
19+
VERSION=$(echo $GITHUB_REF | cut -d / -f 3)
20+
gh release upload $VERSION dashboard/dashboard.xml
21+
env:
22+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
- add support for IPv6 polling and traps for kubernetes deployment
88
- add support for IPv6 polling and traps for docker deployment
99
- add nodeSelector and podAntiAffinity to sim chart
10+
- add support for new IP format in dashboard
1011

1112
### Fixed
1213

dashboard/dashboard.xml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@
1212
<fieldForLabel>ip</fieldForLabel>
1313
<fieldForValue>ip</fieldForValue>
1414
<search>
15-
<query>index=* sourcetype="*:container:splunk-connect-for-snmp-*" "Scheduler: Sending due task sc4snmp;*;*;poll" | rex field=_raw "Sending due task sc4snmp;(?&lt;ip&gt;.+);(?&lt;num&gt;\d+);poll" | stats count by ip</query>
15+
<query>index=* sourcetype="*:container:splunk-connect-for-snmp-*" "Scheduler: Sending due task sc4snmp;*;*;poll" | rex field=_raw "Sending due task sc4snmp;(?&lt;ip&gt;.+):(?&lt;port&gt;\d+);(?&lt;num&gt;\d+);poll" | stats count by ip</query>
1616
<earliest>-24h@h</earliest>
1717
<latest>now</latest>
1818
</search>
1919
</input>
2020
<chart>
2121
<title>In case of unsuccessful polling status, please copy spl query from this chart and find failed tasks. Explanation of error log messages you can find at the https://splunk.github.io/splunk-connect-for-snmp/main/bestpractices/</title>
2222
<search>
23-
<query>index=* sourcetype="*:container:splunk-connect-for-snmp-*" splunk_connect_for_snmp.snmp.tasks.poll $poll_status_host$ | rex field=_raw "Task splunk_connect_for_snmp.*\[*\] (?&lt;status&gt;\w+)" | where status != "received" | timechart count by status</query>
23+
<query>index=* sourcetype="*:container:splunk-connect-for-snmp-*" splunk_connect_for_snmp.snmp.tasks.poll "$poll_status_host$" | rex field=_raw "Task splunk_connect_for_snmp.*\[*\] (?&lt;status&gt;\w+)" | where status != "received" | timechart count by status</query>
2424
<earliest>-24h@h</earliest>
2525
<latest>now</latest>
2626
<refresh>5m</refresh>
@@ -37,7 +37,7 @@
3737
<option name="refresh.display">progressbar</option>
3838
<option name="trellis.enabled">0</option>
3939
<drilldown>
40-
<link target="_blank">search?q=index%3D*%20sourcetype%3D%22*%3Acontainer%3Asplunk-connect-for-snmp-*%22%20splunk_connect_for_snmp.snmp.tasks.poll%20$poll_status_host$%20%7C%20rex%20field%3D_raw%20%22Task%20splunk_connect_for_snmp.*%5C%5B*%5C%5D%20(%3F%3Cstatus%3E%5Cw%2B)%22%20%7C%20where%20status%20!%3D%20%22received%22&amp;earliest=-24h@h&amp;latest=now</link>
40+
<link target="_blank">search?q=index%3D*%20sourcetype%3D%22*%3Acontainer%3Asplunk-connect-for-snmp-*%22%20splunk_connect_for_snmp.snmp.tasks.poll%20%22$poll_status_host$%22%20%7C%20rex%20field%3D_raw%20%22Task%20splunk_connect_for_snmp.*%5C%5B*%5C%5D%20(%3F%3Cstatus%3E%5Cw%2B)%22%20%7C%20where%20status%20!%3D%20%22received%22&amp;earliest=-24h@h&amp;latest=now</link>
4141
</drilldown>
4242
</chart>
4343
</panel>
@@ -51,15 +51,15 @@
5151
<fieldForLabel>ip</fieldForLabel>
5252
<fieldForValue>ip</fieldForValue>
5353
<search>
54-
<query>index=* sourcetype="*:container:splunk-connect-for-snmp-*" "Scheduler: Sending due task sc4snmp;*;*;poll" | rex field=_raw "Sending due task sc4snmp;(?&lt;ip&gt;.+);(?&lt;num&gt;\d+);poll" | stats count by ip</query>
54+
<query>index=* sourcetype="*:container:splunk-connect-for-snmp-*" "Scheduler: Sending due task sc4snmp;*;*;poll" | rex field=_raw "Sending due task sc4snmp;(?&lt;ip&gt;.+):(?&lt;port&gt;\d+);(?&lt;num&gt;\d+);poll" | stats count by ip</query>
5555
<earliest>-24h@h</earliest>
5656
<latest>now</latest>
5757
</search>
5858
</input>
5959
<chart>
6060
<title>Using this chart you can understand when SC4SNMP scheduled polling for your SNMP device last time. The process works if it runs regularly.</title>
6161
<search>
62-
<query>index=* sourcetype="*:container:splunk-connect-for-snmp-*" Scheduler: Sending due task sc4snmp;$poll_host$;*poll | timechart count</query>
62+
<query>index=* sourcetype="*:container:splunk-connect-for-snmp-*" Scheduler: Sending due task sc4snmp;*;*poll "$poll_host$" | timechart count</query>
6363
<earliest>-24h@h</earliest>
6464
<latest>now</latest>
6565
<refresh>5m</refresh>
@@ -70,7 +70,7 @@
7070
<option name="height">331</option>
7171
<option name="refresh.display">progressbar</option>
7272
<drilldown>
73-
<link target="_blank">search?q=index%3D*%20sourcetype%3D%22*%3Acontainer%3Asplunk-connect-for-snmp-*%22%20Scheduler%3A%20Sending%20due%20task%20sc4snmp%3B$poll_host$%3B*poll&amp;earliest=-24h@h&amp;latest=now</link>
73+
<link target="_blank">search?q=index%3D*%20sourcetype%3D%22*%3Acontainer%3Asplunk-connect-for-snmp-*%22%20Scheduler%3A%20Sending%20due%20task%20sc4snmp%3B*%3B*poll%20%22$poll_host$%22&amp;earliest=-24h@h&amp;latest=now</link>
7474
</drilldown>
7575
</chart>
7676
</panel>
@@ -86,15 +86,15 @@
8686
<fieldForLabel>ip</fieldForLabel>
8787
<fieldForValue>ip</fieldForValue>
8888
<search>
89-
<query>index=* sourcetype="*:container:splunk-connect-for-snmp-*" "Scheduler: Sending due task sc4snmp;*;walk" | rex field=_raw "Sending due task sc4snmp;(?&lt;ip&gt;.+);walk" | stats count by ip</query>
89+
<query>index=* sourcetype="*:container:splunk-connect-for-snmp-*" "Scheduler: Sending due task sc4snmp;*;walk" | rex field=_raw "Sending due task sc4snmp;(?&lt;ip&gt;.+):(?&lt;port&gt;\d+);walk" | stats count by ip</query>
9090
<earliest>-24h@h</earliest>
9191
<latest>now</latest>
9292
</search>
9393
</input>
9494
<chart>
9595
<title>In case of unsuccessful walk status, please copy spl query from this chart and find failed tasks. Explanation of error log messages you can find at the https://splunk.github.io/splunk-connect-for-snmp/main/bestpractices/</title>
9696
<search>
97-
<query>index=* sourcetype="*:container:splunk-connect-for-snmp-*" splunk_connect_for_snmp.snmp.tasks.walk $walk_status_host$ | rex field=_raw "Task splunk_connect_for_snmp.*\[*\] (?&lt;status&gt;\w+)" | where status != "received" | timechart count by status</query>
97+
<query>index=* sourcetype="*:container:splunk-connect-for-snmp-*" splunk_connect_for_snmp.snmp.tasks.walk "$walk_status_host$" | rex field=_raw "Task splunk_connect_for_snmp.*\[*\] (?&lt;status&gt;\w+)" | where status != "received" | timechart count by status</query>
9898
<earliest>-24h@h</earliest>
9999
<latest>now</latest>
100100
<refresh>5m</refresh>
@@ -105,7 +105,7 @@
105105
<option name="height">327</option>
106106
<option name="refresh.display">progressbar</option>
107107
<drilldown>
108-
<link target="_blank">search?q=index%3D*%20sourcetype%3D%22kube%3Acontainer%3Asplunk-connect-for-snmp-*%22%20splunk_connect_for_snmp.snmp.tasks.walk%20$walk_status_host$%20%7C%20rex%20field%3D_raw%20%22Task%20splunk_connect_for_snmp.*%5C%5B*%5C%5D%20(%3F%3Cstatus%3E%5Cw%2B)%22%20%7C%20where%20status%20!%3D%20%22received%22&amp;earliest=-24h@h&amp;latest=now</link>
108+
<link target="_blank">search?q=index%3D*%20sourcetype%3D%22kube%3Acontainer%3Asplunk-connect-for-snmp-*%22%20splunk_connect_for_snmp.snmp.tasks.walk%20%22$walk_status_host$%22%20%7C%20rex%20field%3D_raw%20%22Task%20splunk_connect_for_snmp.*%5C%5B*%5C%5D%20(%3F%3Cstatus%3E%5Cw%2B)%22%20%7C%20where%20status%20!%3D%20%22received%22&amp;earliest=-24h@h&amp;latest=now</link>
109109
</drilldown>
110110
</chart>
111111
</panel>
@@ -119,15 +119,15 @@
119119
<fieldForLabel>ip</fieldForLabel>
120120
<fieldForValue>ip</fieldForValue>
121121
<search>
122-
<query>index=* sourcetype="*:container:splunk-connect-for-snmp-*" "Scheduler: Sending due task sc4snmp;*;walk" | rex field=_raw "Sending due task sc4snmp;(?&lt;ip&gt;.+);walk" | stats count by ip</query>
122+
<query>index=* sourcetype="*:container:splunk-connect-for-snmp-*" "Scheduler: Sending due task sc4snmp;*;walk" | rex field=_raw "Sending due task sc4snmp;(?&lt;ip&gt;.+):(?&lt;port&gt;\d+);walk" | stats count by ip</query>
123123
<earliest>-24h@h</earliest>
124124
<latest>now</latest>
125125
</search>
126126
</input>
127127
<chart>
128128
<title>Using this chart you can understand when SC4SNMP scheduled walk for your SNMP device last time. The process works if it runs regularly.</title>
129129
<search>
130-
<query>index=* sourcetype="*:container:splunk-connect-for-snmp-*" Scheduler: Sending due task sc4snmp;$walk_host$;walk | timechart count</query>
130+
<query>index=* sourcetype="*:container:splunk-connect-for-snmp-*" Scheduler: Sending due task sc4snmp;*;walk "$walk_host$" | timechart count</query>
131131
<earliest>-24h@h</earliest>
132132
<latest>now</latest>
133133
<refresh>5m</refresh>
@@ -138,7 +138,7 @@
138138
<option name="height">324</option>
139139
<option name="refresh.display">progressbar</option>
140140
<drilldown>
141-
<link target="_blank">search?q=index%3D*%20sourcetype%3D%22*%3Acontainer%3Asplunk-connect-for-snmp-*%22%20Scheduler%3A%20Sending%20due%20task%20sc4snmp%3B$walk_host$%3Bwalk&amp;earliest=-24h@h&amp;latest=now</link>
141+
<link target="_blank">search?q=index%3D*%20sourcetype%3D%22*%3Acontainer%3Asplunk-connect-for-snmp-*%22%20Scheduler%3A%20Sending%20due%20task%20sc4snmp%3B*%3Bwalk%20%22$walk_host$%22&amp;earliest=-24h@h&amp;latest=now</link>
142142
</drilldown>
143143
</chart>
144144
</panel>

docs/dashboard.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,12 @@
22

33
Using dashboard you can monitor SC4SNMP and be sure that is healthy and working correctly.
44

5+
56
## Presetting
67

8+
!!! info
9+
Dashboard compatible with SC4SNMP 1.11+
10+
711
1. [Create metrics indexes](gettingstarted/splunk-requirements.md#requirements-for-splunk-enterprise-or-enterprise-cloud) in Splunk.
812
2. Enable metrics logging for your runtime:
913
* For K8S install [Splunk OpenTelemetry Collector for K8S](gettingstarted/sck-installation.md)
@@ -13,7 +17,7 @@ Using dashboard you can monitor SC4SNMP and be sure that is healthy and working
1317

1418
1. In Splunk platform open **Search -> Dashboards**.
1519
2. Click on **Create New Dashboard** and make an empty dashboard. Be sure to choose Classic Dashboards.
16-
3. In the **Edit Dashboard** view, go to Source and replace the initial xml with the contents of [dashboard/dashboard.xml](https://github.com/splunk/splunk-connect-for-snmp/blob/main/dashboard/dashboard.xml) published in the SC4SNMP repository.
20+
3. In the **Edit Dashboard** view, go to Source and replace the initial xml with the contents of **dashboard.xml**. This file you cand find on [release page](https://github.com/splunk/splunk-connect-for-snmp/releases) for your version in attachments.
1721
4. Save your changes. Your dashboard is ready to use.
1822

1923

mkdocs.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ markdown_extensions:
1414
- codehilite
1515
- attr_list
1616
- md_in_html
17+
- admonition
18+
- pymdownx.details
19+
- pymdownx.superfences
1720

1821
plugins:
1922
- search:

0 commit comments

Comments
 (0)