Hi All,
I am using loki as a datasource & querying data with the help of labels, query - {label_ELM=“offboard”} |= ERROR
Now i am getting something like this -
{“loglevel”:“ERROR”,“logdata”:“LeaverProcess_Move_RDSAndHomeDirectory | Failed : Cannot bind argument to parameter Path because it is null. on line 30 CategoryInfo: InvalidData: ( [Test-Path], ParameterBindingValidationException”,“triggeredBy”:“service.scorch”,“employeeNumber”:“xxx”,“firstName”:“xx”,“job_type”:“offboard”,“logtag”:“LeaverProcess_Move_RDSAndHomeDirectory”,“userPrincipalName”:“xx”,“Id”:“xx”,“lastName”:“Yang”,“job_Id”:“xx”,“datetime”:“5/10/2024 1:06:45 AM”,“step_Id”:201}
i am trying to make a graph using bar chart with this that how many ERROR logs i get & convert this to count so that i get a number & i have achieved the same so far by this query - count_over_time({label_ELM=“offboard”} |= “ERROR” [$__auto]).
The thing is there is a key value pair of job_Id : xx , so the job ID value could be the same in different Error logs as well, so lets says i have 5 error logs & out 3 has the has the same job id & rest of the 2 are different job id’s. In the graph it shows 5 logs bit actually what i want is 3 logs.
Any help is appreciated