I want define value mapping .
first value mapping I have create Null and shows log file is ok
now I need to define other value mapping that if I have any value instead of Null it shows Fail . I think I have to define regex . But would you please say how can set regex parameter that if I had last values it shows error ?
Would you please help me about it ?
This should work:
Please note that it only works with string fields. You can use the convert field type transformation to make the field a string if needed: Transform data | Grafana documentation
For future reference, here is the go regex syntax: syntax package - regexp/syntax - Go Packages
1- Does it your mean when set such as your pic it will show fail when returned any string ?
2- How can set other value when it does not return anything display text = OK
My output is : exported “INTERNATIONAL”.“ERROR_MESSAGE” 14.35 KB 170 rows
and I set value map such as attached pic but now it is showing Log file is OK
Can anyone help me about it ?
Would you please help me about it ?
This is strange . Non one cannot help me about this ?
Hi @alex23,
Sorry that you are feeling that no one is helping you. But actually, @alfroment did try to help you.
I can understand that sometimes getting help could be challenging if the question is a bit tricky or related to a specific domain of the product functionality. But we try as much as we can.
OSS is in our DNA but as there is no SLA defined for Grafana OSS so delays are expected in getting answers.
To answer your question about the Value Mapping. Can you send us a sample log file entries which contain some lines which are Null and some which are not null so we can test it out and try to figure out a solution?
Thanks for your explaination. Actually my datasource is zabbix and I integrated it with grafana
so I have created an item that can review log files and if it finds any string contains error , ora- , warn
will show as crititcal in zabbix now want to define it in grafana . want to show critical in grafana if it finds any string such as error , ora-, warn, and if could not find anything in grafana show the log file is OK
Hey Alex,
Thanks for the reply.
Zabbix is actually a community-based plugin, which means we do not maintain its code or provide support to it.
However, we do have a dedicated category for Zabbix so I will move this post to there so that other community users who are using it can try to help you out.
Also, if you find this as a bug or a feature that is not supported by Zabbix, then would recommend to open an issue in their official GitHub repository.
I hope this helps.