13 namespace prometheus {
40 bool canHandle(AsyncWebServerRequest *request)
override {
41 if (request->method() == HTTP_GET) {
42 if (request->url() ==
"/metrics")
72 std::string &friendly_name);
75 #ifdef USE_BINARY_SENSOR 80 std::string &node, std::string &friendly_name);
84 void fan_type_(AsyncResponseStream *stream);
87 void fan_row_(AsyncResponseStream *stream,
fan::Fan *obj, std::string &area, std::string &node,
88 std::string &friendly_name);
96 std::string &friendly_name);
104 std::string &friendly_name);
112 std::string &friendly_name);
119 void lock_row_(AsyncResponseStream *stream,
lock::Lock *obj, std::string &area, std::string &node,
120 std::string &friendly_name);
123 #ifdef USE_TEXT_SENSOR 128 std::string &friendly_name);
Base class for all switches.
void handleRequest(AsyncWebServerRequest *req) override
This class represents the communication layer between the front-end MQTT layer and the hardware outpu...
float get_setup_priority() const override
Base class for all cover devices.
void add_node_label_(AsyncResponseStream *stream, std::string &node)
std::string relabel_id_(EntityBase *obj)
void text_sensor_type_(AsyncResponseStream *stream)
Return the type for prometheus.
void switch_type_(AsyncResponseStream *stream)
Return the type for prometheus.
void add_area_label_(AsyncResponseStream *stream, std::string &area)
void binary_sensor_row_(AsyncResponseStream *stream, binary_sensor::BinarySensor *obj, std::string &area, std::string &node, std::string &friendly_name)
Return the sensor state as prometheus data point.
bool canHandle(AsyncWebServerRequest *request) override
void add_handler(AsyncWebHandler *handler)
void text_sensor_row_(AsyncResponseStream *stream, text_sensor::TextSensor *obj, std::string &area, std::string &node, std::string &friendly_name)
Return the lock Values state as prometheus data point.
void binary_sensor_type_(AsyncResponseStream *stream)
Return the type for prometheus.
void add_friendly_name_label_(AsyncResponseStream *stream, std::string &friendly_name)
void fan_row_(AsyncResponseStream *stream, fan::Fan *obj, std::string &area, std::string &node, std::string &friendly_name)
Return the sensor state as prometheus data point.
void switch_row_(AsyncResponseStream *stream, switch_::Switch *obj, std::string &area, std::string &node, std::string &friendly_name)
Return the switch Values state as prometheus data point.
std::map< EntityBase *, std::string > relabel_map_name_
void set_include_internal(bool include_internal)
Determine whether internal components should be exported as metrics.
void light_type_(AsyncResponseStream *stream)
Return the type for prometheus.
void add_label_id(EntityBase *obj, const std::string &value)
Add the value for an entity's "id" label.
web_server_base::WebServerBase * base_
void lock_row_(AsyncResponseStream *stream, lock::Lock *obj, std::string &area, std::string &node, std::string &friendly_name)
Return the lock Values state as prometheus data point.
PrometheusHandler(web_server_base::WebServerBase *base)
void lock_type_(AsyncResponseStream *stream)
Return the type for prometheus.
void sensor_row_(AsyncResponseStream *stream, sensor::Sensor *obj, std::string &area, std::string &node, std::string &friendly_name)
Return the sensor state as prometheus data point.
void add_label_name(EntityBase *obj, const std::string &value)
Add the value for an entity's "name" label.
void fan_type_(AsyncResponseStream *stream)
Return the type for prometheus.
void sensor_type_(AsyncResponseStream *stream)
Return the type for prometheus.
void cover_type_(AsyncResponseStream *stream)
Return the type for prometheus.
std::string relabel_name_(EntityBase *obj)
void cover_row_(AsyncResponseStream *stream, cover::Cover *obj, std::string &area, std::string &node, std::string &friendly_name)
Return the switch Values state as prometheus data point.
Implementation of SPI Controller mode.
Base class for all binary_sensor-type classes.
Base-class for all sensors.
void light_row_(AsyncResponseStream *stream, light::LightState *obj, std::string &area, std::string &node, std::string &friendly_name)
Return the Light Values state as prometheus data point.
std::map< EntityBase *, std::string > relabel_map_id_
Base class for all locks.