Getting Data In

Is there a way to get a list of heavy forwarders via rest?

a212830
Champion

Hi,

Is there a way to get a list of heavy forwarders via REST? We are creating our own HFW health page, since the DMC doesn't support it.

0 Karma

koshyk
Super Champion
0 Karma

lycollicott
Motivator

You could try this if all of your heavies follow a consistent naming convention:
| rest splunk_server=*hf* /services/server/introspection/indexer

Or this if you define a custom group:

| rest splunk_server_group=* splunk_server_group=* /services/search/distributed/peers 
| search search_groups=dmc_customgroup_Heavy_Forwarder
| table search_groups, server_roles, host
0 Karma

coltwanger
Contributor

Do you need to use REST?

 index=_internal source=*metrics.log group=tcpin_connections 
 | eval sourceHost=if(isnull(hostname), sourceHost,hostname) 
 | rename connectionType as connectType
 | eval connectType=case(fwdType=="uf","univ fwder", fwdType=="lwf", "lightwt fwder",fwdType=="full", "heavy fwder", connectType=="cooked" or connectType=="cookedSSL","Splunk fwder", connectType=="raw" or connectType=="rawSSL","legacy fwder")
 | eval version=if(isnull(version),"pre 4.2",version)
 | rename version as Ver 
 | fields connectType sourceIp sourceHost destPort kb tcp_eps tcp_Kprocessed tcp_KBps splunk_server Ver
 | eval Indexer= splunk_server
 | eval Hour=relative_time(_time,"@h")
 | stats avg(tcp_KBps) sum(tcp_eps) sum(tcp_Kprocessed) sum(kb) by Hour connectType sourceIp sourceHost destPort Indexer Ver
 | fieldformat Hour=strftime(Hour,"%x %H")

https://answers.splunk.com/answers/73908/listing-forwarders.html

sloshburch
Splunk Employee
Splunk Employee

I think this might be the best answer right now since I'm not confident that the Monitoring Console's server roles are exposed for filtering...

0 Karma

lycollicott
Motivator

Change your first line to this: index=_internal source=*metrics.log group=tcpin_connections fwdType="full"

If you don't specify fwdType="full" you will get all the universal forwarders listed too.

0 Karma
Get Updates on the Splunk Community!

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...