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

[Metricbeat] add a network_summary metricset #15196

Merged
merged 24 commits into from
Jan 13, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
d00d6db
initial commit of system/network_summary
fearful-symmetry Dec 18, 2019
2c37aa4
add tests, clean up
fearful-symmetry Dec 18, 2019
27d36de
update notice
fearful-symmetry Dec 18, 2019
61e394d
update golang.org/x/sys
fearful-symmetry Dec 19, 2019
f7ac244
update notice
fearful-symmetry Dec 19, 2019
0568dd5
fix change in sid.String
fearful-symmetry Dec 19, 2019
2f8cf0a
try and revert vendor to master
fearful-symmetry Dec 30, 2019
8389e4a
try and revert vendor to upstream/master
fearful-symmetry Dec 30, 2019
d705aa5
reset vendor from master
fearful-symmetry Dec 30, 2019
cf725ea
re-update go-sysinfo
fearful-symmetry Dec 30, 2019
5d7fc72
Merge remote-tracking branch 'upstream/master' into add-network-summary
fearful-symmetry Jan 2, 2020
d1df761
Merge remote-tracking branch 'upstream/master' into add-network-summary
fearful-symmetry Jan 3, 2020
ae561f5
update fields
fearful-symmetry Jan 3, 2020
83f803a
cleanup, updates
fearful-symmetry Jan 3, 2020
b444cab
make update
fearful-symmetry Jan 6, 2020
f55fea2
change mapping
fearful-symmetry Jan 6, 2020
0e4f7aa
update tests
fearful-symmetry Jan 6, 2020
6e92d88
remove change to winlogbeat for x/sys compat issues
fearful-symmetry Jan 6, 2020
0ab13db
remove extra spaces
fearful-symmetry Jan 6, 2020
699bd31
update fields
fearful-symmetry Jan 6, 2020
9d6d91d
update mapping to use uint64
fearful-symmetry Jan 13, 2020
73cbc2e
Merge remote-tracking branch 'upstream/master' into add-network-summary
fearful-symmetry Jan 13, 2020
b970bf4
update changelog
fearful-symmetry Jan 13, 2020
9c30581
update notice
fearful-symmetry Jan 13, 2020
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
1 change: 1 addition & 0 deletions CHANGELOG.next.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -591,6 +591,7 @@ https://github.com/elastic/beats/compare/v7.0.0-alpha2...master[Check the HEAD d
- Add a `system/service` metricset for systemd data. {pull}14206[14206]
- Add cost warnings for the azure module. {pull}15356[15356]
- Release elb module as GA. {pull}15485[15485]
- Add a `system/network_summary` metricset {pull}15196[15196]

*Packetbeat*

Expand Down
4 changes: 2 additions & 2 deletions NOTICE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1365,8 +1365,8 @@ Apache License 2.0

--------------------------------------------------------------------
Dependency: github.com/elastic/go-sysinfo
Version: v1.2.1
Revision: cee67141de1bdfb666367301f44e559e58b16734
Version: v1.3.0
Revision: b719bc42e40963c707571af208683a049e61f07f
License type (autodetected): Apache-2.0
./vendor/github.com/elastic/go-sysinfo/LICENSE.txt:
--------------------------------------------------------------------
Expand Down
57 changes: 57 additions & 0 deletions metricbeat/docs/fields.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -31922,6 +31922,63 @@ type: long

--

[float]
=== network_summary

Metrics relating to global network activity



*`system.network_summary.ip.*`*::
+
--
IP counters


type: object

--

*`system.network_summary.tcp.*`*::
+
--
TCP counters


type: object

--

*`system.network_summary.udp.*`*::
+
--
UDP counters


type: object

--

*`system.network_summary.udp_lite.*`*::
+
--
UDP Lite counters


type: object

--

*`system.network_summary.icmp.*`*::
+
--
ICMP counters


type: object

--

[float]
=== process

Expand Down
4 changes: 4 additions & 0 deletions metricbeat/docs/modules/system.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,8 @@ The following metricsets are available:

