https://github.com/clustercockpit/cc-event-store
A simple store for job and system events
https://github.com/clustercockpit/cc-event-store
Last synced: 2 months ago
JSON representation
A simple store for job and system events
- Host: GitHub
- URL: https://github.com/clustercockpit/cc-event-store
- Owner: ClusterCockpit
- License: mit
- Created: 2024-03-28T11:25:53.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2026-04-07T16:17:29.000Z (3 months ago)
- Last Synced: 2026-04-07T18:14:24.446Z (3 months ago)
- Language: Go
- Size: 9.95 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# cc-event-store
A simple short-term store for job and system events as well as logs in the ClusterCockpit ecosystem. Event and Logs were introduced
as an extension to the previous `CCMetric` messages, numeric data from the compute nodes known as metrics (see lineprotocol
specifcation at [cc-specification](https://github.com/ClusterCockpit/cc-specifications)). Events and Logs are strings and in
contrast to the periodic sending of metric from the [`cc-metric-collector`](https://github.com/ClusterCockpit/cc-metric-collector),
events and logs can happen at any time. All storage backends have a configuration option for the retention time for which
events should be kept. Logs are never deleted.
## Configuration
```json
{
"main": {},
"receiver-file" : "/path/to/receiver/config/file",
"storage-file" : "/path/to/storage/config/file",
"api-file" : "/path/to/api/config/file"
}
```
For the format of each file, see here:
- [Receivers](https://github.com/ClusterCockpit/cc-lib/blob/main/receivers/README.md)
- [Storage](./internal/storage/README.md)
- [API](./internal/api/README.md)
## Structure
The `cc-event-store` has 4 components that are coupled together in the binary.
- The event and log message receivers are reused from [`cc-metric-collector`](https://github.com/ClusterCockpit/cc-metric-collector).
There they are used to receive metrics from remote targets but are flexible enough to receive events and logs as well.
See [receivers](https://github.com/ClusterCockpit/cc-lib/blob/main/receivers/README.md)'s receivers.
- The router forwards the events and logs to the storage manager.
- The storage manager is a frontend to some database backends like SQLite or Postgres. The SQLite backend is the main development target.
- The REST API is mainly used to query the storage backends but can also be used to insert events and logs.
This also explains why `cc-event-store` uses multiple configuration files, all coupled by a central configuration file. Each component has its own configuration file which makes it possible to reuse the receivers from [`cc-metric-collector`](https://github.com/ClusterCockpit/cc-metric-collector) without any changes, it just requires its configuration file.
# cc-event-client
Test client to send event or log messages over NATS