All Apps and Add-ons

What is the difference between bandwidth.sh and interfaces.sh in Splunk *nix Add-On?

bojanisch
Path Finder

Hi everyone,

I was wondering if anyone could tell me the main difference between these sourcetypes. As far as I can see in the scripts, they're both collecting network interface data, however while interfaces.sh relies heavily on the ifconfig module which is broadly available among different Linux distributions, the bandwidth script uses the sar module, or as a substitution netstat on Solaris machines for example.

However looking at it from the official part, it seems that the interfaces sourcetype (indexed by interfaces.sh) isn't even used in Splunk's CIM, while the bandwidth sourcetype (for which I couldn't even find any trace in the official Add-On documentation) is used as main network activity source.

So getting back to my question, both commands list information about a systems network communication. Where is their big difference and which one should I use in which cases?

0 Karma

Azeemering
Builder

My two cents;

Interfaces.sh - Shows stats per link-level Ethernet interface (simply, NIC)
sourcetype=interfaces
Runs an eval ifconfig command and gets mac address, ipv4/6 addres, collisions, RXbytes, Rxerrors, Txbytes, Txerrors, speed and duplex settings.

Bandwith.sh shows Network Utilization, Total Network, cpu statistics
Runs the sar -n command and gets the rxPackets_PS txPackets_PS rxKB_PS txKB_PS
sourcetype=bandwith

I believe that the Nix app mostly uses the interfaces sourcetype and not so much the bandwoth sourcetype.

Best thing you can do is enable it on a test system and research both sourcetypes:
sourcetype=interfaces or sourcetype=bandwith

bandwith.sh explanation is missing from splunkdocs, or I cannot find it.

Get Updates on the Splunk Community!

Splunk Observability for AI

Don’t miss out on an exciting Tech Talk on Splunk Observability for AI! Discover how Splunk’s agentic AI ...

[Puzzles] Solve, Learn, Repeat: Dereferencing XML to Fixed-length events

This challenge was first posted on Slack #puzzles channelFor a previous puzzle, I needed a set of fixed-length ...

Stay Connected: Your Guide to December Tech Talks, Office Hours, and Webinars!

What are Community Office Hours? Community Office Hours is an interactive 60-minute Zoom series where ...