Hi!
I’m trying to follow the tutorial
to implement monitoring of SAP SCC. Two issues:
- HTTP basic authentication: it’s not clear from the tutorial how to get a plain simple HTTP basic auth. Took me hour to figure out (use the source, Luke!) that you just need to pass ‘basic’ like this:
"authorization": {
"basic": 1,
"username": "%(constants.username)",
"password": "%(constants.password)"
},I would add it to the original post, but the comments are locked. Please add it, so people save a lot of time.
-
Path depth. SAP will respond with a JSON of this type:
{
"subaccounts": c
{
"description": "SAP BAS",
"displayName": "SAP BAS",
"tunnel": {
"state": "Connected",
"connectedSinceTimeStamp": 1720773876375,
"connections": 0,
"applicationConnections": c],
"serviceChannels": a],
"subaccountCertificate": {
"notAfterTimeStamp": 1749540416000,
"notBeforeTimeStamp": 1718000816000,
"subjectDN": "CN=B0CADA20E31311EBBF8AD3BE0A31F20A,L=35319f63-2ec5-4a96-a3e2-6b8c1c14367f,OU=edca892d-9bfb-4aae-aafd-f4c5aa10bd4e,OU=SAP Cloud Platform Clients,O=SAP SE,C=DE",
"issuer": "CN=SAP Cloud Platform Client CA,OU=SAP Cloud Platform Clients,O=SAP SE,L=EU10,C=DE"
},
"user": "user@notyourbusiness.com"
},
"regionHost": "cf.eu10.hana.ondemand.com",
"subaccount": "35319f63-2ec5-4a96-a3e2-6b8c1c14367f",
"locationID": ""
},
{
"description": "",
"displayName": "CALM",
"tunnel": {
"state": "Connected",
"connectedSinceTimeStamp": 1720775091197,
"connections": 0,
"applicationConnections": c],
"serviceChannels": a],
"subaccountCertificate": {
"notAfterTimeStamp": 1733323959000,
"notBeforeTimeStamp": 1701697959000,
"subjectDN": "CN=B0CADA20E31311EBBF8AD3BE0A31F20A,L=882afc82-327b-4368-8588-dd6086ac0370,OU=edca892d-9bfb-4aae-aafd-f4c5aa10bd4e,OU=SAP Cloud Platform Clients,O=SAP SE,C=DE",
"issuer": "CN=SAP Cloud Platform Client CA,OU=SAP Cloud Platform Clients,O=SAP SE,L=EU10,C=DE"
},
"user": "auser@notyourbusiness.com"
},
"regionHost": "cf.eu10.hana.ondemand.com",
"subaccount": "882afc82-327b-4368-8588-dd6086ac0370",
"locationID": ""
}
],
"version": 1
}I tried to get the values with this code:
"parse":
{
"name": "Entries",
"type": "body",
"path": "$.subaccounts- ",
"entries": e
{
"id": "displayName"
},
{
"id": "regionHost"
},
{
"id": "tunnel.state"
},
{
"id": "tunnel.subaccountCertificate.notAfterTimeStamp"
},
{
"id": "subaccount"
}
]
}It will get the tunnel.state, but not tunnel.subaccountCertificate.notAfterTimeStamp. As I understood the code (use the source, Luke! Again), it allows only one step of siblings, which is also not mentioned anywhere. Is it possible to modify the code so it recurses down the path?
Except for these: Great tool! Looking forward to use it more.
Thanks guys!
- ",