This repository has been archived by the owner on Oct 16, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 43
Missing context in loglines #16
Comments
Hi, Thanks for reporting this! |
My PR seems to produce better but not optimal output. Example: {
"host": "server1.example.net",
"logs": [
{
"log": {
"sources": {
"source": "Puppet"
},
"messages": {
"message": "Retrieving pluginfacts"
},
"level": "info"
}
},
{
"log": {
"sources": {
"source": "Puppet"
},
"messages": {
"message": "Retrieving plugin"
},
"level": "info"
}
},
{
"log": {
"sources": {
"source": "Puppet"
},
"messages": {
"message": "Loading facts"
},
"level": "info"
}
},
{
"log": {
"sources": {
"source": "Puppet"
},
"messages": {
"message": "Caching catalog for server1.example.net"
},
"level": "info"
}
},
{
"log": {
"sources": {
"source": "Puppet"
},
"messages": {
"message": "Applying configuration version '14892238e0aef552e223b9fbd976816290a7c7af'"
},
"level": "info"
}
},
{
"log": {
"sources": {
"source": "/Stage[pre-main]/Yum::Repo::Redhat/Yum::Managed_yumrepo[optional]/File[/etc/yum.repos.d/optional.repo]/ensure"
},
"messages": {
"message": "current_value absent, should be file (noop)"
},
"level": "notice"
}
},
{
"log": {
"sources": {
"source": "/Stage[pre-main]/Yum::Repo::Redhat/Yum::Managed_yumrepo[latest]/File[/etc/yum.repos.d/latest.repo]/ensure"
},
"messages": {
"message": "current_value absent, should be file (noop)"
},
"level": "notice"
}
},
{
"log": {
"sources": {
"source": "/Stage[pre-main]/Yum::Repo::Redhat/Yum::Managed_yumrepo[latest]/Yumrepo[latest]/ensure"
},
"messages": {
"message": "current_value absent, should be present (noop)"
},
"level": "notice"
}
},
{
"log": {
"sources": {
"source": "Yum::Managed_yumrepo[latest]"
},
"messages": {
"message": "Would have triggered 'refresh' from 2 events"
},
"level": "notice"
}
},
{
"log": {
"sources": {
"source": "/Stage[pre-main]/Yum::Repo::Redhat/Yum::Managed_yumrepo[optional]/Yumrepo[optional]/ensure"
},
"messages": {
"message": "current_value absent, should be present (noop)"
},
"level": "notice"
}
},
{
"log": {
"sources": {
"source": "Yum::Managed_yumrepo[optional]"
},
"messages": {
"message": "Would have triggered 'refresh' from 2 events"
},
"level": "notice"
}
},
{
"log": {
"sources": {
"source": "/Stage[pre-main]/Yum::Repo::Redhat/Yum::Managed_yumrepo[base]/File[/etc/yum.repos.d/base.repo]/ensure"
},
"messages": {
"message": "current_value absent, should be file (noop)"
},
"level": "notice"
}
},
{
"log": {
"sources": {
"source": "/Stage[pre-main]/Yum::Repo::Redhat/Yum::Managed_yumrepo[base]/Yumrepo[base]/ensure"
},
"messages": {
"message": "current_value absent, should be present (noop)"
},
"level": "notice"
}
},
{
"log": {
"sources": {
"source": "Yum::Managed_yumrepo[base]"
},
"messages": {
"message": "Would have triggered 'refresh' from 2 events"
},
"level": "notice"
}
},
{
"log": {
"sources": {
"source": "/Stage[pre-main]/Yum::Repo::Redhat/Yum::Managed_yumrepo[supplementary]/File[/etc/yum.repos.d/supplementary.repo]/ensure"
},
"messages": {
"message": "current_value absent, should be file (noop)"
},
"level": "notice"
}
},
{
"log": {
"sources": {
"source": "/Stage[pre-main]/Yum::Repo::Redhat/Yum::Managed_yumrepo[supplementary]/Yumrepo[supplementary]/ensure"
},
"messages": {
"message": "current_value absent, should be present (noop)"
},
"level": "notice"
}
},
{
"log": {
"sources": {
"source": "/Stage[pre-main]/Yum::Repo::Redhat/Yum::Managed_yumrepo[updates]/File[/etc/yum.repos.d/updates.repo]/ensure"
},
"messages": {
"message": "current_value absent, should be file (noop)"
},
"level": "notice"
}
},
{
"log": {
"sources": {
"source": "/Stage[pre-main]/Yum::Repo::Redhat/Yum::Managed_yumrepo[updates]/Yumrepo[updates]/ensure"
},
"messages": {
"message": "current_value absent, should be present (noop)"
},
"level": "notice"
}
},
{
"log": {
"sources": {
"source": "Yum::Managed_yumrepo[updates]"
},
"messages": {
"message": "Would have triggered 'refresh' from 2 events"
},
"level": "notice"
}
},
{
"log": {
"sources": {
"source": "Yum::Managed_yumrepo[supplementary]"
},
"messages": {
"message": "Would have triggered 'refresh' from 2 events"
},
"level": "notice"
}
},
{
"log": {
"sources": {
"source": "Class[Yum::Repo::Redhat]"
},
"messages": {
"message": "Would have triggered 'refresh' from 5 events"
},
"level": "notice"
}
},
{
"log": {
"sources": {
"source": "Stage[pre-main]"
},
"messages": {
"message": "Would have triggered 'refresh' from 1 events"
},
"level": "notice"
}
},
{
"log": {
"sources": {
"source": "Puppet"
},
"messages": {
"message": "Finished catalog run in 9.38 seconds"
},
"level": "notice"
}
}
],
"status": "unchanged",
"puppet_version": "3.7.4",
"@timestamp": "2015-07-02T19:23:50.000Z",
"metrics": {
"changes": {
"total": 0
},
"time": {
"host": 0.001477247,
"yumrepo": 0.014270488,
"package": 2.03667594,
"cron": 0.001084018,
"datacat_fragment": 0.010101403,
"filebucket": 0.000317264,
"ssh_authorized_key": 0.001278677,
"mailalias": 0.000170429,
"resources": 0.000327163,
"file": 1.994042057,
"concat_build": 0.00462418,
"archive": 0.001027334,
"user": 0.003336606,
"total": 16.63869804,
"exec": 0.472291369,
"config_retrieval": 9.700802881,
"concat_fragment": 0.001244236,
"service": 0.599483248,
"group": 0.002227579,
"datacat_collector": 0.006951844,
"augeas": 1.783607975,
"anchor": 0.003356102
},
"events": {
"failure": 0,
"noop": 10,
"success": 0,
"total": 10
},
"resources": {
"restarted": 0,
"out_of_sync": 10,
"changed": 0,
"failed_to_restart": 0,
"total": 244,
"skipped": 0,
"scheduled": 0,
"failed": 0
}
},
"report_format": 4,
"environment": "production",
"tags": [
"puppet-apply",
"elasticsearch"
],
"end_time": "2015-07-02T19:23:50Z",
"start_time": "2015-07-02T19:23:25Z",
"message": "Puppet run on server1.example.net unchanged",
"@version": 1,
"type": "puppet-report"
} |
I updated it so now. all logs are put into an array with level and source. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Can context be given to these puppet reports? The log line "created" is not informative of what actually happened. Here is an example puppet-report:
The text was updated successfully, but these errors were encountered: