32 lines
597 B
C++
32 lines
597 B
C++
//
|
|
// Created by Мустафаев Селим Мустафаевич on 01.01.2024.
|
|
//
|
|
|
|
#ifndef ALIENCAT_EXPORTER_DNSMASQSOURCE_H
|
|
#define ALIENCAT_EXPORTER_DNSMASQSOURCE_H
|
|
|
|
#include <prometheus/counter.h>
|
|
#include <fstream>
|
|
#include <vector>
|
|
|
|
class DnsmasqSource {
|
|
public:
|
|
enum LeaseField: int {
|
|
EXPIRY_TIME = 0,
|
|
MAC = 1,
|
|
IP = 2,
|
|
HOST = 3,
|
|
ID = 4
|
|
};
|
|
|
|
private:
|
|
std::ifstream _leases;
|
|
|
|
public:
|
|
DnsmasqSource();
|
|
std::vector<prometheus::Labels> readLeases();
|
|
};
|
|
|
|
|
|
#endif //ALIENCAT_EXPORTER_DNSMASQSOURCE_H
|