Installation

Setup splunk using augeas when title has equal char in name

koudis
Explorer

Hi,
I'm using augeas to setup Splunk configs.
But I'm not able to setup titles with equal char in the name.

I can print these titles.

augtool> print /files/opt/splunk/etc/system/local/server.conf
...
/files/opt/splunk/etc/system/local/server.conf/queue
/files/opt/splunk/etc/system/local/server.conf/queue/maxSize = "600MB"
/files/opt/splunk/etc/system/local/server.conf/queue=parsingQueue
/files/opt/splunk/etc/system/local/server.conf/queue=parsingQueue/maxSize = "6MB"
...

But I don't know how to setup them.

augtool> set /files/opt/splunk/etc/system/local/server.conf/queue=parsingQueue/maxSize 600MB
error: Invalid path expression
error: type error
/files/opt/splunk/etc/system/local/server.conf/queue=parsingQueue/maxSize|=|

Final config should be:

[queue]
maxSize=600MB
[queue=parsingQueue]
 maxSize=6MB

Does anyone know how to setup this type of config using augeas or another tool from CLI ?

Tags (2)
0 Karma
1 Solution

koudis
Explorer

I had some old Splunk.aug lens in my system. Upgrade solved it.

/files/opt/splunk/etc/system/local/server.conf/target[7] = "queue"
/files/opt/splunk/etc/system/local/server.conf/target[7]/maxSize = "600MB"
/files/opt/splunk/etc/system/local/server.conf/target[8] = "queue=parsingQueue"
/files/opt/splunk/etc/system/local/server.conf/target[8]/maxSize = "6MB"

View solution in original post

0 Karma

koudis
Explorer

I had some old Splunk.aug lens in my system. Upgrade solved it.

/files/opt/splunk/etc/system/local/server.conf/target[7] = "queue"
/files/opt/splunk/etc/system/local/server.conf/target[7]/maxSize = "600MB"
/files/opt/splunk/etc/system/local/server.conf/target[8] = "queue=parsingQueue"
/files/opt/splunk/etc/system/local/server.conf/target[8]/maxSize = "6MB"
0 Karma

koudis
Explorer

Just to describe it more deeply. You can setup it using puppet like this:

'server.conf-queue-agg':
        context     => "/files/opt/splunk/etc/system/local/server.conf",
        incl            => "/opt/splunk/etc/system/local/server.conf",
        lens            => "Splunk.lns",
        changes     => [
                    "set target[. = 'queue=aggQueue'] queue=aggQueue",
                    "set target[. = 'queue=aggQueue']/maxSize 200MB",
                ];
0 Karma
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 ...