Projet

Général

Profil

Révision eda5c9b4

IDeda5c9b4b4a83c47d83b3e66e6592ab809df6b96
Parent e4e5d363
Enfant c4d7d834

Ajouté par Kael Shipman il y a environ 7 ans

Implemented minor changes as suggested by maintainer

Voir les différences:

plugins/systemd/systemd_units
21 21
     env.failed_critical 5
22 22
     env.inactive_warning 10
23 23
     env.inactive_critical 20
24
     
25
Note that for failed units, default warning and critical values are set to 0 and 10, respectively. No other
26
states have default levels set.
24 27

  
25 28
=head1 AUTHOR
26 29

  
......
39 42

  
40 43
. "$MUNIN_LIBDIR/plugins/plugin.sh"
41 44

  
45
failed_warning="${failed_warning:-0}"
46
failed_critical="${failed_critical:-10}"
47

  
42 48
states="active \
43 49
	reloading \
44 50
	inactive \
......
61 67
	for state in $states; do
62 68
		echo "$state.label $state"
63 69
		echo "$state.draw AREASTACK"
64
		# Set default alert levels for failed units
65
		if [ "$state" = "failed" ]; then
66
			failed_warning="${failed_warning:-0}" print_warning $state
67
			failed_critical="${failed_critical:-10}" print_critical $state
68
		else
69
			print_warning $state
70
			print_critical $state
71
		fi
70
		print_warning $state
71
		print_critical $state
72 72
	done
73 73
}
74 74

  

Formats disponibles : Unified diff