Comments (4)
@treydock I think docs will help but what’s the exact purpose of these parameters? Are the eventually going to populate metadata?
from puppet-module-sensuclassic.
They populate /etc/sensu/conf.d/client.json
, is there something else they should be doing? The values are passed to sensu_client_config
type which just manages the client.json
file.
The vagrant tests in this module use this:
$client_ec2 = {
'instance-id' => 'i-2102113',
}
$client_puppet = {
'nodename' => $::fqdn,
}
$client_chef = {
'nodename' => $::fqdn,
}
$client_servicenow = {
'configuration_item' => {
'name' => 'ServiceNow test',
'os_version' => '16.04',
},
}
class { 'sensuclassic':
rabbitmq_password => 'correct-horse-battery-staple',
rabbitmq_host => '192.168.156.10',
rabbitmq_vhost => '/sensu',
subscriptions => 'all',
client_address => $ip,
client_ec2 => $client_ec2,
client_chef => $client_chef,
client_puppet => $client_puppet,
client_servicenow => $client_servicenow,
filters => $filters,
filter_defaults => $filter_defaults,
version => 'latest',
}
And generates this:
{
"client": {
"address": "192.168.156.11",
"chef": {
"nodename": "el7-client.example.com"
},
"ec2": {
"instance-id": "i-2102113"
},
"http_socket": {
},
"keepalive": {
},
"name": "el7-client.example.com",
"puppet": {
"nodename": "el7-client.example.com"
},
"safe_mode": false,
"servicenow": {
"configuration_item": {
"name": "ServiceNow test",
"os_version": "16.04"
}
},
"socket": {
"bind": "127.0.0.1",
"port": 3030
},
"subscriptions": [
"all"
]
}
}
Per the docs this seems to be the behavior that should be happening:
https://docs.sensu.io/sensu-core/1.7/reference/clients/#ec2-attributes
Are you seeing something different?
from puppet-module-sensuclassic.
That is the exact behavior I’m seeing but it’s the same behavior I saw before with
$client_custom = {
‘ec2’ => {
'instance-id' => 'i-2102113',
},
‘puppet’ => {
'nodename' => $::fqdn,
},
‘chef’ => {
'nodename' => $::fqdn,
},
‘servicenow’ => {
'configuration_item' => {
'name' => 'ServiceNow test',
'os_version' => '16.04',
},
},
}
Producing the same client.json
from puppet-module-sensuclassic.
Then what you're seeing exactly what I'd expect given the design of the Puppet code. Your ec2
in client_custom
should behave the same before as using client_ec2
after the change to Puppet module. Because client_custom
is a "catch all" for anything not defined as a valid property, it has to exclude keys that map to valid properties otherwise custom would end up being populated with data that would conflict with properties.
If you'd expect to see something different let me know. So far I think the only change to this module I am seeing being needed is to update documentation to reflect the behavior of client_custom
with regard to filtering out keys.
from puppet-module-sensuclassic.
Related Issues (9)
- Ubuntu 14.04 LTS is EOL
- Feature request: Add ability to have configuration changes reload sensu-enterprise instead issuing a restart
- sensuclassic_sorted_json HOT 1
- undefined method `pretty_generate' for Puppet::Pops::Loader::RubyFunctionInstantiator::JSON:Module HOT 3
- deprecated `validate_bool()` function HOT 2
- Service started before config applied HOT 4
- Windows sensu service DSC error for starting HOT 13
- Windows client value set to false throws puppet run error HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from puppet-module-sensuclassic.