I'd like to visualize logged events like an aggregated log file: as a table.
My testdata was created by an sample Java application using the net.logstash.logback.appender.LogstashSocketAppender (an Logback JSON appender) and an http_poller, polling a Spring actuator.
As my first step, I'd like to visualize just the logback messages ordered by time. I went to discover and added message, but sadly the result looks like this:
As you can see, the first line, which actually contains a message, displays{"#timestamp":"2016-04-15T15:28:00.104+02:00","#version":1,"message":"accounts-service byOwner() found: []","logger_name":"io.pivotal.microservices.accounts.AccountsController","thread_name":"main","level":"INFO","level_value":20000,"HOSTNAME":"ham00705"}
How can I just display the content of message, in this case "accounts-service byOwner() found: []","logger_name":"io.pivotal.microservices.accounts.AccountsController"?
and How do I hide events without a message?
-- Update --
a sample message looks like:
{
"_index": "logstash-2016.04.15",
"_type": "logs",
"_id": "AVQaK4Ng7SD5aGZ_l8Xy",
"_score": null,
"_source": {
"message": "{\"#timestamp\":\"2016-04-15T15:28:00.104+02:00\",\"#version\":1,\"message\":\"accounts-service byOwner() found: []\",\"logger_name\":\"io.pivotal.microservices.accounts.AccountsController\",\"thread_name\":\"main\",\"level\":\"INFO\",\"level_value\":20000,\"HOSTNAME\":\"ham00705\"}\r",
"#version": "1",
"#timestamp": "2016-04-15T13:45:37.085Z",
"path": "D:\\Coden\\Projects\\Git\\microservice-logging\\logstash2\\test-data\\app-min.log.json",
"host": "ham00705"
},
"fields": {
"#timestamp": [
1460727937085
]
},
"sort": [
1460727937085
]
}
Related
If you make a signed request using the code provided by AWS here: https://docs.aws.amazon.com/neptune/latest/userguide/iam-auth-connecting-python.html
Then if you do a query like this from a python script:
make_signed_request(query="g.V().limit(10).valueMap(true).toList()")
It outputs an ugly unusable thing like this:
{
"requestId": "bf942e84-ff49-42c7-a65c-ef43f45g5h63",
"status": {
"message": "",
"code": 200,
"attributes": {
"#type": "g:Map",
"#value": []
}
},
"result": {
"data": {
"#type": "g:List",
"#value": [
{
"#type": "g:Map",
"#value": [
"names",
{
"#type": "g:List",
"#value": ["David Bowie"]
}
..., etc.
Whereas if I run the same query on a notebook, like this:
%%gremlin --store-to foo
g.V().limit(10).valueMap(true).toList()
Then foo is a nicely formatted list of dictionaries, like this:
[
{'names': ['David Bowie'], 'dob': [08-01-1947]},
{'names': ['Michael Jackson'], 'dob': [29-08-1958]},
]
How do I get the maked_signed_request function to return data in the same way that the notebook does?
What you are seeing is the default HTTP response format that you can expect to see from any "Gremlin Server compatible" TinkerPop endpoint. Under the covers, the graph-notebook notebooks are using the Gremlin Python client and sending the request over a web socket. The Gremlin Python client nicely de-serializes that result for you. You essentially have two options when calling the Neptune Gremlin endpoint.
Use a specific Gremlin client for your preferred programming language (if one exists).
Call the HTTP endpoint and post process the GraphSON result. Rather than write your own you can most likely repurpose the serializers from one of the clients. If possible I would use option 1.
I'm interested in the value of one field (Module ID) but there seems to be no way of obtaining this specifically. A complete dump of all field values would also suffice but I haven't succeeded in finding a way to do that either. I've looked at and tried the searches available within the documentation here: https://www.jfrog.com/confluence/display/JFROG/Artifactory+REST+API#ArtifactoryRESTAPI-SEARCHES
If it helps, I'm trying to query an on-premise installation of Artifactory.
More fields can be added to the AQL using the "include" element.
For example - to list all artifacts under "libs-release-local" repository, including their module names, run the following query:
items.find(
{
"repo":{"$eq":"libs-release-local"}
}
).include("artifact.module")
Response example:
{
"results": [
{
"repo": "libs-release-local",
"path": "org/jfrog/test/multi2/2.17.0",
"name": "multi2-2.17.0.jar",
"type": "file",
"size": 1022,
"created": "2021-09-11T13:51:33.878Z",
"created_by": "deployer",
"modified": "2021-09-11T13:51:33.631Z",
"modified_by": "deployer",
"updated": "2021-09-11T13:51:33.881Z",
"artifacts": [
{
"modules": [
{
"module.name": "org.jfrog.test:multi2:2.17.0"
}
]
}
]
}
]
}
You can find all of the required information under AQL documentation.
So when I try to call calculateroute.json, I'm getting a NGEO_ERROR_GRAPH_DISCONNECTED error with no further information.
Here's my example call: https://route.api.here.com/routing/7.2/calculateroute.json?app_id=<APP_ID>&app_code=<APP_CODE>&waypoint0=geo!-34.0144128,151.1121957&waypoint1=geo!-33.875455,151.207583&mode=fastest;car;traffic:enabled&departure=2019-11-11T22:27:30
Obviously I've removed our App ID and App Code from that call :).
{
"_type": "ns2:RoutingServiceErrorType",
"type": "ApplicationError",
"subtype": "NoRouteFound",
"details": "Error is NGEO_ERROR_GRAPH_DISCONNECTED",
"additionalData": [
{
"key": "error_code",
"value": "NGEO_ERROR_GRAPH_DISCONNECTED"
}
],
"metaInfo": {
"timestamp": "2019-11-08T00:43:18Z",
"mapVersion": "8.30.102.150",
"moduleVersion": "7.2.201944-5674",
"interfaceVersion": "2.6.74",
"availableMapVersion": [
"8.30.102.150"
]
}
}
Any ideas?
I've tried looking through the docs but it seems I've done everything right and certainly it has worked for us hundreds/thousands of times before.
Indeed, I see the default Routing API does not find a direct route between the start and end waypoints. If you use our advanced Fleet telematics API, it does actually calculates the route.
https://fleet.api.here.com/2/calculateroute.json?app_id=<APP_ID>&app_code=<APP_CODE>&waypoint0=geo!-34.0144128,151.1121957&waypoint1=geo!-33.875455,151.207583&mode=fastest;car;traffic:enabled&departure=2019-11-11T22:27:30
Please use the advanced API if the standard API does not return results.
I'm calculating routes based on user input. Then storing the routeId and any additional informations I need. But the shape of the road is something I need occasionally; when the user wants to get a preview of the road again.
Since I don't want to store all the points from shape I tried using getroute endpoint (https://developer.here.com/documentation/routing/topics/resource-get-route.html#resource-get-route) but I get this response:
{
"_type": "ns2:RoutingServiceErrorType",
"type": "ApplicationError",
"subtype": "RouteNotReconstructed",
"details": "Error is NGEO_ERROR_ROUTE_DESERIALIZATION",
"additionalData": [
{
"key": "error_code",
"value": "NGEO_ERROR_ROUTE_DESERIALIZATION"
}
],
"metaInfo": {
"timestamp": "2018-08-01T15:01:56Z",
"mapVersion": "8.30.86.150",
"moduleVersion": "7.2.201830-34436",
"interfaceVersion": "2.6.34",
"availableMapVersion": [
"8.30.86.150"
]
}
}
So the question is: why do I get the error? Following the API documentation https://developer.here.com/documentation/routing/topics/resource-type-error-route-not-reconstructed.html I can exclude wrong routeId (it works for routes saved e.g. today but not for the older ones).
The route was calculated using the same version (7.2)
Is the routeId stored only for a certain amount of time?
If so, how long?
RouteID changes with map version.
https://developer.here.com/documentation/routing/topics/request-route-information.html
You'd need to recalculate periodically to get up to date RouteIDs.
I need to get from Omniture real time API a classify eVar, exclude some value, and then breackdown its with sitesection.
I try with this query:
{
"reportDescription": {
"source": "realtime",
"reportSuiteID": "**RSID**", //MY REPORT SUITE
"metrics": [{
"id": "instances"
}],
"elements": [{
"id": "evar", //MY EVAR
"top": 100,
"classification": "Real Time", //CLASSIFICATION NAME
"search": {
"type": "NOT",
"keywords": ["somevalue"] //THE VALUE TO EXCLUDE
}
},{
"id" : "sitesection",
"top" : 1
}],
"dateGranularity": "minute:1",
"dateFrom": "-1 minute"
}
}
But in the JSON response I see "somevalue" how if it not excluded.
The strange thing is that if I remove the "breakdown" (with sitesection) the classification filter seems to works fine.
I can't use classification filter if a breackdown is used in real time report? I can't find any documentation about that.
An other thing is that if I request a report with the classification, without any search, I receve the response but there is a lot of "::Unspecified::". The problem is that the "::Unspecified::" seems to be the last datas that Omniture receves form my webpages. I think this means that classifications are not in real time, also if you can to use it in real time report.