Skip to content

Commit

Permalink
Merge pull request #223 from RincewindsHat/add_icinga2_config
Browse files Browse the repository at this point in the history
Add icinga2 example config
  • Loading branch information
liske authored Jan 27, 2022
2 parents f1fe75d + 84e56f1 commit 9a44b1d
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
17 changes: 17 additions & 0 deletions ex/icinga2/command.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
object CheckCommand "needrestart" {
command = [ "/usr/sbin/needrestart", "-p" ]
arguments = {
"-k" = {
description = "check for obsolete kernel"
set_if = "$needrestart_kernel$"
}
"-l" = {
description = "check for obsolete libraries"
set_if = "$needrestart_libraries$"
}
"-w" = {
description = "check for obsolete CPU microcode"
set_if = "$needrestart_microcode$"
}
}
}
10 changes: 10 additions & 0 deletions ex/icinga2/needrestart-sudoers
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# needrestart nagios plugin sudoers.d config file
# -----------------------------------------------
#
# Please consider a look at /etc/sudoers.d/README howto enable this file.
#

# Allow nagios to execute the needrestart command on debian based systems (icinga user is called "nagios")
nagios ALL=NOPASSWD: /usr/sbin/needrestart
# Allow nagios to execute the needrestart command on centos and family (icinga user is called "icinga")
icinga ALL=NOPASSWD: /usr/sbin/needrestart

0 comments on commit 9a44b1d

Please sign in to comment.