Restarting nagios from puppet on Debian

22/07/2011 at 12:26 1 comment

If you’re struggling with writing a puppet module for nagios client then here is a line you need to add to your service definition:

hasstatus  => false,

Without this puppet will try to start nrpe every time unless restarting it.

Here is the complete definition:

service { "nagios-nrpe-server":
        name       => "nagios-nrpe-server",
        ensure     => running,
        enable     => true,
        hasstatus  => false,
        pattern    => "/usr/sbin/nrpe",
        require    => Package["nagios-nrpe-server"],
        subscribe  => [Package["nagios-nrpe-server"], File["/etc/nagios/nrpe.cfg"] ],
    }

Entry filed under: Linux. Tags: , , , , .

Virtualbox ACPI Shutdown on Ubuntu Lucid Lynx debian-sa1 fails after update

1 Comment Add your own

  • 1. Petre  |  04/08/2011 at 14:01

    Same solution for syslog-ng

    Reply

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Trackback this post  |  Subscribe to the comments via RSS Feed


 

July 2011
M T W T F S S
« Feb   Nov »
 123
45678910
11121314151617
18192021222324
25262728293031

Follow

Get every new post delivered to your Inbox.

Join 31 other followers