microsoft / Apache-Provider

Apache Monitoring Agent for OMI Server
12 stars 9 forks source link

Apache 500 errors aren't detected by Linux oms agents #10

Closed sarojcare closed 7 years ago

sarojcare commented 7 years ago

The 500 or 400 Errrors Per Minutes calculation logic has the issue. Here is the logic used for this calculation.

        (delta500 / apr_time_sec(deltaTime)) * 60

Here delta400 and delta500 is declared as apr_uint32_t.

When Apache server generates 500/400 error in every second, delta500=1 and deltaTime=1 and it becomes (1/1)*60=60 which is the expected value.

But when Apache server generates 500 error in every 3 seconds The delta500=1 and deltaTime=3 and it is evaluated to (1/3)*60=0.

niroyb commented 7 years ago

Also fix the comment