Bug 64392

Summary: mod_status should offer JSON output
Product: Apache httpd-2 Reporter: James Ralston <ralston>
Component: mod_statusAssignee: Apache HTTPD Bugs Mailing List <bugs>
Status: NEW ---    
Severity: enhancement    
Priority: P2    
Version: 2.4-HEAD   
Target Milestone: ---   
Hardware: All   
OS: All   

Description James Ralston 2020-04-29 21:45:26 UTC
The telemetry that the mod_status module provides comes in a human-readable flavor:

curl --silent --max-time 30 'http://localhost/server-status'

And a more machine-readable flavor:

curl --silent --max-time 30 'http://localhost/server-status?auto'

Unfortunately, "key: value" pairs aren't particularly machine-readable without help. For example, Splunk expects key=value pairs for textual data, so some mangling of the output is required if the goal is to ship the telemetry off to Splunk for graphing and other analysis:

curl --silent --max-time 30 'http://localhost/server-status' | sed 's/^\([[:alnum:]][[:alnum:]]*\): /\1=/g'

Hoops like this could be avoided if mod_status supported a more modern machine-readable output format, such as JSON, as Splunk can grok JSON directly.

Thus, it would be tremendously useful for sites who are pulling the mod_status telemetry into systems like Splunk and Grafana. (And I'd wager that's the primary use of mod_status nowadays: cattle, not pets.)