Hello Splunkees,
I have a requirement where I need to calculate the availability or uptime percentage of some Critical APIs. We ingest those API logs in Splunk and it tells us about the throughput, latency and HTTP status codes.
Is there a way to calculate the availability of any API using these metrics? I mean something like calculating the success and failure rate and then based on that come up with a number to say how much available my API is.
Does anyone have any basic query which can calculate that?
I have created something like below to calculate the success and failure rates -
index=myapp_prod sourcetype="service_log" MyCriticalAPI Status=200
| timechart span=15m count as SuccessRequest
| appendcols
[ search index=myapp_prod sourcetype="service_log" MyCriticalAPI NOT Status=200
| timechart span=15m count as FailedRequest]
| eval Total = SuccessRequest + FailedRequest
| eval successRate = round(((SuccessRequest/Total) * 100),2)
| eval failureRate = round(((FailedRequest/Total) * 100),2)
... View more