- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How to add OPTIONS to the Splunk_TA_nix scripts?
*/10 * * * * root /usr/lib64/sa/sa1 -S XALL 600 1.
This setup collected the average CPU usage over a 10-minute period, wrote this value to a sar file, and repeated this every 10 minutes.
- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

This is a scripted input so it doesn't have all the mechanics associated with modular inputs - you cannot pass parameters to it by setting config items in input config stanza. But it works on UF whereas modular inputs don't.
Anyway, the scripts for ta_nix are more like examples to tune and adjust to your needs than ready-for-production.
- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Rick,
thanks for reply.
Many customers are using this app as final product from Splunk.
We would like to enable injections as easy as possible and not break connections between Splunk_TA_nix and our custom app. You can see my example in article.
Only think what is needed for this to work is small change in scripts.
Here is very easy and dirty example how the script could be improved:
diff cpu_metric.sh cpu_metric_new.sh
4a5,11
> # OPTIONS
> if [ "$#" -eq 1 ]; then
> OPTIONS="$1"
> else
> OPTIONS="-P ALL 1 1"
> fi
>
24c31,32
< CMD='sar -P ALL 1 1'
---
> #CMD='sar -P ALL 1 1'
> CMD="sar $OPTIONS"
I hope I am not the only one who will appreciate this.
