Skip to content

Commit b7140a1

Browse files
[8.19](backport #44851) [metricbeat] [meraki] add VPN metrics (#44994)
* [metricbeat] [meraki] add VPN metrics (#44851) * add network_health metricset to meraki metricbeat module * only log unexpected 400s from 'GetDeviceAppliancePerformance' * add vpn status to device health metricset * result of 'mage fmt' * add changelog entry * Simplify 'len' check Co-authored-by: Gabriel Pop <94497545+gpop63@users.noreply.github.com> * use `5 * time.Minute` instead of `300` Co-authored-by: Gabriel Pop <94497545+gpop63@users.noreply.github.com> * increase test coverage for 'meraki' package * fix NOTICE file * check type assertion in timestamp parsing Co-authored-by: Gabriel Pop <94497545+gpop63@users.noreply.github.com> * improve error handing for usage_summary metrics Co-authored-by: Gabriel Pop <94497545+gpop63@users.noreply.github.com> * fix duration comparison in config validation * log and continue on VPN status errors * add missing license header * fix erroneus log message Co-authored-by: Ishleen Kaur <102962586+ishleenk17@users.noreply.github.com> * fix typo in changelog Co-authored-by: Gabriel Pop <94497545+gpop63@users.noreply.github.com> * formatting * do not log API key after config validation * use 'bytes' instead of 'kb' * add missing reference config entries * missing fields/docs files * use base logger instead of instantiating new one Co-authored-by: Anderson Queiroz <me@andersonq.me> * add some missing docs pages --------- Co-authored-by: Gabriel Pop <94497545+gpop63@users.noreply.github.com> Co-authored-by: Ishleen Kaur <102962586+ishleenk17@users.noreply.github.com> Co-authored-by: Anderson Queiroz <me@andersonq.me> (cherry picked from commit 7761543) # Conflicts: # docs/reference/metricbeat/exported-fields-meraki.md # docs/reference/metricbeat/metricbeat-module-meraki.md # docs/reference/toc.yml # go.sum # x-pack/metricbeat/module/meraki/device_health/device_health.go * fix merge conflicts * fix up docs files --------- Co-authored-by: Tom Myers <106530686+tommyers-elastic@users.noreply.github.com>
1 parent 912f25b commit b7140a1

28 files changed

Lines changed: 783 additions & 196 deletions

CHANGELOG.next.asciidoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ otherwise no tag is added. {issue}42208[42208] {pull}42403[42403]
7272
- Fixed a bug where `event.duration` could be missing from an event on Windows systems due to low-resolution clock. {pull}44440[44440]
7373
- Add check for http error codes in the Metricbeat's Prometheus query submodule {pull}44493[44493]
7474
- Sanitize error messages in Fetch method of SQL module {pull}44577[44577]
75+
- Add VPN metrics to meraki module {pull}44851[44851]
7576

7677
*Osquerybeat*
7778

NOTICE.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20615,11 +20615,11 @@ SOFTWARE.
2061520615

2061620616
--------------------------------------------------------------------------------
2061720617
Dependency : github.com/tommyers-elastic/dashboard-api-go/v3
20618-
Version: v3.0.0-20250514220331-e52c94766b6f
20618+
Version: v3.0.0-20250616163611-a325b49669a4
2061920619
Licence type (autodetected): MIT
2062020620
--------------------------------------------------------------------------------
2062120621

20622-
Contents of probable licence file $GOMODCACHE/github.com/tommyers-elastic/dashboard-api-go/v3@v3.0.0-20250514220331-e52c94766b6f/LICENSE:
20622+
Contents of probable licence file $GOMODCACHE/github.com/tommyers-elastic/dashboard-api-go/v3@v3.0.0-20250616163611-a325b49669a4/LICENSE:
2062320623

2062420624
MIT License
2062520625

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -512,5 +512,5 @@ replace (
512512
github.com/fsnotify/fsnotify => github.com/elastic/fsnotify v1.6.1-0.20240920222514-49f82bdbc9e3
513513
github.com/google/gopacket => github.com/elastic/gopacket v1.1.20-0.20241002174017-e8c5fda595e6
514514
github.com/insomniacslk/dhcp => github.com/elastic/dhcp v0.0.0-20200227161230-57ec251c7eb3 // indirect
515-
github.com/meraki/dashboard-api-go/v3 => github.com/tommyers-elastic/dashboard-api-go/v3 v3.0.0-20250514220331-e52c94766b6f
515+
github.com/meraki/dashboard-api-go/v3 => github.com/tommyers-elastic/dashboard-api-go/v3 v3.0.0-20250616163611-a325b49669a4
516516
)

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -979,8 +979,8 @@ github.com/tklauser/go-sysconf v0.3.12/go.mod h1:Ho14jnntGE1fpdOqQEEaiKRpvIavV0h
979979
github.com/tklauser/numcpus v0.6.1/go.mod h1:1XfjsgE2zo8GVw7POkMbHENHzVg3GzmoZ9fESEdAacY=
980980
github.com/tklauser/numcpus v0.8.0 h1:Mx4Wwe/FjZLeQsK/6kt2EOepwwSl7SmJrK5bV/dXYgY=
981981
github.com/tklauser/numcpus v0.8.0/go.mod h1:ZJZlAY+dmR4eut8epnzf0u/VwodKmryxR8txiloSqBE=
982-
github.com/tommyers-elastic/dashboard-api-go/v3 v3.0.0-20250514220331-e52c94766b6f h1:YasKUxSiuObaGcyQ9y4D4w3Y0GbTpStdZjYOexUlyV8=
983-
github.com/tommyers-elastic/dashboard-api-go/v3 v3.0.0-20250514220331-e52c94766b6f/go.mod h1:COGDRzuD05ZS/zp0lDCTDFhx6kAuuNdhDjY0y2ifi5o=
982+
github.com/tommyers-elastic/dashboard-api-go/v3 v3.0.0-20250616163611-a325b49669a4 h1:9FaZ9LJ/bYBf0HV9UKZ9uhD2Jnt10zj10r0Bjo7a/Wc=
983+
github.com/tommyers-elastic/dashboard-api-go/v3 v3.0.0-20250616163611-a325b49669a4/go.mod h1:COGDRzuD05ZS/zp0lDCTDFhx6kAuuNdhDjY0y2ifi5o=
984984
github.com/tomnomnom/linkheader v0.0.0-20180905144013-02ca5825eb80 h1:nrZ3ySNYwJbSpD6ce9duiP+QkD3JuLCcWkdaehUS/3Y=
985985
github.com/tomnomnom/linkheader v0.0.0-20180905144013-02ca5825eb80/go.mod h1:iFyPdL66DjUD96XmzVL3ZntbzcflLnznH0fr99w5VqE=
986986
github.com/ugorji/go v1.1.8/go.mod h1:0lNM99SwWUIRhCXnigEMClngXBk/EmpTXa7mgiewYWA=

metricbeat/docs/fields.asciidoc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51460,6 +51460,14 @@ type: keyword
5146051460

5146151461
--
5146251462

51463+
51464+
*`meraki.network.id`*::
51465+
+
51466+
--
51467+
type: keyword
51468+
51469+
--
51470+
5146351471
[[exported-fields-mongodb]]
5146451472
== MongoDB fields
5146551473

metricbeat/docs/modules/meraki.asciidoc

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ in <<configuration-metricbeat>>. Here is an example configuration:
2828
----
2929
metricbeat.modules:
3030
- module: meraki
31-
metricsets: ["device_health"]
31+
metricsets: ["device_health", "network_health"]
3232
enabled: true
3333
period: 300s
3434
apiKey: "Meraki dashboard API key"
@@ -42,6 +42,10 @@ The following metricsets are available:
4242

4343
* <<metricbeat-metricset-meraki-device_health,device_health>>
4444

45+
* <<metricbeat-metricset-meraki-network_health,network_health>>
46+
4547
include::meraki/device_health.asciidoc[]
4648

49+
include::meraki/network_health.asciidoc[]
50+
4751
:edit_url!:
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
////
2+
This file is generated! See scripts/mage/docs_collector.go
3+
////
4+
:edit_url: https://github.com/elastic/beats/edit/main/x-pack/metricbeat/module/meraki/network_health/_meta/docs.asciidoc
5+
6+
7+
[[metricbeat-metricset-meraki-network_health]]
8+
[role="xpack"]
9+
=== Cisco Meraki network_health metricset
10+
11+
beta[]
12+
13+
include::../../../../x-pack/metricbeat/module/meraki/network_health/_meta/docs.asciidoc[]
14+
15+
16+
:edit_url:
17+
18+
==== Fields
19+
20+
For a description of each field in the metricset, see the
21+
<<exported-fields-meraki,exported fields>> section.
22+
23+
:edit_url!:

metricbeat/docs/modules_list.asciidoc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,8 @@ This file is generated! See scripts/mage/docs_collector.go
217217
|<<metricbeat-module-memcached,Memcached>> |image:./images/icon-no.png[No prebuilt dashboards] |
218218
.1+| .1+| |<<metricbeat-metricset-memcached-stats,stats>>
219219
|<<metricbeat-module-meraki,Cisco Meraki>> beta[] |image:./images/icon-no.png[No prebuilt dashboards] |
220-
.1+| .1+| |<<metricbeat-metricset-meraki-device_health,device_health>> beta[]
220+
.2+| .2+| |<<metricbeat-metricset-meraki-device_health,device_health>> beta[]
221+
|<<metricbeat-metricset-meraki-network_health,network_health>> beta[]
221222
|<<metricbeat-module-mongodb,MongoDB>> |image:./images/icon-yes.png[Prebuilt dashboards are available] |
222223
.5+| .5+| |<<metricbeat-metricset-mongodb-collstats,collstats>>
223224
|<<metricbeat-metricset-mongodb-dbstats,dbstats>>

x-pack/metricbeat/include/list.go

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

x-pack/metricbeat/metricbeat.reference.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1153,7 +1153,7 @@ metricbeat.modules:
11531153

11541154
#----------------------------- Cisco Meraki Module -----------------------------
11551155
- module: meraki
1156-
metricsets: ["device_health"]
1156+
metricsets: ["device_health", "network_health"]
11571157
enabled: true
11581158
period: 300s
11591159
apiKey: "Meraki dashboard API key"

0 commit comments

Comments
 (0)