* <<metricbeat-metricset-system-network,network>>

* <<metricbeat-metricset-system-network_summary,network_summary>>

* <<metricbeat-metricset-system-process,process>>

* <<metricbeat-metricset-system-process_summary,process_summary>>
Expand Down Expand Up @@ -286,6 +288,8 @@ include::system/memory.asciidoc[]

include::system/network.asciidoc[]

include::system/network_summary.asciidoc[]

include::system/process.asciidoc[]

include::system/process_summary.asciidoc[]
Expand Down
23 changes: 23 additions & 0 deletions metricbeat/docs/modules/system/network_summary.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
////
This file is generated! See scripts/mage/docs_collector.go
////

[[metricbeat-metricset-system-network_summary]]
=== System network_summary metricset

beta[]

include::../../../module/system/network_summary/_meta/docs.asciidoc[]


==== Fields

For a description of each field in the metricset, see the
<<exported-fields-system,exported fields>> section.

Here is an example document generated by this metricset:

[source,json]
----
include::../../../module/system/network_summary/_meta/data.json[]
----
3 changes: 2 additions & 1 deletion metricbeat/docs/modules_list.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ This file is generated! See scripts/mage/docs_collector.go
|<<metricbeat-module-statsd,Statsd>> beta[] |image:./images/icon-no.png[No prebuilt dashboards] |
.1+| .1+| |<<metricbeat-metricset-statsd-server,server>> beta[]
|<<metricbeat-module-system,System>> |image:./images/icon-yes.png[Prebuilt dashboards are available] |
.16+| .16+| |<<metricbeat-metricset-system-core,core>>
.17+| .17+| |<<metricbeat-metricset-system-core,core>>
|<<metricbeat-metricset-system-cpu,cpu>>
|<<metricbeat-metricset-system-diskio,diskio>>
|<<metricbeat-metricset-system-entropy,entropy>>
Expand All @@ -198,6 +198,7 @@ This file is generated! See scripts/mage/docs_collector.go
|<<metricbeat-metricset-system-load,load>>
|<<metricbeat-metricset-system-memory,memory>>
|<<metricbeat-metricset-system-network,network>>
|<<metricbeat-metricset-system-network_summary,network_summary>> beta[]
|<<metricbeat-metricset-system-process,process>>
|<<metricbeat-metricset-system-process_summary,process_summary>>
|<<metricbeat-metricset-system-raid,raid>>
Expand Down
1 change: 1 addition & 0 deletions metricbeat/include/list_common.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion metricbeat/module/system/fields.go

Large diffs are not rendered by default.

