Bug 64392 - mod_status should offer JSON output
Summary: mod_status should offer JSON output
Status: NEW
Alias: None
Product: Apache httpd-2
Classification: Unclassified
Component: mod_status (show other bugs)
Version: 2.4-HEAD
Hardware: All All
: P2 enhancement (vote)
Target Milestone: ---
Assignee: Apache HTTPD Bugs Mailing List
Depends on:
Reported: 2020-04-29 21:45 UTC by James Ralston
Modified: 2020-04-29 21:45 UTC (History)
0 users


Note You need to log in before you can comment on or make changes to this bug.
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.)