I'm using logstash for reading logs and parsing them. I have created a filter to process the JAMFSoftwareServer.log and would like to share this with you.
input {
file {
type => "jss-syslog"
path => "/var/log/jss/JAMFSoftwareServer.log"
codec => multiline {
pattern => "^%{YEAR}-%{MONTHNUM}-%{MONTHDAY} "
negate => true
what => "previous"
}
}
}
filter {
if [type] == "jss-syslog" {
grok {
match => [ "message", "%{YEAR}-%{MONTHNUM}-%{MONTHDAY} %{HOUR}:%{MINUTE}(?::%{SECOND})(?![0-9]),%{INT} [%{LOGLEVEL:jss_severity}s*] [%{DATA:jss_thread}s*] [%{DATA:jss_process}s*] - %{GREEDYDATA:jss_message}" ]
}
grok {
match => [ "path", "/var/log/jss/JAMFSoftwareServer.log" ]
}
}
}
Logstash will output the tImestamp, severity (info, warn, error), thread, process/service/function and message. You can use all these values to further analyse the JAMF Software Server. In my case we output the values to elasticsearch.
If you want to know more about logstash have a look at http://logstash.net/ and http://www.elasticsearch.org/.
