observIQ / stanza-plugins

stanza-plugins contains plugins for the Stanza Log Agent
Apache License 2.0
10 stars 7 forks source link

Update wildfly/jboss plugin to gain parity with google #398

Closed JonathanWamsley closed 2 years ago

JonathanWamsley commented 2 years ago

Example log:

2022-01-18 13:44:35,372 INFO  [org.wildfly.security] (ServerService Thread Pool -- 27) ELY00001: WildFly Elytron version 1.18.1.Final

Example output:

{
    "timestamp": "2022-01-18T13:44:35.372-05:00",
    "severity": 30,
    "severity_text": "INFO",
    "labels": {
        "file_name": "wildfly.log",
        "log_type": "jboss",
        "plugin_id": "jboss"
    },
    "record": {
        "message": "ELY00001: WildFly Elytron version 1.18.1.Final\n",
        "messageCode": "ELY00001",
        "source": "org.wildfly.security",
        "thread": "ServerService Thread Pool -- 27"
    }
}

Example log2

2022-02-03 15:38:01,506 DEBUG [org.jboss.as.config] (MSC service thread 1-1) Configured system properties:
                   [Standalone] =
                   awt.toolkit = sun.awt.X11.XToolkit
                   file.encoding = UTF-8
                   file.separator = /

Example output2:

{
    "timestamp": "2022-02-03T15:38:01.506-05:00",
    "severity": 20,
    "severity_text": "DEBUG",
    "labels": {
        "file_name": "wildfly.log",
        "log_type": "jboss",
        "plugin_id": "jboss"
    },
    "record": {
        "message": "Configured system properties:\n                   [Standalone] =\n                   awt.toolkit = sun.awt.X11.XToolkit\n                   file.encoding = UTF-8\n                   file.separator = /\n",
        "messageCode": "",
        "source": "org.jboss.as.config",
        "thread": "MSC service thread 1-1"
    }
}
jsirianni commented 2 years ago

What stanza version is this tested with? Im not sure what the issue is, but CI is running into this error:

{
  "level":"error",
  "ts":1645452802.341552,
  "caller":"agent/builder.go:70",
  "msg":"Got errors parsing plugins","errors":[
    {
      "error":"parse plugin file: 
        could not unmarshal plugin file: yaml: line 12: did not find expected key: {
          \"path\":\"../plugins/jboss.yaml\"
        }"
      }
    ],
    "stacktrace":"github.com/observiq/stanza/agent.(*LogAgentBuilder).Build\n\t/home/runner/go/pkg/mod/github.com/observiq/stanza@v1.2.10/agent/builder.go:70\ngithub.com/observiq/stanza-plugins.newAgent\n\t/home/runner/work/stanza-plugins/stanza-plugins/test/config_test.go:47\ngithub.com/observiq/stanza-plugins.TestConfigs.func1\n\t/home/runner/work/stanza-plugins/stanza-plugins/test/config_test.go:26\ntesting.tRunner\n\t/opt/hostedtoolcache/go/1.16.14/x64/src/testing/testing.go:1203"}