I order to understand the sensu softwareβs workflow, i am trying to enable a basic cpu monitoring plugin. Objective is to setup standalone checks in a way that i can see the current cpu utilization metric from each sensu client on dashboard.
I have created 2 machines -
hostname: docker1 - planning t use this as sensu server
hostname: docker2 - planning to use this as sensu client.
[root@docker1 ~]# sensuctl entity list
ID Class OS Subscriptions Last Seen
βββββββββββββββββββ βββββββ βββββββ ββββββββββββββββββββββββββββββββββββββ ββββββββββββββββββββββββββββββββ
docker2.self.com agent linux system/linux,entity:docker2.self.com 2021-08-20 19:02:15 +0530 IST
[root@docker1 ~]#
the server is able to see the sensu client. Hereβs the namespace info -
[root@docker1 ~]# sensuctl config view
=== Active Configuration
API URL: http://127.0.0.1:8080
Namespace: default
Format: tabular
Timeout: 15s
Username: sensu
JWT Expiration Timestamp: 1629465301
i attemplted to familiarize my self with the monitoring aspect of the sensu plugins by enabling a cpu monitoring plugin. I followed the information listed in the documentation of the βcpu monitoring pluginβ - check-cpu-usage versions
[root@docker1 ~]# sensuctl asset add sensu/check-cpu-usage
no version specified, using latest: 0.2.2
fetching bonsai asset: sensu/check-cpu-usage:0.2.2
added asset: sensu/check-cpu-usage:0.2.2
You have successfully added the Sensu asset resource, but the asset will not get downloaded until
it's invoked by another Sensu resource (ex. check). To add this runtime asset to the appropriate
resource, populate the "runtime_assets" field with ["sensu/check-cpu-usage"].
on this stdout from the sensu asset add -
To add this runtime asset to the appropriate resource, populate the βruntime_assetsβ field with [βsensu/check-cpu-usageβ].
i was unable to find this(runtime_assets) section in the /etc/sensu/backend.yml file on the sensu server (docker1). So i am unsure where & how to configure this.
hereβs the list of assets -
[root@docker1 ~]# sensuctl asset list
Name URL Hash
ββββββββββββββββββββββββββββββββββββββββββββββββββ ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ ββββββββββ
sensu-plugins/sensu-plugins-cpu-checks //assets.bonsai.sensu.io/.../sensu-plugins-cpu-checks_4.1.0_debian9_linux_amd64.tar.gz 9dd717a
sensu-plugins/sensu-plugins-cpu-checks //assets.bonsai.sensu.io/.../sensu-plugins-cpu-checks_4.1.0_debian_linux_amd64.tar.gz f0435fd
sensu-plugins/sensu-plugins-cpu-checks //assets.bonsai.sensu.io/.../sensu-plugins-cpu-checks_4.1.0_centos7_linux_amd64.tar.gz 8a01862
sensu-plugins/sensu-plugins-cpu-checks //assets.bonsai.sensu.io/.../sensu-plugins-cpu-checks_4.1.0_centos6_linux_amd64.tar.gz f42be79
sensu-plugins/sensu-plugins-cpu-checks //assets.bonsai.sensu.io/.../sensu-plugins-cpu-checks_4.1.0_alpine3.8_linux_amd64.tar.gz 7a5ad2d
sensu-plugins/sensu-plugins-cpu-checks //assets.bonsai.sensu.io/.../sensu-plugins-cpu-checks_4.1.0_alpine_linux_amd64.tar.gz a67676f
sensu-plugins/sensu-plugins-cpu-checks:4.1.0 //assets.bonsai.sensu.io/.../sensu-plugins-cpu-checks_4.1.0_debian9_linux_amd64.tar.gz 9dd717a
sensu-plugins/sensu-plugins-cpu-checks:4.1.0 //assets.bonsai.sensu.io/.../sensu-plugins-cpu-checks_4.1.0_debian_linux_amd64.tar.gz f0435fd
sensu-plugins/sensu-plugins-cpu-checks:4.1.0 //assets.bonsai.sensu.io/.../sensu-plugins-cpu-checks_4.1.0_centos7_linux_amd64.tar.gz 8a01862
sensu-plugins/sensu-plugins-cpu-checks:4.1.0 //assets.bonsai.sensu.io/.../sensu-plugins-cpu-checks_4.1.0_centos6_linux_amd64.tar.gz f42be79
sensu-plugins/sensu-plugins-cpu-checks:4.1.0 //assets.bonsai.sensu.io/.../sensu-plugins-cpu-checks_4.1.0_alpine3.8_linux_amd64.tar.gz 7a5ad2d
sensu-plugins/sensu-plugins-cpu-checks:4.1.0 //assets.bonsai.sensu.io/.../sensu-plugins-cpu-checks_4.1.0_alpine_linux_amd64.tar.gz a67676f
sensu-plugins/sensu-plugins-memory-checks:4.1.1 //assets.bonsai.sensu.io/.../sensu-plugins-memory-checks_4.1.1_debian9_linux_amd64.tar.gz 45ed66c
sensu-plugins/sensu-plugins-memory-checks:4.1.1 //assets.bonsai.sensu.io/.../sensu-plugins-memory-checks_4.1.1_debian_linux_amd64.tar.gz a1dff4b
sensu-plugins/sensu-plugins-memory-checks:4.1.1 //assets.bonsai.sensu.io/.../sensu-plugins-memory-checks_4.1.1_centos7_linux_amd64.tar.gz aca2e38
sensu-plugins/sensu-plugins-memory-checks:4.1.1 //assets.bonsai.sensu.io/.../sensu-plugins-memory-checks_4.1.1_centos6_linux_amd64.tar.gz aae3a9f
sensu-plugins/sensu-plugins-memory-checks:4.1.1 //assets.bonsai.sensu.io/.../sensu-plugins-memory-checks_4.1.1_alpine3.8_linux_amd64.tar.gz 38a9e03
sensu-plugins/sensu-plugins-memory-checks:4.1.1 //assets.bonsai.sensu.io/.../sensu-plugins-memory-checks_4.1.1_alpine_linux_amd64.tar.gz 217b083
sensu/check-cpu-usage //assets.bonsai.sensu.io/.../check-cpu-usage_0.2.2_windows_amd64.tar.gz 900cfdf
sensu/check-cpu-usage //assets.bonsai.sensu.io/.../check-cpu-usage_0.2.2_darwin_amd64.tar.gz db81ee7
sensu/check-cpu-usage //assets.bonsai.sensu.io/.../check-cpu-usage_0.2.2_linux_armv7.tar.gz 400aacc
sensu/check-cpu-usage //assets.bonsai.sensu.io/.../check-cpu-usage_0.2.2_linux_arm64.tar.gz bef7802
sensu/check-cpu-usage //assets.bonsai.sensu.io/.../check-cpu-usage_0.2.2_linux_386.tar.gz a2dcb53
sensu/check-cpu-usage //assets.bonsai.sensu.io/.../check-cpu-usage_0.2.2_linux_amd64.tar.gz 2453973
sensu/sensu-ruby-runtime:0.0.10 //assets.bonsai.sensu.io/.../sensu-ruby-runtime_0.0.10_ruby-2.4.4_centos6_linux_amd64.tar.gz cbee191
sensu/sensu-ruby-runtime:0.0.10 //assets.bonsai.sensu.io/.../sensu-ruby-runtime_0.0.10_ruby-2.4.4_debian_linux_amd64.tar.gz a28952f
sensu/sensu-ruby-runtime:0.0.10 //assets.bonsai.sensu.io/.../sensu-ruby-runtime_0.0.10_ruby-2.4.4_centos_linux_amd64.tar.gz 338b88b
sensu/sensu-ruby-runtime:0.0.10 //assets.bonsai.sensu.io/.../sensu-ruby-runtime_0.0.10_ruby-2.4.4_alpine_linux_amd64.tar.gz 8d768d1
[root@docker1 ~]#
hereβs the view of the dashboard -
from this point, i am not sure what additional settings/config changes do i need to make on sensu servers and client to get this plugin to work.
Could you please point me to a web url which has complete workflow of deploying a simple plugin like this cpu monitoring/disk check etc.?