Subversion Repositories vnag

Rev

Rev 80 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
80 daniel-mar 1
// Put this file in /etc/icinga2/conf.d/...
2
 
3
// VNag - Nagios Framework for PHP
4
// Developed by Daniel Marschall, ViaThinkSoft <www.viathinksoft.com>
5
// Licensed under the terms of the Apache 2.0 license
6
//
7
// Revision 2023-10-14
8
 
9
// ATTENTION!
10
// To make this work, you need to add following to /etc/sudoers (adjust the paths)
11
//     nagios ALL=(root) NOPASSWD:/daten/vnag/bin/hp_smartarray.phar
12
// You MUST make sure that the script check_hp_smartarray and all other VNag scripts are
13
// owned by root, otherwise the owner could change the code, and it would be executed with
14
// root privileges!
15
 
16
object CheckCommand "vnag_hp_smartarray" {
17
	command = [
18
		"/usr/bin/sudo",
19
 
20
		// PLEASE ADJUST THIS PATH
21
		"/daten/vnag/bin/hp_smartarray.phar"
22
	]
23
 
24
	arguments = {
25
		"-s" = {
26
			value = "$vnag_hp_smartarray_slot$"
27
			description = "The slot where the HP Smart Array RAID controller is installed"
28
			required = true
29
		}
30
	}
31
}
32
 
33
// Example usage:
34
//
35
// apply Service "example_hp_smartarray_slot3" {
36
//	import "generic-service"
37
//	check_command = "vnag_hp_smartarray"
38
//	check_interval = 15m
39
//	vars = {
40
//		vnag_hp_smartarray_slot = 3
41
//	}
42
//	assign where host.name == NodeName
43
// }