Runtime assets are not installed/loaded
nagyt234 opened this issue · 1 comments
nagyt234 commented
Description of problem
- What did you do?
I've installed basic sensu-backend with sensu-puppet with client on the same machine.
- What happened?
I see in the dashboard, that the keepalive events are working correctly but the cpu-check not. I see the error sh: 1: check-cpu.rb: not found
.
- What did you expect to happen?
The runtime assets should be downloaded in the agent's cache.
- How can someone reproduce the problem?
Use the following manifest file:
node "........" {
class { 'sensu':
password => '~~~~~~',
use_ssl => false,
}
include sensu::backend
sensu_check { 'check-cpu':
ensure => 'present',
command => 'check-cpu.rb -w 75 -c 90',
interval => 60,
subscriptions => ['linux'],
runtime_assets => ['sensu-plugins-cpu-checks','sensu-ruby-runtime'],
}
class { 'sensu::agent':
subscriptions => ['linux'],
}
}
Command used and debugging output
- What does your puppet config look like (including any hiera config)
See the manifests file above
- Is this a masterless or master based puppet setup?
masterless
Platform and version information
- Your OS: Ubuntu 18.04.5 LTS, running on a Vagarnt virtual machine.
- Your Ruby version: ruby is not installed
- Your version of Puppet: 6.25.1 open source
- Your version of Sensu: 6.6.3-5588
- Your version of this module: 5.8.0
Anything else to add that you think will be helpful?
Note, that if I add the assets manually, it works:
sensuctl asset add sensu-plugins/sensu-plugins-cpu-checks -r sensu-plugins-cpu-checks
sensuctl asset add sensu/sensu-ruby-runtime -r sensu-ruby-runtime
So basically the question is, how can I achieve equivalent functionality as with these 2 sensuctl commands?
nagyt234 commented
The solution: the bonsai plugins has to be defined, so the correct manifests file:
node ".........." {
class { 'sensu':
password => '~~~~~~~~~~',
use_ssl => false,
}
include sensu::backend
sensu_check { 'check-cpu':
ensure => 'present',
command => 'check-cpu.rb -w 75 -c 90',
interval => 60,
subscriptions => ['linux'],
runtime_assets => ['sensu-plugins-cpu-checks','sensu-ruby-runtime'],
}
sensu_bonsai_asset { 'sensu-plugins/sensu-plugins-cpu-checks':
rename => 'sensu-plugins-cpu-checks',
ensure => 'present',
}
sensu_bonsai_asset { 'sensu/sensu-ruby-runtime':
rename => 'sensu-ruby-runtime',
ensure => 'present',
}
class { 'sensu::agent':
subscriptions => ['linux'],
}
}