I must be doing something wrong with the MultiDecoder; I have two
PayloadRegexDecoders that work independent, but when I try to use them in a
MultiDecoder I get an error that "All subdecoders failed." Any help is
appreciated:


[augie@ewhserver1020 ~]$ hekad -config=./nagios_log.toml
2014/07/14 19:28:15 Loading: [nagios_log]
2014/07/14 19:28:15 Loading: [nagios_log_decoder]
2014/07/14 19:28:15 MultiDecoder[nagios_log_decoder] Loading: service
2014/07/14 19:28:15 Loading: [debug]
2014/07/14 19:28:15 Loading: [ProtobufDecoder]
2014/07/14 19:28:15 Starting hekad...
2014/07/14 19:28:15 Output started:  debug
2014/07/14 19:28:15 MessageRouter started.
2014/07/14 19:28:15 Input started: nagios_log
2014/07/14 19:28:15 MultiDecoder[nagios_log_decoder] Loading: service
2014/07/14 19:28:15 Decoder 'nagios_log-nagios_log_decoder' error: All
subdecoders failed.
2014/07/14 19:28:15 Decoder 'nagios_log-nagios_log_decoder' error: All
subdecoders failed.


[hekad]
base_dir = "/tmp/hekad"

[nagios_log]
Type = "LogstreamerInput"
log_directory = "/var/log/nagios/"
file_match = 'nagios\.log'
decoder = "nagios_log_decoder"
hostname = "admin.pubfactory.com"

[nagios_log_decoder]
type = "MultiDecoder"
order= ['service','host']

[nagios_log_decoder.subs.service]
Type = "PayloadRegexDecoder"
match_regex = '^\[(?P<nagios_epoch>\d+)\] (?P<nagios_type>SERVICE
NOTIFICATION):
(?P<nagios_notifyname>\S+);(?P<nagios_hostname>\S+);(?P<nagios_service>.+);(?P<nagios_state>\S+);(?P<nagios_contact>\S+);(?P<nagios_message>.+)'
timestamp_layout = '1136239445'
timestamp_location = 'America/New_York'
log_errors = false

[nagios_log_decoder.subs.service.message_fields]
Type    = "NagiosLogFile"
Timestamp = "%nagios_epoch%"
nagios_type = "%nagios_type%"
nagios_notifyname = "%nagios_notifyname%"
nagios_hostname = "%nagios_hostname%"
nagios_service = "%nagios_service%"
nagios_state = "%nagios_state%"
nagios_contact = "%nagios_contact%"
nagios_message = "%nagios_message%"

[nagios_log_decoder.subs.host]
Type = "PayloadRegexDecoder"
match_regex = '^\[(?P<nagios_epoch>\d+)\] (?P<nagios_type>HOST
NOTIFICATION):
(?P<nagios_notifyname>\S+);(?P<nagios_hostname>\S+);(?P<nagios_state>.+);(?P<nagios_contact>\S+);(?P<nagios_message>.+)'
timestamp_layout = '1136239445'
timestamp_location = 'America/New_York'
log_errors = false

[nagios_log_decoder.subs.host.message_fields]
Type    = "NagiosLogFile"
Timestamp = "%nagios_epoch%"
nagios_type = "%nagios_type%"
nagios_notifyname = "%nagios_notifyname%"
nagios_hostname = "%nagios_hostname%"
nagios_state = "%nagios_state%"
nagios_contact = "%nagios_contact%"
nagios_message = "%nagios_message%"

[debug]
type = "LogOutput"
message_matcher = "Logger == 'nagios_log'"



-- 
Augie Schwer    -    [email protected]    -    http://schwer.us
_______________________________________________
Heka mailing list
[email protected]
https://mail.mozilla.org/listinfo/heka

Reply via email to