I'm sure this issue is mine but I can't seem to get past it. I have a simple json return that looks like this:
{
"git": {
"local": {
"branch": {
"ahead": "0",
"behind": "0"
}
},
"commit": {
"id": {
"describe-short": "xxx",
"abbrev": "xxx",
"full": "xxx",
"describe": "xxx"
},
"message": {
"short": "xxx",
"full": "xxx"
},
"user": {
"name": "dude",
"email": "dude"
},
"time": 1618526666000
},
"branch": "prod-1.3.1-hotfix",
"build": {
"time": 1618526990000,
"version": "1.0-SNAPSHOT",
"host": "abcdef",
"user": {
"name": "",
"email": ""
},
"number": "1061"
}
}
}
I am trying to get the build number. In this case 1061.
Below is the config I'm using. If someone could guide me as to where I have gone wrong, I would appreciate it.
metrics:
name: actuator-build-version
type: object
help: Example of sub-level value scrapes from a json
path: $[*]
labels:
branch: $.git.branch
value:
number: $.git.build.number
I'm sure this issue is mine but I can't seem to get past it. I have a simple json return that looks like this: { "git": { "local": { "branch": { "ahead": "0", "behind": "0" } }, "commit": { "id": { "describe-short": "xxx", "abbrev": "xxx", "full": "xxx", "describe": "xxx" }, "message": { "short": "xxx", "full": "xxx" }, "user": { "name": "dude", "email": "dude" }, "time": 1618526666000 }, "branch": "prod-1.3.1-hotfix", "build": { "time": 1618526990000, "version": "1.0-SNAPSHOT", "host": "abcdef", "user": { "name": "", "email": "" }, "number": "1061" } } }
I am trying to get the build number. In this case 1061.
Below is the config I'm using. If someone could guide me as to where I have gone wrong, I would appreciate it.
metrics:
I get no errors and no return.
Thanks