I am trying to implement a way to get host meta data pushed from my clients.
I have followed this link, however I do not see any fields get added to the event.
Here is my current metricbeat.yml
configuration file:
#========================== Modules configuration ============================
metricbeat.config.modules:
# Glob pattern for configuration loading
path: ${path.config}/modules.d/*.yml
# Set to true to enable config reloading
reload.enabled: true
# Period on which files under path should be checked for changes
reload.period: 30s
processors:
- add_host_metadata:
netinfo.enabled: true
cache.ttl: -1
geo:
name: nyc-dc1-rack1
location: 40.7128, -74.0060
continent_name: North America
country_iso_code: US
region_name: New York
region_iso_code: NY
city_name: New York
#
# The following example enriches each event with process metadata using
# process IDs included in the event.
#
#================================ Outputs =====================================
# Configure what output to use when sending the data collected by the beat.
#----------------------------- Logstash output --------------------------------
output.logstash:
# The Logstash hosts
hosts: ["server:5044"]
Here is the event in Kibana:
{
"_index": "cltb-metricbeat-7.3.2-2019.12.03",
"_type": "_doc",
"_id": "CLhNzG4B1KXevdxWHMwB",
"_version": 1,
"_score": null,
"_source": {
"model": "HP EliteBook 840 G5",
"@timestamp": "2019-12-03T15:07:14.639Z",
"agent": {
"version": "7.3.2",
"type": "metricbeat",
"hostname": "host",
"id": "0a9abfdb-402a-46ae-bc97-2ad18134d3ff",
"ephemeral_id": "b509fe23-4983-49cc-a0eb-06eb1ff25daf"
},
"metricset": {
"name": "process"
},
"event": {
"duration": 51043100,
"dataset": "system.process",
"module": "system"
},
"systemtype": "x64-based PC",
"user": {
"name": "NT AUTHORITY\\NETWORK SERVICE"
},
"os_caption": "Microsoft Windows 10 Enterprise",
"@version": "1",
"tags": [
"beats_input_raw_event"
],
"sentry_earlyadopter": "Early Adopters - Ring 0 - IT Client",
"os_version": "10.0.17763",
"service": {
"type": "system"
},
"system": {
"process": {
"cpu": {
"start_time": "2019-12-03T13:09:08.379Z",
"total": {
"pct": 0.0907,
"value": 163765,
"norm": {
"pct": 0.0113
}
}
},
"state": "running",
"memory": {
"rss": {
"pct": 0.0005,
"bytes": 8204288
},
"size": 3375104,
"share": 0
},
"cmdline": "C:\\WINDOWS\\system32\\svchost.exe -k NetworkService -p -s Dnscache"
}
},
"os_buildnumber": "17763",
"ecs": {
"version": "1.0.1"
},
"process": {
"args": [
"C:\\WINDOWS\\system32\\svchost.exe",
"-k",
"NetworkService",
"-p",
"-s",
"Dnscache"
],
"pgid": 0,
"ppid": 948,
"pid": 1844,
"name": "svchost.exe"
}
},
"fields": {
"system.process.cpu.start_time": [
"2019-12-03T13:09:08.379Z"
],
"@timestamp": [
"2019-12-03T15:07:14.639Z"
]
},
"highlight": {
"agent.hostname": [
"@kibana-highlighted-field@host@/kibana-highlighted-field@"
]
},
"sort": [
1575385634639
]
}
Is there something I have to do in logstash to get these fields to get populated with the relevant host data? I tried removing my enrichment logic in logstash and it appears to be showing up now:
{
"_index": "cltb-metricbeat-7.3.2-2019.12.03",
"_type": "_doc",
"_id": "1sVhzG4By8QVVSUY8QaY",
"_version": 1,
"_score": null,
"_source": {
"event": {
"module": "windows",
"dataset": "windows.service",
"duration": 202883300
},
"@timestamp": "2019-12-03T15:29:59.929Z",
"host": {
"architecture": "x86_64",
"ip": [
"fe80::d55c:7b6:e4a9:75ce",
"10.3.87.127",
"fe80::2827:c72f:c34:a5fb",
"169.254.165.251",
"fe80::55bc:c197:969c:d531",
"169.254.213.49",
"fe80::75:adc8:a95b:a3f8",
"169.254.163.248",
"fe80::5072:8bd2:f703:4252",
"169.254.66.82"
],
"geo": {
"region_iso_code": "NY",
"name": "nyc-dc1-rack1",
"region_name": "New York",
"country_iso_code": "US",
"continent_name": "North America",
"location": "40.7128, -74.0060",
"city_name": "New York"
},
"id": "14f4ba81-438a-4e9e-9aa6-dd9ef59a0221",
"name": "host",
"hostname": "host",
"mac": [
"f4:39:09:d8:95:d2",
"3c:6a:a7:8e:9b:36",
"3e:6a:a7:8e:9b:35",
"3c:6a:a7:8e:9b:35",
"3c:6a:a7:8e:9b:39"
],
"os": {
"name": "Windows 10 Enterprise",
"build": "17763.864",
"kernel": "10.0.17763.864 (WinBuild.160101.0800)",
"platform": "windows",
"version": "10.0",
"family": "windows"
}
},
"windows": {
"service": {
"start_name": "LocalSystem",
"start_type": "Automatic",
"id": "mEgkPHPp8j",
"state": "Running",
"name": "AdobeARMservice",
"uptime": {
"ms": 8449984
},
"path_name": "\"C:\\Program Files (x86)\\Common Files\\Adobe\\ARM\\1.0\\armsvc.exe\"",
"display_name": "Adobe Acrobat Update Service",
"pid": 5260
}
},
"metricset": {
"name": "service"
},
"ecs": {
"version": "1.0.1"
},
"@version": "1",
"agent": {
"ephemeral_id": "a5441a1f-a09e-43bf-b080-44f54238d9b4",
"id": "0a9abfdb-402a-46ae-bc97-2ad18134d3ff",
"hostname": "host",
"type": "metricbeat",
"version": "7.3.2"
},
"service": {
"type": "windows"
},
"tags": [
"beats_input_raw_event"
]
},
"fields": {
"@timestamp": [
"2019-12-03T15:29:59.929Z"
]
},
"highlight": {
"agent.hostname": [
"@kibana-highlighted-field@host@/kibana-highlighted-field@"
]
},
"sort": [
1575386999929
]
}
Is there anyway to just send active network adapter? Or will this require some logstash parsing?
Thanks,
Raged