Skip to content
This repository has been archived by the owner on Mar 27, 2024. It is now read-only.

k8s_kubelet #173

Merged
merged 7 commits into from
Mar 27, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions cmd/godplugin/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import (
_ "github.com/netdata/go.d.plugin/modules/fluentd"
_ "github.com/netdata/go.d.plugin/modules/freeradius"
_ "github.com/netdata/go.d.plugin/modules/httpcheck"
_ "github.com/netdata/go.d.plugin/modules/k8s_kubelet"
_ "github.com/netdata/go.d.plugin/modules/k8s_kubeproxy"
_ "github.com/netdata/go.d.plugin/modules/lighttpd"
_ "github.com/netdata/go.d.plugin/modules/lighttpd2"
Expand Down
153 changes: 153 additions & 0 deletions config/go.d/k8s_kubelet.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,153 @@
# netdata go.d.plugin configuration for k8s_kubelet
#
# This file is in YaML format. Generally the format is:
#
# name: value
#
# There are 2 sections:
# - GLOBAL
# - JOBS
#
#
# [ GLOBAL ]
# These variables set the defaults for all JOBs, however each JOB may define its own, overriding the defaults.
#
# The GLOBAL section format:
# param1: value1
# param2: value2
#
# Currently supported global parameters:
# - update_every
# Data collection frequency in seconds. Default: 1.
#
# - autodetection_retry
# Re-check interval in seconds. Attempts to start the job are made once every interval.
# Zero means not to schedule re-check. Default: 0.
#
#
# [ JOBS ]
# JOBS allow you to collect values from multiple sources.
# Each source will have its own set of charts.
#
# IMPORTANT:
# - Parameter 'name' is mandatory.
# - Jobs with the same name are mutually exclusive. Only one of them will be allowed running at any time.
#
# This allows autodetection to try several alternatives and pick the one that works.
# Any number of jobs is supported.
#
# The JOBS section format:
#
# jobs:
# - name: job1
# param1: value1
# param2: value2
#
# - name: job2
# param1: value1
# param2: value2
#
# - name: job2
# param1: value1
#
#
# [ List of JOB specific parameters ]:
# - url
# Server URL.
# Syntax:
# url: http://127.0.0.1:10255/metrics
#
# - username
# Username for basic HTTP authentication.
# Syntax:
# username: tony
#
# - password
# Password for basic HTTP authentication.
# Syntax:
# password: stark
#
# - proxy_url
# Proxy URL.
# Syntax:
# proxy_url: http://localhost:3128
#
# - proxy_username
# Username for proxy basic HTTP authentication.
# Syntax:
# username: bruce
#
# - proxy_password
# Password for proxy basic HTTP authentication.
# Syntax:
# username: wayne
#
# - timeout
# HTTP response timeout.
# Syntax:
# timeout: 1
#
# - method
# HTTP request method.
# Syntax:
# method: GET
#
# - body
# HTTP request method.
# Syntax:
# body: '{fake: data}'
#
# - headers
# HTTP request headers.
# Syntax:
# headers:
# X-API-Key: key
#
# - not_follow_redirects
# Whether to not follow redirects from the server.
# Syntax:
# not_follow_redirects: yes/no
#
# - tls_skip_verify
# Whether to skip verifying server's certificate chain and hostname.
# Syntax:
# tls_skip_verify: yes/no
#
# - tls_ca
# Certificate authority that client use when verifying server certificates.
# Syntax:
# tls_ca: path/to/ca.pem
#
# - tls_cert
# Client tls certificate.
# Syntax:
# tls_cert: path/to/cert.pem
#
# - tls_key
# Client tls key.
# Syntax:
# tls_key: path/to/key.pem
#
#
# [ JOB defaults ]:
# url: http://127.0.0.1:10255/metrics
# timeout: 2
# method: GET
# not_follow_redirects: no
# tls_skip_verify: no
#
#
# [ JOB mandatory parameters ]:
# - name
# - url
#
# ------------------------------------------------MODULE-CONFIGURATION--------------------------------------------------
# [ GLOBAL ]
update_every: 1
autodetection_retry: 0
#
#
# [ JOBS ]
#jobs:
# - name: local
# url: http://127.0.0.1:10255/metrics
3 changes: 3 additions & 0 deletions modules/docker_engine/charts.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ var charts = Charts{
Title: "Container Actions",
Units: "actions/s",
Fam: "containers",
Type: module.Stacked,
Dims: Dims{
{ID: "container_actions_changes", Name: "changes", Algo: module.Incremental},
{ID: "container_actions_commit", Name: "commit", Algo: module.Incremental},
Expand All @@ -28,6 +29,7 @@ var charts = Charts{
Title: "Containers In Various States",
Units: "count",
Fam: "containers",
Type: module.Stacked,
Dims: Dims{
{ID: "container_states_running", Name: "running"},
{ID: "container_states_paused", Name: "paused"},
Expand All @@ -39,6 +41,7 @@ var charts = Charts{
Title: "Builder Builds Fails By Reason",
Units: "fails/s",
Fam: "builder",
Type: module.Stacked,
Dims: Dims{
{ID: "builder_fails_build_canceled", Name: "build_canceled", Algo: module.Incremental},
{ID: "builder_fails_build_target_not_reachable_error", Name: "build_target_not_reachable_error", Algo: module.Incremental},
Expand Down
80 changes: 80 additions & 0 deletions modules/k8s_kubelet/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
# kubelet

This module will monitor one or more kubelet instances.

It produces the following charts (if all data is available):

1. **API Server Audit Requests** in requests/s
* rejected

2. **API Server Failed Data Encryption Key(DEK) Generation Operations** in events/s
* failures

3. **API Server Latencies Of Data Encryption Key(DEK) Generation Operations** in observes/s
* per bucket (5 µs, 10 µs, ..., 40960 µs, +Inf)

4. **API Server Latencies Of Data Encryption Key(DEK) Generation Operations Percentage** in %
* per bucket (5 µs, 10 µs, ..., 40960 µs, +Inf)

5. **API Server Storage Envelope Transformation Cache Misses** in events/s
* cache misses

6. **Number Of Containers Currently Running** in running containers
* total

7. **Number Of Pods Currently Running** in running pods
* total

8. **Runtime Operations By Type** in operations/s
* per operation type

9. **Docker Operations By Type** in operations/s
* per operation type

10. **Docker Operations Errors By Type** in operations/s
* per operation error type

11. **Node Configuration-Related Error** in bool
* experiencing error

12. **PLEG Relisting Interval Summary** in microseconds
* per quantile (0.5, 0.9, 0.99)

13. **PLEG Relisting Latency Summary** in microseconds
* per quantile (0.5, 0.9, 0.99)

14. **Token() Requests To The Alternate Token Source** in token requests/s
* total
* failed

15. **REST Client HTTP Requests By Status Code** in requests/s
* per status code (200, 201, etc.)

16. **REST Client HTTP Requests By Method** in requests/s
* per http method (GET, POST, etc.)

17. **Volume Manager State Of The World** per every plugin in state of the world
* actual
* desired


### configuration

Needs only `url` to kubelet metric-address.

Here is an example:

```yaml
jobs:
- name: local
url : http://127.0.0.1:10255/metrics

- name: remote
url : http://100.64.0.1:10255/metrics
```

For all available options please see module [configuration file](https://github.com/netdata/go.d.plugin/blob/master/config/go.d/k8s_kubelet.conf).

Without configuration, module attempts to connect to `http://127.0.0.1:10255/metrics`

---
Loading