My last data thta is showing in grafana is such as follow
HTTP OK: HTTP/1.1 200 - 14716 bytes in 0.011 second response time |time=0.010866s;5.000000;10.000000;0.000000 size=14716B;;;0
so I want to define it in grafana in Stat panel if find 200 show UP and if could not find 200 show service down . How can define value mappring regex for while cannot find 200 ?
Could you share a screenshot of your Value Mappings configuration and the panel query result?
The regex mapping shown above works when the field value is a string containing 200 (for example, HTTP/1.1 200 OK).
If your panel value is the numeric value 200, then a Value mapping may be required instead:
Type: Value
Value: 200
Display text: UP
Could you also share the panel configuration or Query Inspector β Data output so we can verify whether the field is being returned as a string or a numeric value?
Grafana executes mappings in order β if value is 200 β shows UP and stops. Anything else (404, 500, 600, null) β caught by .* β shows Service Down.
If you need to handle other status codes, add additional Value mappings for those codes as well.
Based on the behavior I observed, this appears to be related to how value mappings are being applied to a numeric field rather than an issue with the regex pattern itself
One thing Iβd add is to test the regex against a few edge cases before using it in production, especially if the field values can contain unexpected characters or spaces. A small tweak to the pattern can sometimes make a big difference in Grafana filtering results.