|
Packit Service |
a2ae7a |
(*
|
|
Packit Service |
a2ae7a |
Module: Splunk
|
|
Packit Service |
a2ae7a |
Parses /opt/splunk/etc/*, /opt/splunkforwarder/etc/system/local/*.conf and /opt/splunkforwarder/etc/apps/*/(default|local)/*.conf
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
Author: Tim Brigham, Jason Antman
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
About: Reference
|
|
Packit Service |
a2ae7a |
https://docs.splunk.com/Documentation/Splunk/6.5.0/Admin/AboutConfigurationFiles
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
About: License
|
|
Packit Service |
a2ae7a |
This file is licenced under the LGPL v2+
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
About: Lens Usage
|
|
Packit Service |
a2ae7a |
Works like IniFile lens, with anonymous section for entries without enclosing section and allowing underscore-prefixed keys.
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
About: Configuration files
|
|
Packit Service |
a2ae7a |
This lens applies to conf files under /opt/splunk/etc and /opt/splunkforwarder/etc See <filter>.
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
About: Examples
|
|
Packit Service |
a2ae7a |
The <Test_Splunk> file contains various examples and tests.
|
|
Packit Service |
a2ae7a |
*)
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
module Splunk =
|
|
Packit Service |
a2ae7a |
autoload xfm
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
let comment = IniFile.comment IniFile.comment_re IniFile.comment_default
|
|
Packit Service |
a2ae7a |
let sep = IniFile.sep IniFile.sep_re IniFile.sep_default
|
|
Packit Service |
a2ae7a |
let empty = IniFile.empty
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
let entry_re = ( /[A-Za-z_][A-Za-z0-9._-]*/ )
|
|
Packit Service |
a2ae7a |
let setting = entry_re
|
|
Packit Service |
a2ae7a |
let title = IniFile.indented_title_label "target" IniFile.record_label_re
|
|
Packit Service |
a2ae7a |
let entry = [ key entry_re . sep . IniFile.sto_to_eol? . IniFile.eol ] | comment
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
let record = IniFile.record title entry
|
|
Packit Service |
a2ae7a |
let anon = [ label ".anon" . (entry|empty)+ ]
|
|
Packit Service |
a2ae7a |
let lns = anon . (record)* | (record)*
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
let filter = incl "/opt/splunk/etc/system/local/*.conf"
|
|
Packit Service |
a2ae7a |
. incl "/opt/splunk/etc/apps/*/local/*.conf"
|
|
Packit Service |
a2ae7a |
. incl "/opt/splunkforwarder/etc/system/local/*.conf"
|
|
Packit Service |
a2ae7a |
. incl "/opt/splunkforwarder/etc/apps/*/default/*.conf"
|
|
Packit Service |
a2ae7a |
. incl "/opt/splunkforwarder/etc/apps/*/local/*.conf"
|
|
Packit Service |
a2ae7a |
let xfm = transform lns filter
|