You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I'm trying to override a check command on a specific node. This check is defined in my base class which is included on all my nodes. Then I would like to change some parameters on the check command on specific servers which are exceptions.
This is in my base module
sensu::check {'check_openmanage':
command => '/usr/lib64/nagios/plugins/check_openmanage -b ctrl_fw=0',
handlers => 'default',
standalone => false,
subscribers => 'dell',
}
for specific servers with no supported controller I need to add "--no-storage" param to my check command. I am using hiera to add the spcific commands parameters like this:
sensu::checks:
'check_openmanage':
command: '/usr/lib64/nagios/plugins/check_openmanage --no-storage -b ctrl_fw=0'
handlers: 'default'
standalone: false
subscribers: 'dell'
However I get the following error which is kind of expected:
Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Duplicate declaration: Sensu::Check[check_openmanage] is already declared in file modules/base/manifests/dell.pp:18; cannot redeclare at puppet/modules/sensu/manifests/init.pp:428 on node 'my node'
So i'm wondering how can I achieve my goal without having to add if $::fqdn == 'my_node_name' blocks in my base class?
The text was updated successfully, but these errors were encountered:
In the past I've solved this by defining a variable that either supplies --no-storage or an empty string to be inserted when the check is created based on a fact or something else known, but that doesn't work as smoothly in hiera. I'm wondering if $extensions, $handlers, and $checks should use hiera_hash to fetch and merge their values. Would that solve this issue for you?
Hi,
I'm trying to override a check command on a specific node. This check is defined in my base class which is included on all my nodes. Then I would like to change some parameters on the check command on specific servers which are exceptions.
This is in my base module
sensu::check {'check_openmanage':
command => '/usr/lib64/nagios/plugins/check_openmanage -b ctrl_fw=0',
handlers => 'default',
standalone => false,
subscribers => 'dell',
}
for specific servers with no supported controller I need to add "--no-storage" param to my check command. I am using hiera to add the spcific commands parameters like this:
sensu::checks:
'check_openmanage':
command: '/usr/lib64/nagios/plugins/check_openmanage --no-storage -b ctrl_fw=0'
handlers: 'default'
standalone: false
subscribers: 'dell'
However I get the following error which is kind of expected:
Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Duplicate declaration: Sensu::Check[check_openmanage] is already declared in file modules/base/manifests/dell.pp:18; cannot redeclare at puppet/modules/sensu/manifests/init.pp:428 on node 'my node'
So i'm wondering how can I achieve my goal without having to add if $::fqdn == 'my_node_name' blocks in my base class?
The text was updated successfully, but these errors were encountered: