Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge branch 'master' of https://github.com/naparuba/shinken

  • Loading branch information...
commit 5e1e29a810fd7dd29952b518916a70fced60b12c 2 parents 38666ed + 2643b52
@Seb-Solon Seb-Solon authored
View
6 etc/shinken-specific.cfg
@@ -394,13 +394,15 @@ define module {
module_name Graphite-Perfdata
module_type graphite_perfdata
host localhost
- port 2003
+ port 2003 ; Or 2004 if using use_pickle 1
# Optionally specify a source identifier for the metric data sent to
# Graphite. This can help differentiate data from multiple sources for the
# same hosts. HostA.GRAPHITE_DATA_SOURCE.service
# You MUST set the same value in the graphite_perfdata and GRAPHITE_UI module
# configuration.
- #graphite_data_source shinken
+ #use_pickle 1 ; default value is 0, 1 for pickled data
+ #tick_limit 300 ; Default value 300
+ #graphite_data_source shinken ; default is that the variable is unset
}
## Module: GRAPHITE_UI
View
4 shinken/objects/item.py
@@ -1017,6 +1017,7 @@ def evaluate_hostgroup_expression(self, expr, hosts, hostgroups, look_in='hostgr
for gn, val in groupsname2hostsnames.items():
gn = gn.replace('-', HostGroup_Name_Parse_Ctx.minus_sign_in_name)
gn = gn.replace('print', HostGroup_Name_Parse_Ctx.print_in_name)
+ gn = gn.replace('.', HostGroup_Name_Parse_Ctx.dot_in_name)
gn = gn.replace(' ', HostGroup_Name_Parse_Ctx.space_in_name)
newgroupname2hostnames[gn] = val
@@ -1089,6 +1090,7 @@ class HostGroup_Name_Parse_Ctx(object):
catch_all_name = "__ALLELEMENTS__"
minus_sign_in_name = "__MINUSSIGN_IN_NAME__"
print_in_name = "__PRINT_IN_NAME__"
+ dot_in_name = "__DOT_IN_NAME__"
space_in_name = '__SPACE_IN_NAME__'
# flags:
@@ -1419,6 +1421,8 @@ def hg_name_rebuild_str(parse_res):
parse_res = HostGroup_Name_Parse_Ctx.catch_all_name
if 'print' in parse_res:
parse_res = parse_res.replace('print', HostGroup_Name_Parse_Ctx.print_in_name)
+ if '.' in parse_res:
+ parse_res = parse_res.replace('.', HostGroup_Name_Parse_Ctx.dot_in_name)
if ' ' in parse_res:
parse_res = parse_res.replace(' ', HostGroup_Name_Parse_Ctx.space_in_name)
return parse_res
View
6 test/etc/hostgroup_with_space/hostgroups.cfg
@@ -72,3 +72,9 @@ define hostgroup {
hostgroup_name And Another One
members test_router_0,test_host_0
}
+
+
+define hostgroup {
+ hostgroup_name With a dot . here
+ members test_router_0,test_host_0
+}
View
19 test/etc/hostgroup_with_space/services.cfg
@@ -81,3 +81,22 @@ define service{
action_url /nagios/pnp/index.php?host=$HOSTNAME$&srv=$SERVICEDESC$
_custname custvalue
}
+
+
+define service{
+ active_checks_enabled 1
+ check_command check_service!ok
+ check_interval 1
+ hostgroups With a dot . here&And Another One
+ icon_image ../../docs/images/tip.gif?host=$HOSTNAME$&srv=$SERVICEDESC$
+ icon_image_alt icon alt string
+ notes just a notes string
+ retry_interval 1
+ service_description test_With dot
+ servicegroups servicegroup_01,ok
+ use generic-service
+ event_handler eventhandler
+ notes_url /nagios/wiki/doku.php/$HOSTNAME$/$SERVICEDESC$
+ action_url /nagios/pnp/index.php?host=$HOSTNAME$&srv=$SERVICEDESC$
+ _custname custvalue
+}
Please sign in to comment.
Something went wrong with that request. Please try again.