-
Notifications
You must be signed in to change notification settings - Fork 16.8k
[stable/heartbeat] Add Heartbeat to check status of your services #5766
Conversation
/assign @viglesiasce |
@viglesiasce Would you mind reviewing this? Thanks! |
Could anyone review this? Thanks. |
path: /var/log | ||
- name: varlibdockercontainers | ||
hostPath: | ||
path: /var/lib/docker/containers |
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.
I don't think hearbeat needs to access this folder, Filebeat uses it to retrieve logs, but metadata is retrieved from the API
- name: NODE_NAME | ||
valueFrom: | ||
fieldRef: | ||
fieldPath: spec.nodeName |
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.
these 2 variables probably come from an older version, since 6.2
we no longer need them
volumes: | ||
- name: varlog | ||
hostPath: | ||
path: /var/log |
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.
This folder isn't needed either
- name: data | ||
hostPath: | ||
path: /var/lib/heartbeat | ||
type: DirectoryOrCreate |
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.
nice, this improves our current manifests, I'll copy it to upstream ❤️
processors: | ||
- add_cloud_metadata: | ||
|
||
output.file: |
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.
How about leaving an elasticsearch output section commented out just after this one? That would help the user configuring the most common use case. Something like this:
# output.elasticsearch:
# hosts: ["localhost:9200"]
# protocol: "https"
# username: "elastic"
# password: "changeme"
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.
Sounds good!
@exekias Thanks for the review! Every point made sense to me / was addressed in the follow-up commits 👍 |
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.
Please add a config table to the readme.
@@ -0,0 +1,77 @@ | |||
apiVersion: apps/v1beta2 |
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.
Since you require K8s 1.9+ in the readme, you could go for apps/v1
.
/assign |
Manually verified to work by installing it like `helm install ~/charts/stable/heartbeat --name hb --namespace hb` and then reading logs: ```console $ stern --namespace hb heart + hb-heartbeat-zljn2 › heartbeat hb-heartbeat-zljn2 heartbeat 2018-05-25T09:07:17.531ZINFOinstance/beat.go:468Home path: [/usr/share/heartbeat] Config path: [/usr/share/heartbeat] Data path: [/usr/share/heartbeat/data] Logs path: [/usr/share/heartbeat/logs] hb-heartbeat-zljn2 heartbeat 2018-05-25T09:07:17.532ZINFOinstance/beat.go:475Beat UUID: cc04f1e7-c1a2-4e9c-beca-009539becd87 hb-heartbeat-zljn2 heartbeat 2018-05-25T09:07:17.532ZINFOinstance/beat.go:213Setup Beat: heartbeat; Version: 6.2.4 hb-heartbeat-zljn2 heartbeat 2018-05-25T09:07:20.534ZINFOadd_cloud_metadata/add_cloud_metadata.go:297add_cloud_metadata: hosting provider type not detected. hb-heartbeat-zljn2 heartbeat 2018-05-25T09:07:20.534ZINFOfileout/file.go:76Initialized file output. path=/usr/share/heartbeat/data/heartbeat max_size_bytes=10240000 max_backups=5 permissions=-rw------- hb-heartbeat-zljn2 heartbeat 2018-05-25T09:07:20.535ZINFOpipeline/module.go:76Beat name: hb-heartbeat-zljn2 hb-heartbeat-zljn2 heartbeat 2018-05-25T09:07:20.535ZWARNbeater/heartbeat.go:24Beta: Heartbeat is beta software hb-heartbeat-zljn2 heartbeat 2018-05-25T09:07:20.535ZINFObeater/manager.go:110Select (active) monitor icmp hb-heartbeat-zljn2 heartbeat 2018-05-25T09:07:20.537ZINFO[monitoring]log/log.go:97Starting metrics logging every 30s hb-heartbeat-zljn2 heartbeat 2018-05-25T09:07:20.538ZINFOinstance/beat.go:301heartbeat start running. hb-heartbeat-zljn2 heartbeat 2018-05-25T09:07:20.538ZINFObeater/heartbeat.go:56heartbeat is running! Hit CTRL-C to stop it. hb-heartbeat-zljn2 heartbeat 2018-05-25T09:07:50.538ZINFO[monitoring]log/log.go:124Non-zero metrics in the last 30s{"monitoring": {"metrics": {"beat":{"cpu":{"system":{"ticks":40,"time":40},"total":{"ticks":70,"time":74,"value":70},"user":{"ticks":30,"time":34}},"info":{"ephemeral_id":"23539714-a27c-40bb-a124-805b7e009958","uptime":{"ms":33026}},"memstats":{"gc_next":4194304,"memory_alloc":2423104,"memory_total":4047776,"rss":22454272}},"libbeat":{"config":{"module":{"running":0}},"output":{"events":{"acked":5,"batches":5,"total":5},"type":"file","write":{"bytes":2306}},"pipeline":{"clients":1,"events":{"active":1,"published":6,"total":6},"queue":{"acked":5}}},"system":{"cpu":{"cores":2},"load":{"1":0.75,"15":0.38,"5":0.55,"norm":{"1":0.375,"15":0.19,"5":0.275}}}}}} ``` Templates and values.yaml is mostly similar to stable/filebeat's. The main difference is `config:` in values.yaml, which directly reflects heartbeat's own configuration file. Other changelog: - Include the configuration table in README - Include the commented-out elasticsearch output to support common use-cases
@unguiculus Thanks for reviewing! I've addressed your comments in the last commit. Would you mind taking a look again? |
/ok-to-test |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: mumoshu, unguiculus The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Manually verified to work by installing it like `helm install ~/charts/stable/heartbeat --name hb --namespace hb` and then reading logs: ```console $ stern --namespace hb heart + hb-heartbeat-zljn2 › heartbeat hb-heartbeat-zljn2 heartbeat 2018-05-25T09:07:17.531ZINFOinstance/beat.go:468Home path: [/usr/share/heartbeat] Config path: [/usr/share/heartbeat] Data path: [/usr/share/heartbeat/data] Logs path: [/usr/share/heartbeat/logs] hb-heartbeat-zljn2 heartbeat 2018-05-25T09:07:17.532ZINFOinstance/beat.go:475Beat UUID: cc04f1e7-c1a2-4e9c-beca-009539becd87 hb-heartbeat-zljn2 heartbeat 2018-05-25T09:07:17.532ZINFOinstance/beat.go:213Setup Beat: heartbeat; Version: 6.2.4 hb-heartbeat-zljn2 heartbeat 2018-05-25T09:07:20.534ZINFOadd_cloud_metadata/add_cloud_metadata.go:297add_cloud_metadata: hosting provider type not detected. hb-heartbeat-zljn2 heartbeat 2018-05-25T09:07:20.534ZINFOfileout/file.go:76Initialized file output. path=/usr/share/heartbeat/data/heartbeat max_size_bytes=10240000 max_backups=5 permissions=-rw------- hb-heartbeat-zljn2 heartbeat 2018-05-25T09:07:20.535ZINFOpipeline/module.go:76Beat name: hb-heartbeat-zljn2 hb-heartbeat-zljn2 heartbeat 2018-05-25T09:07:20.535ZWARNbeater/heartbeat.go:24Beta: Heartbeat is beta software hb-heartbeat-zljn2 heartbeat 2018-05-25T09:07:20.535ZINFObeater/manager.go:110Select (active) monitor icmp hb-heartbeat-zljn2 heartbeat 2018-05-25T09:07:20.537ZINFO[monitoring]log/log.go:97Starting metrics logging every 30s hb-heartbeat-zljn2 heartbeat 2018-05-25T09:07:20.538ZINFOinstance/beat.go:301heartbeat start running. hb-heartbeat-zljn2 heartbeat 2018-05-25T09:07:20.538ZINFObeater/heartbeat.go:56heartbeat is running! Hit CTRL-C to stop it. hb-heartbeat-zljn2 heartbeat 2018-05-25T09:07:50.538ZINFO[monitoring]log/log.go:124Non-zero metrics in the last 30s{"monitoring": {"metrics": {"beat":{"cpu":{"system":{"ticks":40,"time":40},"total":{"ticks":70,"time":74,"value":70},"user":{"ticks":30,"time":34}},"info":{"ephemeral_id":"23539714-a27c-40bb-a124-805b7e009958","uptime":{"ms":33026}},"memstats":{"gc_next":4194304,"memory_alloc":2423104,"memory_total":4047776,"rss":22454272}},"libbeat":{"config":{"module":{"running":0}},"output":{"events":{"acked":5,"batches":5,"total":5},"type":"file","write":{"bytes":2306}},"pipeline":{"clients":1,"events":{"active":1,"published":6,"total":6},"queue":{"acked":5}}},"system":{"cpu":{"cores":2},"load":{"1":0.75,"15":0.38,"5":0.55,"norm":{"1":0.375,"15":0.19,"5":0.275}}}}}} ``` Templates and values.yaml is mostly similar to stable/filebeat's. The main difference is `config:` in values.yaml, which directly reflects heartbeat's own configuration file. Other changelog: - Include the configuration table in README - Include the commented-out elasticsearch output to support common use-cases
Manually verified to work by installing it like `helm install ~/charts/stable/heartbeat --name hb --namespace hb` and then reading logs: ```console $ stern --namespace hb heart + hb-heartbeat-zljn2 › heartbeat hb-heartbeat-zljn2 heartbeat 2018-05-25T09:07:17.531ZINFOinstance/beat.go:468Home path: [/usr/share/heartbeat] Config path: [/usr/share/heartbeat] Data path: [/usr/share/heartbeat/data] Logs path: [/usr/share/heartbeat/logs] hb-heartbeat-zljn2 heartbeat 2018-05-25T09:07:17.532ZINFOinstance/beat.go:475Beat UUID: cc04f1e7-c1a2-4e9c-beca-009539becd87 hb-heartbeat-zljn2 heartbeat 2018-05-25T09:07:17.532ZINFOinstance/beat.go:213Setup Beat: heartbeat; Version: 6.2.4 hb-heartbeat-zljn2 heartbeat 2018-05-25T09:07:20.534ZINFOadd_cloud_metadata/add_cloud_metadata.go:297add_cloud_metadata: hosting provider type not detected. hb-heartbeat-zljn2 heartbeat 2018-05-25T09:07:20.534ZINFOfileout/file.go:76Initialized file output. path=/usr/share/heartbeat/data/heartbeat max_size_bytes=10240000 max_backups=5 permissions=-rw------- hb-heartbeat-zljn2 heartbeat 2018-05-25T09:07:20.535ZINFOpipeline/module.go:76Beat name: hb-heartbeat-zljn2 hb-heartbeat-zljn2 heartbeat 2018-05-25T09:07:20.535ZWARNbeater/heartbeat.go:24Beta: Heartbeat is beta software hb-heartbeat-zljn2 heartbeat 2018-05-25T09:07:20.535ZINFObeater/manager.go:110Select (active) monitor icmp hb-heartbeat-zljn2 heartbeat 2018-05-25T09:07:20.537ZINFO[monitoring]log/log.go:97Starting metrics logging every 30s hb-heartbeat-zljn2 heartbeat 2018-05-25T09:07:20.538ZINFOinstance/beat.go:301heartbeat start running. hb-heartbeat-zljn2 heartbeat 2018-05-25T09:07:20.538ZINFObeater/heartbeat.go:56heartbeat is running! Hit CTRL-C to stop it. hb-heartbeat-zljn2 heartbeat 2018-05-25T09:07:50.538ZINFO[monitoring]log/log.go:124Non-zero metrics in the last 30s{"monitoring": {"metrics": {"beat":{"cpu":{"system":{"ticks":40,"time":40},"total":{"ticks":70,"time":74,"value":70},"user":{"ticks":30,"time":34}},"info":{"ephemeral_id":"23539714-a27c-40bb-a124-805b7e009958","uptime":{"ms":33026}},"memstats":{"gc_next":4194304,"memory_alloc":2423104,"memory_total":4047776,"rss":22454272}},"libbeat":{"config":{"module":{"running":0}},"output":{"events":{"acked":5,"batches":5,"total":5},"type":"file","write":{"bytes":2306}},"pipeline":{"clients":1,"events":{"active":1,"published":6,"total":6},"queue":{"acked":5}}},"system":{"cpu":{"cores":2},"load":{"1":0.75,"15":0.38,"5":0.55,"norm":{"1":0.375,"15":0.19,"5":0.275}}}}}} ``` Templates and values.yaml is mostly similar to stable/filebeat's. The main difference is `config:` in values.yaml, which directly reflects heartbeat's own configuration file. Other changelog: - Include the configuration table in README - Include the commented-out elasticsearch output to support common use-cases Signed-off-by: voron <[email protected]>
Manually verified to work by installing it like
helm install ~/charts/stable/heartbeat --name hb --namespace hb
and then reading logs:Templates and values.yaml is mostly similar to stable/filebeat's.
The main difference is
config:
in values.yaml, which directly reflects heartbeat's own configuration file.