All Apps and Add-ons

How to locate and edit an existing macro search from an app (Splunk App for Unix and Linux)?

leochan
Explorer

Is there anyway to locate and edit an existing macro search from an App (SA-nix) in this case?

    CPU_Exceeds_Percent_by_Host
        Open in Search Edit
        admin   SA-nix  Global

    CPU_Under_Percent_by_Host
        Open in Search Edit
        admin   SA-nix  Global

    Disk_Used_Exceeds_Perc_by_Host
        Open in Search Edit
        admin   SA-nix  Global

    IO_Utilization_Exceeds_Threshold
        Open in Search Edit
        admin   SA-nix  Global

    IO_Wait_Exceeds_Threshold
        Open in Search Edit
        admin   SA-nix  Global

An example search macro from SA-nix. If I try to append it with function I got an error. Thoughts?

`CPU_Exceeds_Percent_by_Host("`_unix_alert_threshold_CPU_Exceeds_Percent_by_Host`")` 

This results in:

Error in 'fields' command: Invalid argument: 'earliest=-30m' 
`CPU_Exceeds_Percent_by_Host("`_unix_alert_threshold_CPU_Exceeds_Percent_by_Host`")` earliest=-30m
0 Karma
1 Solution

renjith_nair
Legend

its not advisable to change the objects which are part of an app because when you upgrade the app, all your changes will be overwritten. You can write a different macro and use it in case needed.

However, macros are available on disk

$SPUNK_HOME/etc/apps/SA-nix/default/macros.conf

Copy the default macros to $SPUNK_HOME/etc/apps/SA-nix/local/macros.conf and make changes if you still require

Happy Splunking!

View solution in original post

renjith_nair
Legend

its not advisable to change the objects which are part of an app because when you upgrade the app, all your changes will be overwritten. You can write a different macro and use it in case needed.

However, macros are available on disk

$SPUNK_HOME/etc/apps/SA-nix/default/macros.conf

Copy the default macros to $SPUNK_HOME/etc/apps/SA-nix/local/macros.conf and make changes if you still require

Happy Splunking!
Get Updates on the Splunk Community!

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

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 ...