Thanks felix,
I'm trying to do a validator for monit module.
I'm pretending down services are not controlled by monit, avoiding false
alarm from monit service.
I was work around with something like :
class monit($services) {
include monit::checkservice,
monit::snippet
monit::checkservice::checksrv{ $::monit::services : }
------
class monit::checkservice {
define checksrv {
notify { "Checking service $name":}
service { $name:
noop => true,
hasstatus => false,
status => "/usr/local/bin/check_service.sh ${name}",
}
}
}
where $services is array of services from ENC.
But it have been unsuccessfully. I can see notifies messages foreach
element from array but status script is not executed like i expected
foreach item.
regards, eduardo.
El sábado, 23 de febrero de 2013 12:33:51 UTC-5, eduardo escribió:
>
> Hi all.
> I'm working on monit module. I have an array of services to configure
> monit via ENC.
> I need a consistent module logic so services arriving as input parameter
> must running on node agent.
>
> I'm trying to find out if there is services running to configure monit
> snippets.
> So, The snippet will be only written into /etc/monit/conf.d when service
> is running.
>
> Let's say an input parameter like :
>
> services => ['ntp','ssh']
>
> But ntp service is not running. In that case I need the snippet for 'ntp'
> service not be written on conf.d
>
> Is there simple way to do it ?.
>
>
> Thanks in advanced, eduardo.
>
>
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.