Currently job artifacts in CI/CD pipelines on LRZ GitLab never expire. Starting from Wed 26.1.2022 the default expiration time will be 30 days (GitLab default). Currently existing artifacts in already completed jobs will not be affected by the change. The latest artifacts for all jobs in the latest successful pipelines will be kept. More information: https://gitlab.lrz.de/help/user/admin_area/settings/continuous_integration.html#default-artifacts-expiration

Commit 8810a787 authored by Alessio Netti's avatar Alessio Netti
Browse files

Minor changes

- Fixed name of log files for collectagent
- Fixed a few compilation warnings under gcc 7
- README for dcdbpusher now correctly refers to dcdbpusher.conf files
- SensorNavigator is rebuilt after plugin reloads only if data analytics
are currently running
parent bffe335a
......@@ -395,8 +395,8 @@ protected:
if (_duplicate && _unitID >= 0)
compute(_unitID);
else
for (int i = 0; i < _units.size(); i++)
compute(i);
for (unsigned i = 0; i < _units.size(); i++)
compute((int)i);
} catch(const exception& e) {
LOG(error) << "Analyzer " + _name + ": internal error " + e.what() + " during computation!";
}
......
......@@ -558,7 +558,7 @@ int main(int argc, char* const argv[]) {
//set up logger to file
if (settings.logLevelFile >= 0) {
auto fileSink = setupFileLogger(pluginSettings.tempdir, std::string("dcdbpusher"));
auto fileSink = setupFileLogger(pluginSettings.tempdir, std::string("collectagent"));
fileSink->set_filter(boost::log::trivial::severity >= translateLogLevel(settings.logLevelFile));
}
......
......@@ -120,9 +120,10 @@ public:
* @return A vector of sensor readings containing the cache view, or an empty vector if not possibile
**/
std::vector<reading_t>* getView(uint64_t startTs, uint64_t endTs, std::vector<reading_t>* buffer=nullptr, bool rel=false) const {
if(!buffer)
buffer = new std::vector<reading_t>();
buffer->clear();
if(!buffer) {
buffer = new std::vector<reading_t>();
}
buffer->clear();
// We add the estimated batch size in the computation of the stale threshold (set to 1 if not used)
uint64_t cacheSize = _cache.size()>1 ? _cache.size()-1 : 1;
......
......@@ -395,8 +395,8 @@ void HttpsServer::requestHandler::operator()(server::request const &request, ser
goto error;
}
}
//Updating the SensorNavigator on plugin reloads
if(pathStrs.back() == "reload") {
// Updating the SensorNavigator on plugin reloads, if analytics plugins are currently running
if(pathStrs.back() == "reload" && _httpsServer._manager!=NULL && _httpsServer._manager->getPlugins().size()>0) {
QueryEngine &qEngine = QueryEngine::getInstance();
std::shared_ptr <SensorNavigator> navigator = std::make_shared<SensorNavigator>();
vector <std::string> names, topics;
......
......@@ -54,12 +54,12 @@ or run
```
to print the help-section of dcdbpusher.
Dcdbpusher will check the given file-path for the global configuration file which has to be named `global.conf`.
Dcdbpusher will check the given file-path for the global configuration file which has to be named `dcdbpusher.conf`.
### Global Configuration <a name="globalConfiguration"></a>
The global configuration specifies various settings for dcdbpusher in general, e.g. which plugins should be loaded etc.
Please have a look at the provided `config/global.conf` example to get familiar with the file scheme. The example also forms a good starting point for writing a custom `global.conf`. The different sections and values are explained in the following table:
Please have a look at the provided `config/dcdbpusher.conf` example to get familiar with the file scheme. The example also forms a good starting point for writing a custom `dcdbpusher.conf`. The different sections and values are explained in the following table:
| Value | Explanation |
|:----- |:----------- |
......@@ -86,7 +86,7 @@ Please have a look at the provided `config/global.conf` example to get familiar
| plugins | In this section one can specify the plugins which should be used.
| plugin _name_ | The plugin name is used to build the corresponding lib-name (e.g. sysfs --> libdcdbplugin_sysfs.1.0)
| path | Specify the path where the plugin (the shared library) is located. If left empty, dcdbpusher will look in the default lib-directories (usr/lib and friends) for the plugin-file.
| config | One can specify a separate config-file (including path to it) for the plugin to use. If not specified, dcdbpusher will look up pluginName.conf (e.g. sysfs.conf) in the same directory where global.conf is located.
| config | One can specify a separate config-file (including path to it) for the plugin to use. If not specified, dcdbpusher will look up pluginName.conf (e.g. sysfs.conf) in the same directory where dcdbpusher.conf is located.
| | |
Formats of the other sensor-specific config-files are explained in the corresponding [subsections](#ipmi). Example configuration-files can be found in the `config/` directory.
......@@ -94,7 +94,7 @@ Formats of the other sensor-specific config-files are explained in the correspon
## REST API <a name="restApi"></a>
Dcdbpusher runs a HTTPS server which provides some functionality to be controlled over a RESTful API. The API is by default hosted at port 8000 on the localhost but the address can be changed in the [`global.conf`](#globalConfiguration).
Dcdbpusher runs a HTTPS server which provides some functionality to be controlled over a RESTful API. The API is by default hosted at port 8000 on the localhost but the address can be changed in the [`dcdbpusher.conf`](#globalConfiguration).
A HTTPS request to dcdbpusher should have the following format: `[GET|PUT] host:port[ressource]?[queries]`.
Tables with allowed ressources sorted by REST methods can be found below. A query consists of a key-value pair of the format `key=value`. For every request at least the authentication token has to be appended as query. Multiple queries are separated by semicolons(';').
......@@ -287,7 +287,7 @@ entity ent1 {
...
```
One should have noticed the global section in the examples which was not mentioned before. In this section the user can (but is not obligated to) overwrite values from the `global.conf` for this plugin or specify other settings which are global for this plugin.
One should have noticed the global section in the examples which was not mentioned before. In this section the user can (but is not obligated to) overwrite values from the `dcdbpusher.conf` for this plugin or specify other settings which are global for this plugin.
## IPMI <a name="ipmi"></a>
......
......@@ -68,12 +68,13 @@ std::vector<reading_t>* sensorQueryCallback(const string& name, const uint64_t s
for (auto &s : g->getSensors())
_sensorMap.insert(std::make_pair(s->getName(), s));
// Adding data analytics sensors to the map
for(auto& p : _analyticsManager->getPlugins())
for(auto& p : _analyticsManager->getPlugins()) {
for(const auto& a : p.configurator->getAnalyzers())
if (a->getStreaming())
for (const auto &u : a->getUnits())
for (const auto &o: u->getBaseOutputs())
_sensorMap.insert(std::make_pair(o->getName(), o));
for (const auto &u : a->getUnits())
for (const auto &o: u->getBaseOutputs())
_sensorMap.insert(std::make_pair(o->getName(), o));
}
_queryEngine.updated.store(false);
_queryEngine.updating.store(false);
} else {
......
......@@ -162,6 +162,7 @@ int main(int argc, char* argv[]) {
case DCDB_C_NOTINTEGRABLE:
std::cerr << "Error: One or more sensors are marked non-integrable." << std::endl;
break;
case DCDB_C_BADPARAMS:
case DCDB_C_NOSENSOR:
case DCDB_C_UNKNOWN:
std::cerr << "Error: Unknown error." << std::endl;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment