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 Mobile: Your Brand-New Home Screen

Meet Your New Mobile Hub  Hello Splunk Community!  Staying connected to your data—no matter where you are—is ...

Introducing Value Insights (Beta): Understand the Business Impact your organization ...

Real progress on your strategic priorities starts with knowing the business outcomes your teams are delivering ...

Enterprise Security (ES) Essentials 8.3 is Now GA — Smarter Detections, Faster ...

As of today, Enterprise Security (ES) Essentials 8.3 is now generally available, helping SOC teams simplify ...