This release is a pre-release and may not be stable for production use.
volttron-log-statistics
The Log Statistics agent periodically reads ".log" files based on the configured interval, computes the size delta from the previous interval and publishes the difference in bytes with a timestamp. It also publishes the standard deviation and mean of the size delta every 24 hours. This agent can be useful for detecting unexpected changes to the system which may be an indication of some sort of failure or breach.
Requires
- python >= 3.10
- volttron >= 10.0
Installation
Before installing, VOLTTRON should be installed and running. Its virtual environment should be active. Information on how to install of the VOLTTRON platform can be found here.
Create a directory called config and use the change directory command to enter it.
mkdir config
cd config
After entering the config directory, create a file called log_stat_config.json. Use the below configuration section to populate your new file.
Configuration
The Log Statistics agent has 4 configuration parameters, all of which are required:
file_path: The file path to the log file. If no config provided, defaults to'volttron.log'located within your VOLTTRON_HOME environment variable.analysis_interval_secs: The interval in seconds between publishes of the size delta statistic to the message bus. If no config provided, defaults to 60 seconds.publish_topic: Used to specify a topic to publish log statistics to which does not get captured by the historian framework (topics not prefixed by any of: "datalogger", "record", "analysis", "devices"). If no config provided, defaults to"platform/log_statistics".historian_topic: Can be used to specify a topic to publish log statistics to which gets captured by the historian framework ("datalogger", "record", "analysis", "devices"). If no config provided, defaults torecord/log_statistics.unit: Can be used to specify units. Defaults tobytes.- "bytes"
- "kb"
- "mb"
- "gb"
Here is an example configuration file named log_stat_config.json.
{
"analysis_interval_sec": 60,
"file_path": "path/to/.log",
"historian_topic": "analysis/log_statistics",
"publish_topic": "platform/log_statistics",
"unit": "bytes"
}
Store the configuration in the config store
vctl config store platform.log_statistics config /path/to/config
Install and start the log statistics agent
vctl install volttron-log-statistics --vip-identity platform.log_statistics --start
View the status of the installed agent.
vctl status
Development
Please see the following for contributing guidelines contributing.
Please see the following helpful guide about developing modular VOLTTRON agents
Disclaimer Notice
This material was prepared as an account of work sponsored by an agency of the United States Government. Neither the United States Government nor the United States Department of Energy, nor Battelle, nor any of their employees, nor any jurisdiction or organization that has cooperated in the development of these materials, makes any warranty, express or implied, or assumes any legal liability or responsibility for the accuracy, completeness, or usefulness or any information, apparatus, product, software, or process disclosed, or represents that its use would not infringe privately owned rights.
Reference herein to any specific commercial product, process, or service by trade name, trademark, manufacturer, or otherwise does not necessarily constitute or imply its endorsement, recommendation, or favoring by the United States Government or any agency thereof, or Battelle Memorial Institute. The views and opinions of authors expressed herein do not necessarily state or reflect those of the United States Government or any agency thereof.
Metadata
Release files for volttron-log-statistics 2.0.0rc0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| volttron_log_statistics-2.0.0rc0.tar.gz | 5.6 kB | Without provenance | Details for volttron_log_statistics-2.0.0rc0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| volttron_log_statistics-2.0.0rc0-py3-none-any.whl | Python 3 | none | any | Details for volttron_log_statistics-2.0.0rc0-py3-none-any.whl |
Total release size: 12.3 kB
Release files / volttron_log_statistics-2.0.0rc0.tar.gz
| Download URL | volttron_log_statistics-2.0.0rc0.tar.gz |
|---|---|
| Size | 5.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7ebb23323a586f54ab95859d9173af90a6428540cf7bc3d90a2c1d827afda590
|
|
BLAKE2b-256 checksum How to use checksums |
7b964b7cd93a72e9cce091d21315ee9674550d2b32283c50496dc181121b5fc7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.3 CPython/3.10.12 Linux/5.15.153.1-microsoft-standard-WSL2
|
Release files / volttron_log_statistics-2.0.0rc0-py3-none-any.whl
| Download URL | volttron_log_statistics-2.0.0rc0-py3-none-any.whl |
|---|---|
| Size | 6.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
eb9b99f3fc3a82eea13f97a02319d14165295d6d352be3dc8a6f098012c9c857
|
|
BLAKE2b-256 checksum How to use checksums |
a12f343d36af3ab44a9cdfd5d517ab719a46937eec8cf9ace4c2f9b69310367d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.3 CPython/3.10.12 Linux/5.15.153.1-microsoft-standard-WSL2
|
Security for volttron-log-statistics 2.0.0rc0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.