Module: check_mk
Branch: master
Commit: b288ad45d5a64fa3f21777717e624b3cc1a86c71
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=b288ad45d5a64f…
Author: Goetz Golla <gg(a)mathias-kettner.de>
Date: Fri Jan 9 15:20:24 2015 +0100
netscaler_ha: modified the way state is calculated
---
checkman/netscaler_ha | 6 +++---
checks/netscaler_ha | 17 ++++-------------
2 files changed, 7 insertions(+), 16 deletions(-)
diff --git a/checkman/netscaler_ha b/checkman/netscaler_ha
index f07a9d0..e973319 100644
--- a/checkman/netscaler_ha
+++ b/checkman/netscaler_ha
@@ -12,9 +12,9 @@ description:
The check is in the state OK when the system is not setup for ha, or
{haCurState} is up/funtional. It is in the state WARN when the system is
manually configured not to participate in a HA cluster, or initializing to
- become a cluster member, or when {haCurState} is {monitorFAIL} or {monitorOK},
- because these two states are not documented in the MIB. It is critical in
- other states {haCurState} can be.
+ become a cluster member, or when {haCurState} is {monitorFAIL}, {monitorOK},
+ or {unkown} because these states are not documented in the MIB. It is
+ critical in other states {haCurState} can be.
inventory:
One service per host will be created.
diff --git a/checks/netscaler_ha b/checks/netscaler_ha
index 927cba4..dfb47fe 100644
--- a/checks/netscaler_ha
+++ b/checks/netscaler_ha
@@ -30,7 +30,7 @@
# .1.3.6.1.4.1.5951.4.1.1.23.24.0 3
netscaler_ha_cur_states = {
- 0: ("unknown", 3),
+ 0: ("unknown", 1),
1: ("initializing", 1), # Indicates that the node is in the process of becoming part of the high
# availability configuration.
2: ("down", 2), # undocumented
@@ -75,19 +75,10 @@ def check_netscaler_ha(_no_item, _no_params, info):
if cur_status == 0:
infotext = "System not setup for HA"
else:
- infotext = "Mode: %s, State: %s" % ( netscaler_ha_peer_mode.get(peer_state)[0],
- netscaler_ha_cur_states.get(cur_state)[0],
+ infotext = "Mode: %s, State: %s" % ( netscaler_ha_peer_mode[peer_state][0],
+ netscaler_ha_cur_states[cur_state][0],
)
- # severity: 2, 1, 3, 0, the worst one wins
- if netscaler_ha_cur_states.get(cur_state)[1] == 2 or \
- netscaler_ha_cur_states.get(cur_state)[1] == 2:
- state = 2
- elif netscaler_ha_cur_states.get(cur_state)[1] == 1 or \
- netscaler_ha_cur_states.get(cur_state)[1] == 1:
- state = 1
- elif netscaler_ha_cur_states.get(cur_state)[1] == 3 or \
- netscaler_ha_cur_states.get(cur_state)[1] == 3:
- state = 3
+ state = max(netscaler_ha_cur_states[cur_state][1], netscaler_ha_peer_mode[peer_state)[1])
return state, infotext
Module: check_mk
Branch: master
Commit: e6a8c5aebf49ad4630e51baebf2bad792764b995
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=e6a8c5aebf49ad…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Fri Jan 9 15:10:39 2015 +0100
#1806 FIX services check was not recognizing configured state when no service was found
---
.werks/1806 | 10 ++++++++++
ChangeLog | 1 +
checks/services | 5 ++---
3 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/.werks/1806 b/.werks/1806
new file mode 100644
index 0000000..64bfeaa
--- /dev/null
+++ b/.werks/1806
@@ -0,0 +1,10 @@
+Title: services check was not recognizing configured state when no service was found
+Level: 1
+Component: checks
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.7i1
+Date: 1420812618
+
+
diff --git a/ChangeLog b/ChangeLog
index 6572cb7..e0fa59f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -53,6 +53,7 @@
NOTE: Please refer to the migration notes!
* 1833 FIX: jolokia_metrics.gc: fix recently introduced exception for missing variable
* 1463 FIX: juniper_screenos_mem, juniper_trpz_mem: pnp template fixed
+ * 1806 FIX: services check was not recognizing configured state when no service was found
Multisite:
* 1758 Improved exception hander: Shows details without additional debug request, added mailto link for error report...
diff --git a/checks/services b/checks/services
index 4ffaaf7..49d72a9 100644
--- a/checks/services
+++ b/checks/services
@@ -198,9 +198,8 @@ def check_windows_services(item, params, info):
start_type = "unknown"
found.append((line[0], state, start_type, " ".join(line[3:])))
- if len(found) == 0:
- return (3, "service not found")
-
+ if not found:
+ return params["else"], "service not found"
# We take the best found state (neccessary for clusters)
best_state = None
Module: check_mk
Branch: master
Commit: 98dc50cb42b7175b40152c9729438f94ec92aef3
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=98dc50cb42b717…
Author: Goetz Golla <gg(a)mathias-kettner.de>
Date: Fri Jan 9 14:31:57 2015 +0100
minor wording fix
---
checkman/domino_users | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/checkman/domino_users b/checkman/domino_users
index 84f1c95..8d727f7 100644
--- a/checkman/domino_users
+++ b/checkman/domino_users
@@ -11,7 +11,7 @@ perfdata:
The number of users
inventory:
- One check per Lotus Domino Server is created.
+ One service is created per Lotus Domino Server.
[parameters]
parameters(tuple): parameters is a tuple of two values
Module: check_mk
Branch: master
Commit: 8959734e45179e4287ebd5ee442fdc82d30e437d
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=8959734e45179e…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Fri Jan 9 14:10:16 2015 +0100
#1805 FIX Changing roles marks sites where users can login dirty for sync now
Previously a change to the roles did not result in a pending change for remote
sites in a distributed WATO setup. To have these changes synchronized one needed
to make another change to mark the sites dirty and make the sync possible.
This has been changed now. Each site can now be configured to make "user logins
to Web GUI possible", which is enabled by default. Those sites will be marked as
dirty now which will make the admin able to trigger a synchronisation right
after modifying a role.
---
.werks/1805 | 17 +++++++++++++++++
ChangeLog | 1 +
web/htdocs/wato.py | 20 +++++++++++++++++---
3 files changed, 35 insertions(+), 3 deletions(-)
diff --git a/.werks/1805 b/.werks/1805
new file mode 100644
index 0000000..e82d289
--- /dev/null
+++ b/.werks/1805
@@ -0,0 +1,17 @@
+Title: Changing roles marks sites where users can login dirty for sync now
+Level: 1
+Component: wato
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.7i1
+Date: 1420808847
+
+Previously a change to the roles did not result in a pending change for remote
+sites in a distributed WATO setup. To have these changes synchronized one needed
+to make another change to mark the sites dirty and make the sync possible.
+
+This has been changed now. Each site can now be configured to make "user logins
+to Web GUI possible", which is enabled by default. Those sites will be marked as
+dirty now which will make the admin able to trigger a synchronisation right
+after modifying a role.
diff --git a/ChangeLog b/ChangeLog
index e78e400..6353871 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -80,6 +80,7 @@
* 1789 FIX: Fix preview of passive checks in WATO list of services
* 1790 FIX: Fix WATO parameters page for passive checks...
* 1794 FIX: Fix exception in WATO service list in case of vanished checks
+ * 1805 FIX: Changing roles marks sites where users can login dirty for sync now...
Notifications:
* 1662 notification plugin spectrum: finalized script. now able to handle host notications
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index 2609339..4a2163f 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -10524,6 +10524,12 @@ def mode_edit_site(phase):
html.help( _('This might be needed to make the synchronization accept problems with '
'SSL certificates when using an SSL secured connection.'))
+ forms.section(_('Direct login to Web GUI allowed'), simple=True)
+ html.checkbox('user_login', site.get('user_login', True),
+ label = _('Users are allowed to directly login into the Web GUI of this site'))
+ html.help(_('When enabled, this site is marked for synchronisation every time a Web GUI '
+ 'related option is changed in the master site.'))
+
forms.end()
html.button("save", _("Save"))
@@ -10886,6 +10892,11 @@ def update_replication_status(site_id, vars, times = {}):
save_replication_status(repstatus)
os.close(fd)
+def update_login_sites_replication_status():
+ for siteid, site in config.sites.items():
+ if site.get('user_login', True) and not site_is_local(siteid):
+ update_replication_status(siteid, {'need_sync': True})
+
def global_replication_state():
repstatus = load_replication_status()
some_dirty = False
@@ -12357,7 +12368,8 @@ def mode_roles(phase):
rename_user_role(delid, None) # Remove from existing users
del roles[delid]
save_roles(roles)
- log_pending(False, None, "edit-roles", _("Deleted role '%s'" % delid))
+ update_login_sites_replication_status()
+ log_pending(AFFECTED, None, "edit-roles", _("Deleted role '%s'" % delid))
elif c == False:
return ""
elif html.var("_clone"):
@@ -12374,7 +12386,8 @@ def mode_roles(phase):
new_role["basedon"] = cloneid
roles[newid] = new_role
save_roles(roles)
- log_pending(False, None, "edit-roles", _("Created new role '%s'" % newid))
+ update_login_sites_replication_status()
+ log_pending(AFFECTED, None, "edit-roles", _("Created new role '%s'" % newid))
return
table.begin("roles")
@@ -12484,7 +12497,8 @@ def mode_edit_role(phase):
rename_user_role(id, new_id)
save_roles(roles)
- log_pending(False, None, "edit-roles", _("Modified user role '%s'" % new_id))
+ update_login_sites_replication_status()
+ log_pending(AFFECTED, None, "edit-roles", _("Modified user role '%s'" % new_id))
return "roles"
html.begin_form("role", method="POST")