wip
This commit is contained in:
parent
6cdc371616
commit
9b9f443b9b
2 changed files with 10 additions and 2 deletions
|
@ -16,7 +16,7 @@ then
|
|||
exit $UNKNOWN
|
||||
fi
|
||||
|
||||
ssh sshmon@"$SSHMON_HOST" "$SSHMON_COMMAND"
|
||||
ssh sshmon@"$SSHMON_HOST" "sudo $SSHMON_COMMAND"
|
||||
|
||||
exitcode=$?
|
||||
|
||||
|
|
|
@ -33,7 +33,8 @@ def default_check_command(metadata):
|
|||
|
||||
|
||||
@metadata_reactor.provides(
|
||||
'users/sshmon/authorized_users'
|
||||
'users/sshmon/authorized_users',
|
||||
'sudoers/sshmon',
|
||||
)
|
||||
def user(metadata):
|
||||
return {
|
||||
|
@ -44,4 +45,11 @@ def user(metadata):
|
|||
}
|
||||
},
|
||||
},
|
||||
'sudoers': {
|
||||
'sshmon': {
|
||||
conf['vars.command']
|
||||
for conf in metadata.get('monitoring/services').values()
|
||||
if conf['check_command'] == 'sshmon'
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue