Is it possible to use http_response plugin in telegraf to send JSON-RPC over http? Or is there better one? I tried httpjson plugin but it accepts only strings to request parameters and i need to send also int parameters.
What i need to do is send simple request to service and check that it responds ok. Service always responds with code 200 so i need to check response data to catch errors.
Do you know how could i monitor json values from services hosted in nginx? Services always responses with responce code 200 and actual data to be checked is in response body. I have nginx access.log logparser configured but i can only get http response codes / service.
You should be able to do this with http_response as well, you can set the response_string_match option to a regular expression that should be in the response body.
Yes that is working ok but I want also monitor server and catch faulty RPC messages. So i want to monitor http traffic and parse request response data to find errors.
Yes. I can get request count from nginx access log using telegraf plugin logparser but I need also count from requests that have faulty response. Let say that service is responsing “ok” normally and “error” when something is wrong so that is what i’m after.
If the response is always 200 even when an error occurs I think we would need to find a way to expose the error into the nginx logs or somewhere else we can sense the error.
In my experience, this is typically where application metrics are used. Instead of having nginx tell you the result, you add custom code to the RPC server to report the error using statsd or prometheus formats.