Skip to content

Add new templates options #2524

@mikewhippsHarvest

Description

@mikewhippsHarvest

I'd like an option to select a template at runtime when running UPSSTATS.CGI.

Something like a query string element
upsstats.cgi?template=mytemplate.html,
or possibly even
upsstats.cgi?template=/path/to/mytemplate.html

It would be good to allow the use of json or xml as an extension instead of html, as in
upsstats.cgi?template=mytemplate.json,

The specific use case is to emit data in JSON format to import into PRTG for monitoring while leaving the friendlier HTML version alone for those wanting to query NUT directly in a browser.

Metadata

Metadata

Assignees

No one assigned

    Labels

    CGIenhancementimpacts-release-2.8.0Issues reported against NUT release 2.8.0 (maybe vanilla or with minor packaging tweaks)impacts-release-2.8.2Issues reported against NUT release 2.8.2 (maybe vanilla or with minor packaging tweaks)

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions