Nagios and www-data users.

252 views
Skip to first unread message

Douglas Garstang

unread,
Sep 5, 2012, 12:33:03 PM9/5/12
to Puppet Users
I'm sure people have hit this problem before. In my nagios module, the
nagios command pipe file at /var/lib/nagios3/rw/nagios.cmd is owned by
the nagios user, but needs to be written to by the www-data user.
Adding the www-user to the nagios group is one solution, but that
requires that the nagios module potentially modify the www-data user,
which seems bad.

What's the best way to do this? I tried to explicitly define the
www-data user in it's own class, and then create another nagios class
that inherits from that so that I could do plusignment, but I
obviously have the syntax wrong. Puppet doesn't like this.

class nagios::users inherits users::www-data {
User['www-data'] { group +> ['nagios'] }
}

Doug

Darin Perusich

unread,
Sep 5, 2012, 4:00:13 PM9/5/12
to puppet...@googlegroups.com
There should be a "nagcmd" group which both nagios and your apache
user are members of. The nagios.cmd pipe should have permission of
0660 and ownership of nagios:nagcmd. If you were using check_mk
livestatus then the livestatus.cmd socket would have the same perms
and ownership.

Usually this is taken care of by the nagios packages.

--
Later,
Darin
> --
> You received this message because you are subscribed to the Google Groups "Puppet Users" group.
> To post to this group, send email to puppet...@googlegroups.com.
> To unsubscribe from this group, send email to puppet-users...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
>
Reply all
Reply to author
Forward
0 new messages