Skip to content

Checking if puppet is running... Not working. #2

@ghost

Description

[ "$(ps axf|egrep "/usr/bin/ruby /usr/sbin/puppetd|/usr/bin/ruby1.8 /usr/bin/puppet agent")" ] || result 4

Hello aswen, this above line does not work (at least not on my centos systems) I've been running this check for a long time but I just noticed that this doesnt work or I would of let you know sooner. anyways, the egrep line is always matched in the ps axf output. you could easily add egrep -v egrep but Im not a fan of multiple grep's.

I think this line, below, will cover most cases on all linux os's. If you are running puppet master on the same box you could get a false positive. I dont think unixs come with this command, but I dont think that matters since egrep probably doesnt come with them either.

anyways... the above can be changed with:

[ "$(pgrep puppet")" ] || result 4

after which checking if puppet is running should work as expected.

Once again, thanks for this plugin. It is appreciated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions