blob: 54d36b2943fe439803b8ee82b9f1fd38e27457a4 [file] [log] [blame]
Andrew Geissler9e3afdf2022-02-10 15:06:16 -06001#pragma once
2
3#include <nlohmann/json.hpp>
4
5#include <map>
6#include <string>
7#include <vector>
8
9/** @brief Array of services to monitor */
10using ServiceMonitorData = std::vector<std::string>;
11
12using json = nlohmann::json;
13
14extern bool gVerbose;
15
16/** @brief Parse input json file(s) for services to monitor
17 *
18 * @note This function will throw exceptions for an invalid json file
19 * @note See phosphor-service-monitor-default.json for example of json file
20 * format
21 *
22 * @param[in] filePaths - The file(s) to parse
23 *
24 * @return Service(s) to monitor for errors
25 */
26ServiceMonitorData parseServiceFiles(const std::vector<std::string>& filePaths);