Skip to content

Commit

Permalink
address review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
adejanovski committed Oct 11, 2023
1 parent 5225914 commit cbbf97a
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
2 changes: 2 additions & 0 deletions config/cass-operator/cluster-scoped/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ resources:
components:
- ../../components/cass-operator-image-config

# TODO: remove these image changes before release so that they don't pull a dev release of cass-operator.
# This is required when a new feature of cass-operator is needed that is not yet released.
images:
- name: k8ssandra/cass-operator
newTag: v1.18.0-dev.34e2ae6-20231002
2 changes: 2 additions & 0 deletions config/cass-operator/ns-scoped/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ resources:
components:
- ../../components/cass-operator-image-config

# TODO: remove these image changes before release so that they don't pull a dev release of cass-operator.
# This is required when a new feature of cass-operator is needed that is not yet released.
images:
- name: k8ssandra/cass-operator
newTag: v1.18.0-dev.34e2ae6-20231002
14 changes: 12 additions & 2 deletions docs/content/en/tasks/monitor/vector/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,18 @@ condition_pattern = "^(INFO|WARN|ERROR|DEBUG|TRACE|FATAL)"
mode = "halt_before"
timeout_ms = 10000

[transforms.parse_cassandra_log]
type = "remap"
inputs = [ "systemlog" ]
source = '''
del(.source_type)
. |= parse_groks!(.message, patterns: [
"%{LOGLEVEL:loglevel}\\s+\\[(?<thread>((.+)))\\]\\s+%{TIMESTAMP_ISO8601:timestamp}\\s+%{JAVACLASS:class}:%{NUMBER:line}\\s+-\\s+(?<message>(.+\\n?)+)",

[sources.cassandra_metrics_raw]
type = "prometheus_scrape"
endpoints = [ "http://localhost:9103" ]
scrape_interval_secs = 30
endpoints = [ "http://localhost:{{ .ScrapePort }}" ]
scrape_interval_secs = {{ .ScrapeInterval }}

[transforms.cassandra_metrics]
type = "remap"
Expand Down Expand Up @@ -99,6 +106,9 @@ They can be used as input in custom components added through configuration.

`systemlog` input is defined as the default source for Cassandra logs.

We provide the `parse_cassandra_log` transform out of the box because it's likely to be a common need for users who ship the logs to a remote system such as Grafana Loki; however by default we don't use it and will be filtered out unless it's referenced by a custom transform/sink.
This transform will parse the Cassandra logs and extract the log level, thread, timestamp, class, line and message fields. It will also remove the `source_type` field which is added by the `systemlog` source.

## Custom Vector configuration

To customize the Vector configuration, you can add [sources](https://vector.dev/docs/reference/configuration/sources/), [transforms](https://vector.dev/docs/reference/configuration/transforms/) and [sinks](https://vector.dev/docs/reference/configuration/sinks/) in a semi-structured way under `.spec.cassandra.telemetry.vector.components`, `.spec.reaper.telemetry.vector.components` and `.spec.stargate.telemetry.vector.components`:
Expand Down

0 comments on commit cbbf97a

Please sign in to comment.