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!

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

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