File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -108,19 +108,19 @@ def run
108
108
109
109
if config [ :use_percentage ]
110
110
message = "PostgreSQL connections at #{ percent } %, #{ current_conns } out of #{ max_conns } connections"
111
- if percent >= config [ :warning ]
112
- warning message
113
- elsif percent >= config [ :critical ]
111
+ if percent >= config [ :critical ]
114
112
critical message
113
+ elsif percent >= config [ :warning ]
114
+ warning message
115
115
else
116
116
ok "PostgreSQL connections under threshold: #{ percent } %, #{ current_conns } out of #{ max_conns } connections"
117
117
end
118
118
else
119
119
message = "PostgreSQL connections at #{ current_conns } out of #{ max_conns } connections"
120
- if current_conns >= config [ :warning ]
121
- warning message
122
- elsif current_conns >= config [ :critical ]
120
+ if current_conns >= config [ :critical ]
123
121
critical message
122
+ elsif current_conns >= config [ :warning ]
123
+ warning message
124
124
else
125
125
ok "PostgreSQL connections under threshold: #{ current_conns } out of #{ max_conns } connections"
126
126
end
You can’t perform that action at this time.
0 commit comments