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!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...