-
Notifications
You must be signed in to change notification settings - Fork 115
Prometheus scraping from sidecar and OSM changes #515
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
Merged
Merged
Changes from all commits
Commits
Show all changes
183 commits
Select commit
Hold shift + click to select a range
7811eab
adding SA changes
rashmichandrashekar 2a2e62e
changes for new container
rashmichandrashekar d52c921
reverting SA changes from this branch
rashmichandrashekar 32c1da0
adding container at the right place
rashmichandrashekar 28374fb
bootstrap sidecar container changes
rashmichandrashekar 14a6ceb
merging from ci_dev latest
rashmichandrashekar e462a98
fixing script
rashmichandrashekar 148a74b
more changes
rashmichandrashekar 09c889c
fix
rashmichandrashekar 0391169
redoing a bit
rashmichandrashekar 7418474
undoing npm
rashmichandrashekar cd48858
changes to container.conf
rashmichandrashekar e3921a7
updating telegraf and fluent bit conf
rashmichandrashekar 7ffbbe8
copying files during build
rashmichandrashekar 791b0d3
changes
rashmichandrashekar 8767e7e
changes
rashmichandrashekar 06dea33
changes
rashmichandrashekar 00a9034
adding monitor kub pods
rashmichandrashekar 3f430c9
move configmap parsing to sidecar telegraf
rashmichandrashekar 0210152
more changes
rashmichandrashekar cd045ae
bug fix in main.sh
rashmichandrashekar a2e43dd
fixing bug
rashmichandrashekar c0e0424
adding nil check and some fixes
rashmichandrashekar 9ebee5b
Revert "adding nil check and some fixes"
rashmichandrashekar 1c7be97
bug fixes
rashmichandrashekar f5d297b
new changes
rashmichandrashekar 490e25e
fixes
rashmichandrashekar 6e6d587
adding pods version to default setting
rashmichandrashekar 064e621
add label and field selectors in config map for custom prom scraping …
gracewehner b4e4eb2
fix label/field selector defaults
gracewehner 53184e4
adding logs
rashmichandrashekar 616d453
adding more logs
rashmichandrashekar 2515a4d
bug fix for labe; and field selectors
rashmichandrashekar dfa4264
adding def vars
rashmichandrashekar 8db8133
bug fix
rashmichandrashekar 8c2351a
update telegraf build
rashmichandrashekar 3ab6b18
bug fix for empty array
rashmichandrashekar c1688e0
move telgraf test to after cadvisor env vars
rashmichandrashekar 344b191
add type check for label and field selectors
gracewehner 9ca455e
use latest telegraf
gracewehner 7345592
add OSM configmap
rashmichandrashekar b633657
Merge branch 'rashmi/osm' of https://github.com/microsoft/Docker-Prov…
rashmichandrashekar a662083
changes for OSM configmap
rashmichandrashekar 83fe683
fixing bugs
rashmichandrashekar b3a7eab
removing comments
rashmichandrashekar 6c6ca2d
configmap parser changes for OSM
rashmichandrashekar a517d57
more changes for configmap
rashmichandrashekar 3fae90d
fixing bug
rashmichandrashekar 8454561
bug fix
rashmichandrashekar c588ca6
fixing more bugs
rashmichandrashekar 3dc1055
no osm
rashmichandrashekar 1dbfe4e
bug fix
rashmichandrashekar cb47723
fixing bugs
rashmichandrashekar 6fdc78e
bug fix
rashmichandrashekar 239c49b
bug fix
rashmichandrashekar 28f9044
bug fix
rashmichandrashekar bd98690
fixing spaces
rashmichandrashekar 3f4fc22
test changes
rashmichandrashekar 9c657ad
fix
rashmichandrashekar 277f036
some tests
rashmichandrashekar c1abb67
changes
rashmichandrashekar 5aeec63
conflict changes
rashmichandrashekar f44266a
update interval for osm sidecar config
rashmichandrashekar e27c438
get namespaces
rashmichandrashekar faf2ef0
adding prefix for OSM tags
rashmichandrashekar 4554b52
appmap changes
rashmichandrashekar cd3b9d9
app map changes
rashmichandrashekar ef8c802
appmap changes
rashmichandrashekar b8843c5
changes
rashmichandrashekar 1b3b8b6
changes
rashmichandrashekar e31f310
changes
rashmichandrashekar fe11037
changes
rashmichandrashekar 8dfeedb
changes
rashmichandrashekar efd587c
changes
rashmichandrashekar 9ed7c3e
moving parsers
rashmichandrashekar 2b3a17b
log json
rashmichandrashekar cfb53c3
more logs
rashmichandrashekar 4f64c72
bug fix
rashmichandrashekar 9a869da
adding additional fields
rashmichandrashekar 3612cb5
fixing bugs
rashmichandrashekar 06b2657
adding some more logs
rashmichandrashekar 491821a
Adding req for telegraf metric
rashmichandrashekar 3ce19dd
more logs
rashmichandrashekar 54eabe9
commenting byte logs
rashmichandrashekar 7ba1aec
changing data in request
rashmichandrashekar 14c0c6d
make dynamic field changes
rashmichandrashekar d7e5b65
bug fix
rashmichandrashekar 15be8cd
adding log type in the header
rashmichandrashekar eaa6136
adding al headers
rashmichandrashekar b620a25
ODS changes
rashmichandrashekar 9f2e9bd
adding api version
rashmichandrashekar 6bea937
modifying app dependency
rashmichandrashekar 743c967
bug fix
rashmichandrashekar 1710d58
changes
rashmichandrashekar b5cb1ca
changing to generic property bag
rashmichandrashekar bb274cb
addng header back
rashmichandrashekar 0a76b20
test
rashmichandrashekar f468647
ch
rashmichandrashekar 974486b
changes
rashmichandrashekar 3db82f7
undoing appmap changes to keep branch clean
rashmichandrashekar 0fa48a6
Merge branch 'rashmi/osm' of https://github.com/microsoft/Docker-Prov…
rashmichandrashekar 1f3f420
undoing oms.go changes
rashmichandrashekar 71081b1
Merge branch 'rashmi/osm' of https://github.com/microsoft/Docker-Prov…
rashmichandrashekar 02a468d
reverting changes for appmap
rashmichandrashekar 9970687
merging from ci_dev
rashmichandrashekar 564ad1b
updating metric names
rashmichandrashekar f262d49
add forward slash to osm prometheus tag
rashmichandrashekar 5bfa4e4
fixing metric name for latency
rashmichandrashekar 256cfe9
fixing metric name
rashmichandrashekar 651ff8d
moving config replace to its own method
rashmichandrashekar 3700391
adding bytes metrics
rashmichandrashekar de25b22
bug fix
rashmichandrashekar 4d880b2
telemetry changes
rashmichandrashekar 357281c
fixing formatting
rashmichandrashekar 7e1b148
integer to string
rashmichandrashekar b517f26
change to integer
rashmichandrashekar b3a82d9
bug fix
rashmichandrashekar 76625a0
bug fix
rashmichandrashekar 21ae270
fix field and label selector telemetry
gracewehner fd3f695
Add comments to clarify label/field selector telemetry
gracewehner 87fd6d8
changes to install telegraf on windows container
rashmichandrashekar efcef9b
Merge branch 'rashmi/osm' of https://github.com/microsoft/Docker-Prov…
rashmichandrashekar 64deacf
creating folder structure
rashmichandrashekar 80aeb44
updating path
rashmichandrashekar 8bc05c9
Running telegraf service
rashmichandrashekar 95af4d4
changes
rashmichandrashekar 30259b9
setting env vars
rashmichandrashekar d619bb6
fixing pre req script
rashmichandrashekar 8436518
adding null checks
rashmichandrashekar 4482485
configparser changes
rashmichandrashekar 46b5ef5
refactor changes
rashmichandrashekar f6fc4a4
fixinf defaults
rashmichandrashekar b928454
script changes for windows
rashmichandrashekar a1e5db4
adding comment
rashmichandrashekar 56b524e
add kube.conf check to all places in main.sh
rashmichandrashekar 6197e42
binding diff port for monitoring agent conf
rashmichandrashekar 62528cd
update syslog port
rashmichandrashekar 62c6ef6
fixing typo
rashmichandrashekar 258a2d6
updating ports
rashmichandrashekar be4fa52
adding windows telemetry
rashmichandrashekar a834912
adding some phased rollout logic
rashmichandrashekar 0e13323
phased rollout changes
rashmichandrashekar eea93e0
some more
rashmichandrashekar ef0a030
some changes
rashmichandrashekar 9707bcf
changes
rashmichandrashekar 204806b
some more
rashmichandrashekar c8a16cc
more changes
rashmichandrashekar 86b7bd3
changes for backcompat
rashmichandrashekar 12a8f5c
changes
rashmichandrashekar 246460d
new telegraf build
rashmichandrashekar a46ed9a
bug fixes
rashmichandrashekar 6d2d09d
including latest changes
rashmichandrashekar dd10118
fixing telemetry bug
rashmichandrashekar 998cb08
fix
rashmichandrashekar 1fe5842
fixing osm parsing
rashmichandrashekar a4deef7
clean up main.sh
rashmichandrashekar fcb3bc2
bug fix
rashmichandrashekar de826ae
bug fix
rashmichandrashekar 5ece56c
bug fixes
rashmichandrashekar c8f2745
changes
rashmichandrashekar 443e784
telemetry bug fix
rashmichandrashekar abdb59a
adding exception handler
rashmichandrashekar 9247709
fixes for socket issue
rashmichandrashekar bbbdaf1
bug fix
rashmichandrashekar bb49bb0
adding metrics
rashmichandrashekar a72f0a5
getting telegraf build from pre release
rashmichandrashekar 03b4b16
windows changes
rashmichandrashekar 08fa562
bug fix
rashmichandrashekar fc16a38
some changes
rashmichandrashekar b7a9cd3
bug fixes
rashmichandrashekar 362f659
fixing bug
rashmichandrashekar 2280b81
Merge branch 'ci_dev' into rashmi/osm
rashmichandrashekar 60c2d03
removing some comments and unused code
rashmichandrashekar fda92d6
removing unused sections from sidecar container
rashmichandrashekar 9c8d50e
accidentally removed mounts from rs
rashmichandrashekar 41f5033
changes
rashmichandrashekar 3014f22
increasing fluentbit buffer sizes
rashmichandrashekar 44f8a7d
getting latest telegraf release
rashmichandrashekar 09bb40e
some bug fixes
rashmichandrashekar 7569b46
fixing PR comments
rashmichandrashekar 045b586
removing commented lines
rashmichandrashekar e26a3d4
fixing PR comments
rashmichandrashekar a41ad82
merging from latest ci_dev
rashmichandrashekar 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
423 changes: 423 additions & 0 deletions
423
build/common/installer/scripts/tomlparser-prom-customconfig.rb
Large diffs are not rendered by default.
Oops, something went wrong.
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,4 @@ | ||
|
|
||
|
|
||
|
|
||
|
|
28 changes: 28 additions & 0 deletions
28
build/linux/installer/conf/td-agent-bit-prom-side-car.conf
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,28 @@ | ||
| [SERVICE] | ||
| #Default service flush interval is 15 seconds | ||
| Flush 15 | ||
| HTTP_Server Off | ||
| Daemon Off | ||
| storage.path /var/opt/microsoft/docker-cimprov/state/flbstore/ | ||
rashmichandrashekar marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| storage.sync normal | ||
| storage.checksum off | ||
| storage.backlog.mem_limit 10M | ||
| Log_Level info | ||
| Parsers_File /etc/opt/microsoft/docker-cimprov/azm-containers-parser.conf | ||
| Log_File /var/opt/microsoft/docker-cimprov/log/fluent-bit.log | ||
|
|
||
| [INPUT] | ||
rashmichandrashekar marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| Name tcp | ||
| Tag oms.container.perf.telegraf.* | ||
| Listen 0.0.0.0 | ||
| Port 25229 | ||
| Chunk_Size 1m | ||
| Buffer_Size 1m | ||
| Mem_Buf_Limit 20m | ||
|
|
||
| [OUTPUT] | ||
| Name oms | ||
| EnableTelemetry true | ||
| Retry_Limit 10 | ||
| TelemetryPushIntervalSeconds 300 | ||
| Match oms.container.* | ||
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,162 @@ | ||
| # Telegraf Configuration | ||
| # | ||
| # Telegraf is entirely plugin driven. All metrics are gathered from the | ||
| # declared inputs, and sent to the declared outputs. | ||
| # | ||
| # Plugins must be declared in here to be active. | ||
| # To deactivate a plugin, comment out the name and any variables. | ||
| # | ||
| # Use 'telegraf -config telegraf.conf -test' to see what metrics a config | ||
| # file would generate. | ||
| # | ||
| # Environment variables can be used anywhere in this config file, simply prepend | ||
| # them with $. For strings the variable must be within quotes (ie, "$STR_VAR"), | ||
| # for numbers and booleans they should be plain (ie, $INT_VAR, $BOOL_VAR) | ||
|
|
||
|
|
||
| # Global tags can be specified here in key="value" format. | ||
| [global_tags] | ||
| hostName = "placeholder_hostname" | ||
|
|
||
| # Configuration for telegraf agent | ||
| [agent] | ||
| ## Default data collection interval for all inputs | ||
| interval = "60s" | ||
| ## Rounds collection interval to 'interval' | ||
| ## ie, if interval="10s" then always collect on :00, :10, :20, etc. | ||
| round_interval = true | ||
|
|
||
| ## Telegraf will send metrics to outputs in batches of at most | ||
| ## metric_batch_size metrics. | ||
| ## This controls the size of writes that Telegraf sends to output plugins. | ||
| metric_batch_size = 3000 | ||
|
|
||
| ## For failed writes, telegraf will cache metric_buffer_limit metrics for each | ||
| ## output, and will flush this buffer on a successful write. Oldest metrics | ||
| ## are dropped first when this buffer fills. | ||
| ## This buffer only fills when writes fail to output plugin(s). | ||
| metric_buffer_limit = 60000 | ||
|
|
||
| ## Collection jitter is used to jitter the collection by a random amount. | ||
| ## Each plugin will sleep for a random time within jitter before collecting. | ||
| ## This can be used to avoid many plugins querying things like sysfs at the | ||
| ## same time, which can have a measurable effect on the system. | ||
| collection_jitter = "0s" | ||
|
|
||
| ## Default flushing interval for all outputs. You shouldn't set this below | ||
| ## interval. Maximum flush_interval will be flush_interval + flush_jitter | ||
| flush_interval = "15s" | ||
| ## Jitter the flush interval by a random amount. This is primarily to avoid | ||
| ## large write spikes for users running a large number of telegraf instances. | ||
| ## ie, a jitter of 5s and interval 10s means flushes will happen every 10-15s | ||
| flush_jitter = "0s" | ||
|
|
||
| ## By default or when set to "0s", precision will be set to the same | ||
| ## timestamp order as the collection interval, with the maximum being 1s. | ||
| ## ie, when interval = "10s", precision will be "1s" | ||
| ## when interval = "250ms", precision will be "1ms" | ||
| ## Precision will NOT be used for service inputs. It is up to each individual | ||
| ## service input to set the timestamp at the appropriate precision. | ||
| ## Valid time units are "ns", "us" (or "µs"), "ms", "s". | ||
| precision = "" | ||
|
|
||
| ## Logging configuration: | ||
| ## Run telegraf with debug log messages. | ||
| debug = false | ||
| ## Run telegraf in quiet mode (error log messages only). | ||
| quiet = true | ||
| ## Specify the log file name. The empty string means to log to stderr. | ||
| logfile = "" | ||
| ## Override default hostname, if empty use os.Hostname() | ||
| #hostname = "placeholder_hostname" | ||
| ## If set to true, do no set the "host" tag in the telegraf agent. | ||
| omit_hostname = true | ||
|
|
||
|
|
||
| ############################################################################### | ||
| # OUTPUT PLUGINS # | ||
| ############################################################################### | ||
|
|
||
| # Generic socket writer capable of handling multiple socket types. | ||
| [[outputs.socket_writer]] | ||
| ## URL to connect to | ||
| address = "tcp://0.0.0.0:25229" | ||
| # address = "tcp://example.com:http" | ||
| # address = "tcp4://127.0.0.1:8094" | ||
| # address = "tcp6://127.0.0.1:8094" | ||
| # address = "tcp6://[2001:db8::1]:8094" | ||
| # address = "udp://127.0.0.1:8094" | ||
| # address = "udp4://127.0.0.1:8094" | ||
| # address = "udp6://127.0.0.1:8094" | ||
| # address = "unix:///tmp/telegraf.sock" | ||
| # address = "unixgram:///tmp/telegraf.sock" | ||
|
|
||
| ## Optional TLS Config | ||
| # tls_ca = "/etc/telegraf/ca.pem" | ||
| # tls_cert = "/etc/telegraf/cert.pem" | ||
| # tls_key = "/etc/telegraf/key.pem" | ||
| ## Use TLS but skip chain & host verification | ||
| # insecure_skip_verify = false | ||
|
|
||
| ## Period between keep alive probes. | ||
| ## Only applies to TCP sockets. | ||
| ## 0 disables keep alive probes. | ||
| ## Defaults to the OS configuration. | ||
| # keep_alive_period = "5m" | ||
|
|
||
| ## Data format to generate. | ||
| ## Each data format has its own unique set of configuration options, read | ||
| ## more about them here: | ||
| ## https://github.com/influxdata/telegraf/blob/master/docs/DATA_FORMATS_INPUT.md | ||
| data_format = "json" | ||
| namedrop = ["agent_telemetry"] | ||
|
|
||
| ############################################################################### | ||
| # PROCESSOR PLUGINS # | ||
| ############################################################################### | ||
|
|
||
| [[processors.converter]] | ||
| [processors.converter.fields] | ||
| float = ["*"] | ||
|
|
||
| #Prometheus Custom Metrics | ||
| [[inputs.prometheus]] | ||
| interval = "$AZMON_TELEGRAF_CUSTOM_PROM_INTERVAL" | ||
|
|
||
| ## Scrape Kubernetes pods for the following prometheus annotations: | ||
| ## - prometheus.io/scrape: Enable scraping for this pod | ||
| ## - prometheus.io/scheme: If the metrics endpoint is secured then you will need to | ||
| ## set this to `https` & most likely set the tls config. | ||
| ## - prometheus.io/path: If the metrics path is not /metrics, define it with this annotation. | ||
| ## - prometheus.io/port: If port is not 9102 use this annotation | ||
| $AZMON_TELEGRAF_CUSTOM_PROM_MONITOR_PODS | ||
| $AZMON_TELEGRAF_CUSTOM_PROM_SCRAPE_SCOPE | ||
|
|
||
| $AZMON_TELEGRAF_CUSTOM_PROM_KUBERNETES_LABEL_SELECTOR | ||
| $AZMON_TELEGRAF_CUSTOM_PROM_KUBERNETES_FIELD_SELECTOR | ||
|
|
||
| fieldpass = $AZMON_TELEGRAF_CUSTOM_PROM_FIELDPASS | ||
| fielddrop = $AZMON_TELEGRAF_CUSTOM_PROM_FIELDDROP | ||
|
|
||
| metric_version = 2 | ||
| url_tag = "scrapeUrl" | ||
| ## Kubernetes config file to create client from. | ||
| # kube_config = "/path/to/kubernetes.config" | ||
|
|
||
| ## Use bearer token for authorization. ('bearer_token' takes priority) | ||
| bearer_token = "/var/run/secrets/kubernetes.io/serviceaccount/token" | ||
| ## OR | ||
| # bearer_token_string = "abc_123" | ||
|
|
||
| ## Specify timeout duration for slower prometheus clients (default is 3s) | ||
| response_timeout = "15s" | ||
|
|
||
| ## Optional TLS Config | ||
| tls_ca = "/var/run/secrets/kubernetes.io/serviceaccount/ca.crt" | ||
| ## Use TLS but skip chain & host verification | ||
| insecure_skip_verify = true | ||
|
|
||
| $AZMON_TELEGRAF_CUSTOM_PROM_PLUGINS_WITH_NAMESPACE_FILTER | ||
|
|
||
| ## OSM Prometheus configuration | ||
| $AZMON_TELEGRAF_OSM_PROM_PLUGINS |
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
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
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.