245 changes: 245 additions & 0 deletions metricbeat/module/system/network_summary/_meta/data.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,245 @@
{
"@timestamp": "2017-10-12T08:05:34.853Z",
"event": {
"dataset": "system.network_summary",
"duration": 115000,
"module": "system"
},
"metricset": {
"name": "network_summary",
"period": 10000
},
"service": {
"type": "system"
},
"system": {
"network_summary": {
"icmp": {
"InAddrMaskReps": 0,
Copy link

Choose a reason for hiding this comment

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

is it common practice in metricbeat to use camel case for a set of 'undocumented' metrics? Do we want to convert to snake case (e.g. github.com/stoewer/go-strcase).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

So, my thinking was that since we're inserting "blind" metrics with no real opinionated manipulating of the data, keeping the key values the same as the their OS values might be a good idea. Let me hunt around the system module to see if we do this in other places.

Copy link

Choose a reason for hiding this comment

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

@exekias @jsoriano Do we have any precedence on using Pascal/CamelCase in events in metricbeat?

Copy link
Contributor

Choose a reason for hiding this comment

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

We have done this when ingesting metrics in raw from a source, to avoid confusion. AWS cloudwatch is an example. That said, I don't have a strong opinion here

"InAddrMasks": 0,
"InCsumErrors": 0,
"InDestUnreachs": 835,
"InEchoReps": 0,
"InEchos": 1,
"InErrors": 20,
"InMsgs": 836,
"InParmProbs": 0,
"InRedirects": 0,
"InSrcQuenchs": 0,
"InTimeExcds": 0,
"InTimestampReps": 0,
"InTimestamps": 0,
"InType3": 835,
"InType8": 1,
"OutAddrMaskReps": 0,
"OutAddrMasks": 0,
"OutDestUnreachs": 940,
"OutEchoReps": 1,
"OutEchos": 0,
"OutErrors": 0,
"OutMsgs": 941,
"OutParmProbs": 0,
"OutRedirects": 0,
"OutSrcQuenchs": 0,
"OutTimeExcds": 0,
"OutTimestampReps": 0,
"OutTimestamps": 0,
"OutType0": 1,
"OutType3": 940
},
"ip": {
"DefaultTTL": 64,
"ForwDatagrams": 33389,
"Forwarding": 1,
"FragCreates": 0,
"FragFails": 0,
"FragOKs": 0,
"InAddrErrors": 19,
"InBcastOctets": 431773621,
"InBcastPkts": 1686995,
"InCEPkts": 0,
"InCsumErrors": 0,
"InDelivers": 38037698,
"InDiscards": 0,
"InECT0Pkts": 3160941,
"InECT1Pkts": 0,
"InHdrErrors": 0,
"InMcastOctets": 0,
"InMcastPkts": 0,
"InNoECTPkts": 129521210,
"InNoRoutes": 0,
"InOctets": 167733588581,
"InReceives": 41266648,
"InTruncatedPkts": 0,
"InUnknownProtos": 0,
"OutBcastOctets": 0,
"OutBcastPkts": 0,
"OutDiscards": 1,
"OutMcastOctets": 0,
"OutMcastPkts": 0,
"OutNoRoutes": 4,
"OutOctets": 75001958794,
"OutRequests": 29261852,
"ReasmFails": 0,
"ReasmOKs": 0,
"ReasmOverlaps": 0,
"ReasmReqds": 0,
"ReasmTimeout": 0
},
"tcp": {
"ActiveOpens": 6172,
"ArpFilter": 0,
"AttemptFails": 1488,
"BusyPollRxPackets": 0,
"CurrEstab": 9,
"DelayedACKLocked": 111,
"DelayedACKLost": 1587,
"DelayedACKs": 516004,
"EmbryonicRsts": 2,
"EstabResets": 404,
"IPReversePathFilter": 0,
"InCsumErrors": 0,
"InErrs": 4,
"InSegs": 38005498,
"ListenDrops": 0,
"ListenOverflows": 0,
"LockDroppedIcmps": 0,
"MaxConn": -1,
"OfoPruned": 0,
"OutOfWindowIcmps": 39,
"OutRsts": 10739,
"OutSegs": 66991971,
"PAWSActive": 0,
"PAWSEstab": 19,
"PFMemallocDrop": 0,
"PassiveOpens": 1411,
"PruneCalled": 0,
"RcvPruned": 0,
"RetransSegs": 15996,
"RtoAlgorithm": 1,
"RtoMax": 120000,
"RtoMin": 200,
"SyncookiesFailed": 2,
"SyncookiesRecv": 0,
"SyncookiesSent": 0,
"TCPACKSkippedChallenge": 2,
"TCPACKSkippedFinWait2": 0,
"TCPACKSkippedPAWS": 1,
"TCPACKSkippedSeq": 4,
"TCPACKSkippedSynRecv": 8,
"TCPACKSkippedTimeWait": 0,
"TCPAbortFailed": 0,
"TCPAbortOnClose": 321,
"TCPAbortOnData": 2613,
"TCPAbortOnLinger": 0,
"TCPAbortOnMemory": 0,
"TCPAbortOnTimeout": 84,
"TCPAckCompressed": 232116,
"TCPAutoCorking": 162,
"TCPBacklogCoalesce": 509441,
"TCPBacklogDrop": 0,
"TCPChallengeACK": 2,
"TCPDSACKIgnoredNoUndo": 4623,
"TCPDSACKIgnoredOld": 242,
"TCPDSACKOfoRecv": 2,
"TCPDSACKOfoSent": 15,
"TCPDSACKOldSent": 1668,
"TCPDSACKRecv": 8205,
"TCPDSACKUndo": 36,
"TCPDeferAcceptDrop": 0,
"TCPDelivered": 54733743,
"TCPDeliveredCE": 0,
"TCPFastOpenActive": 0,
"TCPFastOpenActiveFail": 0,
"TCPFastOpenBlackhole": 0,
"TCPFastOpenCookieReqd": 0,
"TCPFastOpenListenOverflow": 0,
"TCPFastOpenPassive": 0,
"TCPFastOpenPassiveFail": 0,
"TCPFastRetrans": 5324,
"TCPFromZeroWindowAdv": 977,
"TCPFullUndo": 3,
"TCPHPAcks": 4648338,
"TCPHPHits": 22005367,
"TCPHystartDelayCwnd": 3535,
"TCPHystartDelayDetect": 24,
"TCPHystartTrainCwnd": 4609,
"TCPHystartTrainDetect": 205,
"TCPKeepAlive": 312560,
"TCPLossFailures": 1,
"TCPLossProbeRecovery": 387,
"TCPLossProbes": 12748,
"TCPLossUndo": 437,
"TCPLostRetransmit": 1499,
"TCPMD5Failure": 0,
"TCPMD5NotFound": 0,
"TCPMD5Unexpected": 0,
"TCPMTUPFail": 0,
"TCPMTUPSuccess": 0,
"TCPMemoryPressures": 0,
"TCPMemoryPressuresChrono": 0,
"TCPMinTTLDrop": 0,
"TCPOFODrop": 0,
"TCPOFOMerge": 13,
"TCPOFOQueue": 266342,
"TCPOrigDataSent": 54724129,
"TCPPartialUndo": 145,
"TCPPureAcks": 6490261,
"TCPRcvCoalesce": 5762438,
"TCPRcvCollapsed": 0,
"TCPRcvQDrop": 0,
"TCPRenoFailures": 0,
"TCPRenoRecovery": 0,
"TCPRenoRecoveryFail": 0,
"TCPRenoReorder": 0,
"TCPReqQFullDoCookies": 0,
"TCPReqQFullDrop": 0,
"TCPRetransFail": 0,
"TCPSACKDiscard": 123,
"TCPSACKReneging": 0,
"TCPSACKReorder": 2707,
"TCPSYNChallenge": 4,
"TCPSackFailures": 5,
"TCPSackMerged": 13758,
"TCPSackRecovery": 241,
"TCPSackRecoveryFail": 3,
"TCPSackShiftFallback": 1455,
"TCPSackShifted": 37107,
"TCPSlowStartRetrans": 2,
"TCPSpuriousRTOs": 3,
"TCPSpuriousRtxHostQueues": 16,
"TCPSynRetrans": 346,
"TCPTSReorder": 732,
"TCPTimeWaitOverflow": 0,
"TCPTimeouts": 2178,
"TCPToZeroWindowAdv": 977,
"TCPWantZeroWindowAdv": 109048,
"TCPWinProbe": 0,
"TCPZeroWindowDrop": 0,
"TW": 1443,
"TWKilled": 0,
"TWRecycled": 0
},
"udp": {
"IgnoredMulti": 0,
"InCsumErrors": 0,
"InDatagrams": 31359,
"InErrors": 0,
"NoPorts": 61,
"OutDatagrams": 31756,
"RcvbufErrors": 0,
"SndbufErrors": 0
},
"udpLite": {
"IgnoredMulti": 0,
"InCsumErrors": 0,
"InDatagrams": 0,
"InErrors": 0,
"NoPorts": 0,
"OutDatagrams": 0,
"RcvbufErrors": 0,
"SndbufErrors": 0
}
}
}
}
Loading