/** * Copyright (c) 2014-present, Facebook, Inc. * All rights reserved. * * This source code is licensed in accordance with the terms specified in * the LICENSE file found in the root directory of this source tree. */ #pragma once #include #include #include #include #include #include namespace osquery { class NumericMonitoringFilesystemPlugin : public NumericMonitoringPlugin { public: explicit NumericMonitoringFilesystemPlugin(); explicit NumericMonitoringFilesystemPlugin( boost::filesystem::path log_file_path); Status call(const PluginRequest& request, PluginResponse& response) override; Status setUp() override; bool isSetUp() const; private: Status formTheLine(std::string& line, const PluginRequest& request) const; private: const std::vector line_format_; const std::string::value_type separator_; const boost::filesystem::path log_file_path_; std::ofstream output_file_stream_; std::mutex output_file_mutex_; }; } // namespace osquery