-
Couldn't load subscription status.
- Fork 7
Fluentd frontend #22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
scarletnorberg
wants to merge
1
commit into
FNAL-CTA:main
Choose a base branch
from
scarletnorberg:fluentd_frontend
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Fluentd frontend #22
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,52 @@ | ||
| apiVersion: apps/v1 | ||
| kind: Deployment | ||
| metadata: | ||
| name: cta-monitoring5 | ||
| labels: | ||
| app: cta-monitoring | ||
| spec: | ||
| replicas: 1 | ||
| selector: | ||
| matchLabels: | ||
| app: cta-monitoring | ||
| template: | ||
| metadata: | ||
| labels: | ||
| app: cta-monitoring | ||
| spec: | ||
| containers: | ||
| - name: cta-monitoring-container01 | ||
| image: imageregistry.fnal.gov/cta/cta-fluentd:v1.16 | ||
| volumeMounts: | ||
| - name: td-agent-config | ||
| mountPath: /etc/td-agent/ | ||
| - name: cta-client-sss | ||
| mountPath: /etc-host/ | ||
| - name: etc-cta | ||
| mountPath: /etc/cta | ||
| readOnly: true | ||
| env: | ||
| - name: CTA_INSTANCE | ||
| valueFrom: | ||
| secretKeyRef: | ||
| key: CTA_INSTANCE | ||
| name: cta-secrets | ||
| volumes: | ||
| - name: td-agent-config | ||
| configMap: | ||
| name: frontend-fluentd-config | ||
| - name: cta-client-sss | ||
| secret: | ||
| secretName: cta-client-sss | ||
| - name: etc-cta | ||
| projected: | ||
| sources: | ||
| - secret: | ||
| name: cta-frontend-xrootd | ||
| - secret: | ||
| name: cta-cli-conf | ||
| - secret: | ||
| name: eos-sss | ||
| items: | ||
| - key: forwardable.keytab | ||
| path: eos.sss.keytab |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,142 @@ | ||
| <source> | ||
| @type ctatape | ||
| tag tapepool | ||
| @type exec | ||
| tag tapepool | ||
| command XrdSecPROTOCOL=sss XrdSecSSSKT=/etc/ctafrontend_client_sss.keytab cta-admin --json tapepool ls | sed 's/"\([0-9\.]\+\)"/\1/g' | jq -c ".[]" | jq -c | ||
| run_interval 1m | ||
| <parse> | ||
| @type json | ||
| </parse> | ||
| </source> | ||
| <source> | ||
| @type showqueues | ||
| tag showqueues | ||
| @type exec | ||
| tag showqueues | ||
| command XrdSecPROTOCOL=sss XrdSecSSSKT=/etc/ctafrontend_client_sss.keytab cta-admin --json showqueues | sed 's/"\([0-9\.]\+\)"/\1/g ' | jq -c ".[]" | jq -c | ||
| run_interval 1m | ||
| <parse> | ||
| @type json | ||
| </parse> | ||
| </source> | ||
| <source> | ||
| @type failedrequests | ||
| tag failedrequests | ||
| @type exec | ||
| tag failedrequests | ||
| command XrdSecPROTOCOL=sss XrdSecSSSKT=/etc/ctafrontend_client_sss.keytab cta-admin --json fr ls | sed 's/"\([0-9\.]\+\)"/\1/g ' | jq -c ".[]" | jq -c | ||
| run_interval 1m | ||
| <parse> | ||
| @type json | ||
| </parse> | ||
| </source> | ||
| <source> | ||
| @type tapeall | ||
| tag tapeall | ||
| @type exec | ||
| tag tapeall | ||
| command XrdSecPROTOCOL=sss XrdSecSSSKT=/etc/ctafrontend_client_sss.keytab cta-admin --json tape ls --all | sed 's/"\([0-9\.]\+\)"/\1/g ' | jq -c ".[]" | jq -c | ||
| run_interval 1m | ||
| <parse> | ||
| @type json | ||
| </parse> | ||
| #enable_ruby true | ||
| hostname "#{ENV['ENSTORE_CONFIG_PORT']}" | ||
| </source> | ||
| <filter tapepool> | ||
| @type record_transformer | ||
| auto_typecast | ||
| enable_ruby true | ||
| <record> | ||
| instance "#{ENV['CTA_INSTANCE']}" ###"#{ENV['ENSTORE_CONFIG_PORT']}" | ||
| </record> | ||
| </filter> | ||
| <filter showqueues> | ||
| @type record_transformer | ||
| auto_typecast | ||
| enable_ruby true | ||
| <record> | ||
| instance "#{ENV['CTA_INSTANCE']}" ###"#{ENV['ENSTORE_CONFIG_PORT']}" | ||
| </record> | ||
| </filter> | ||
| <filter failedrequests> | ||
| @type record_transformer | ||
| auto_typecast | ||
| enable_ruby true | ||
| <record> | ||
| instance "#{ENV['CTA_INSTANCE']}" ###"#{ENV['ENSTORE_CONFIG_PORT']}" | ||
| </record> | ||
| </filter> | ||
| <filter tapeall> | ||
| @type record_transformer | ||
| auto_typecast | ||
| enable_ruby true | ||
| <record> | ||
| instance "#{ENV['CTA_INSTANCE']}" ###"#{ENV['ENSTORE_CONFIG_PORT']}" | ||
| </record> | ||
| </filter> | ||
| <match tapepool> | ||
| #@type file | ||
| @type kafka2 | ||
| brokers lskafka.fnal.gov:9092 #lssrv02.fnal.gov:9092 | ||
| topic ingest.cta.monitoring.tapepools | ||
| topic_key ingest.cta.monitoring.tapepools | ||
| <inject> | ||
| time_key timestamp | ||
| time_type string | ||
| time_format %Y-%m-%dT%H:%M:%S%z | ||
| </inject> | ||
| <format> | ||
| @type json | ||
| </format> | ||
| #path /tmp/logs/lala1 | ||
| </match> | ||
| <match showqueues> | ||
| #@type file | ||
| #path /tmp/logs/lala2 | ||
| @type kafka2 | ||
| <format> | ||
| @type json | ||
| </format> | ||
| brokers lskafka.fnal.gov:9092 #lssrv02.fnal.gov:9092 | ||
| topic ingest.cta.monitoring.ctaqueues | ||
| topic_key ingest.cta.monitoring.ctaqueues | ||
| <inject> | ||
| time_key timestamp | ||
| time_type string | ||
| time_format %Y-%m-%dT%H:%M:%S%z | ||
| </inject> | ||
| </match> | ||
| <match failedrequests> | ||
| #@type file | ||
| @type kafka2 | ||
| brokers lskafka.fnal.gov:9092 #lssrv02.fnal.gov:9092 | ||
| topic ingest.cta.monitoring.failedrequests | ||
| topic_key ingest.cta.monitoring.failedrequests | ||
| <inject> | ||
| time_key timestamp | ||
| time_type string | ||
| time_format %Y-%m-%dT%H:%M:%S%z | ||
| </inject> | ||
| <format> | ||
| @type json | ||
| </format> | ||
| #path /tmp/logs/lala3 | ||
| </match> | ||
| <match tapeall> | ||
| #@type file | ||
| @type kafka2 | ||
| brokers lskafka.fnal.gov:9092 #lssrv02.fnal.gov:9092 | ||
| topic ingest.cta.monitoring.tapeall | ||
| topic_key ingest.cta.monitoring.tapeall | ||
| <inject> | ||
| time_key timestamp | ||
| time_type string | ||
| time_format %Y-%m-%dT%H:%M:%S%z | ||
| </inject> | ||
| <format> | ||
| @type json | ||
| </format> | ||
| #path /tmp/logs/lala4 | ||
| </match> | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have you tried what is here: https://docs.fluentd.org/configuration/config-file#wildcards-expansions-and-other-tips
In other words, what if you named your sources cta_admin.tapepool, cta_admin.tapeall, etc
The way I read it you could have ONE filter
<filter cta_admin.*>to add the instance and whatever other values you want.