- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How to concatenate events from multiple hosts as single host?
- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
index=indexname addtotals row=f col=t labelfield=host sum(host)
no results i am trying this
- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Can you send me the query how did you get this result
dallvcrfix1p | 1913 |
dallvcrfix1p.ops.invesco.net | 20 |
- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
i m using query index=ivz_unix_linux_events |stats count by host
and in events we have hostnames with 2 hostnames so i want add count both for single filed
allhebsms1p | 6434 |
dallhebsms1p.ops.invesco.net | 41 |
dallvcrfix1p | 1688 |
dallvcrfix1p.ops.invesco.net | 82 |
dallvcrfix2p | 2027 |
dallvcrfix2p.ops.invesco.net | 20 |
fanlvairw1d | 2773 |
fanlvairw1d.ops.invesco.net |
- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
|rex field=host "(?<host>[^\.]+)"
|stats count by host
Should do the trick.
- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
while trying with above query still i am getting hostname are not getting one
- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for this
what this regex will do
index=index name |rex field=host "(?<host>[^\.]+)"
|stats count by host |dedup host
i am using this search
as based below hostnames showing for single host due to dns resolution getting like this in splunk and how we can solve this problem as single hostname
what was the workaround for to concatenate for both as single host name
dallvcrfix2p | 2027 |
dallvcrfix2p.ops.invesco.net | 20 |
- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
if you just want total use this after your query
addtotals row=f col=t labelfield=host sum(field_you_want_count)
