Splunk Search

Force users to always use "optional" field with built-in SPL command

brinley
Path Finder

I'd like to ensure that all users on my search head are forced to include a specific field (along with a specific value) whenever they are employing a certain command in an SPL query. The particular field I want them to always use is listed as an "optional" argument in the command's SPL docs--basically, I want to make this field required and prevent users from giving this field any value that is different from the one I specify.

For example: I'd like to modify head so that a user always has to use limit=50 whenever they invoke this command. Currently, limit is listed as an "optional" head argument--I want to make it required AND prevent users from giving limit any value besides 50.

I'm thinking there might be something I can add to commands.conf to achieve this but am not sure. Any suggestions?

Get Updates on the Splunk Community!

New in Observability - Improvements to Custom Metrics SLOs, Log Observer Connect & ...

The latest enhancements to the Splunk observability portfolio deliver improved SLO management accuracy, better ...

Improve Data Pipelines Using Splunk Data Management

  Register Now   This Tech Talk will explore the pipeline management offerings Edge Processor and Ingest ...

3-2-1 Go! How Fast Can You Debug Microservices with Observability Cloud?

Register Join this Tech Talk to learn how unique features like Service Centric Views, Tag Spotlight, and ...