Skip to content
This repository
Browse code

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

  • Loading branch information...
commit 5e1e29a810fd7dd29952b518916a70fced60b12c 2 parents 38666ed + 2643b52
Sébastien Coavoux authored October 03, 2012
6  etc/shinken-specific.cfg
@@ -394,13 +394,15 @@ define module {
394 394
     module_name     Graphite-Perfdata
395 395
     module_type     graphite_perfdata
396 396
     host            localhost
397  
-    port            2003
  397
+    port            2003  ; Or 2004 if using use_pickle 1
398 398
     # Optionally specify a source identifier for the metric data sent to
399 399
     # Graphite. This can help differentiate data from multiple sources for the
400 400
     # same hosts. HostA.GRAPHITE_DATA_SOURCE.service
401 401
     # You MUST set the same value in the graphite_perfdata and GRAPHITE_UI module
402 402
     # configuration.
403  
-    #graphite_data_source    shinken
  403
+    #use_pickle 1 ; default value is 0, 1 for pickled data
  404
+    #tick_limit 300 ; Default value 300
  405
+    #graphite_data_source shinken ; default is that the variable is unset
404 406
 }
405 407
 
406 408
 ## Module:      GRAPHITE_UI
4  shinken/objects/item.py
@@ -1017,6 +1017,7 @@ def evaluate_hostgroup_expression(self, expr, hosts, hostgroups, look_in='hostgr
1017 1017
         for gn, val in groupsname2hostsnames.items():
1018 1018
             gn = gn.replace('-', HostGroup_Name_Parse_Ctx.minus_sign_in_name)
1019 1019
             gn = gn.replace('print', HostGroup_Name_Parse_Ctx.print_in_name)
  1020
+            gn = gn.replace('.', HostGroup_Name_Parse_Ctx.dot_in_name)
1020 1021
             gn = gn.replace(' ', HostGroup_Name_Parse_Ctx.space_in_name)
1021 1022
             newgroupname2hostnames[gn] = val
1022 1023
 
@@ -1089,6 +1090,7 @@ class HostGroup_Name_Parse_Ctx(object):
1089 1090
     catch_all_name = "__ALLELEMENTS__"
1090 1091
     minus_sign_in_name = "__MINUSSIGN_IN_NAME__"
1091 1092
     print_in_name = "__PRINT_IN_NAME__"
  1093
+    dot_in_name = "__DOT_IN_NAME__"
1092 1094
     space_in_name = '__SPACE_IN_NAME__'
1093 1095
 
1094 1096
     # flags:
@@ -1419,6 +1421,8 @@ def hg_name_rebuild_str(parse_res):
1419 1421
             parse_res = HostGroup_Name_Parse_Ctx.catch_all_name
1420 1422
         if 'print' in parse_res:
1421 1423
             parse_res = parse_res.replace('print', HostGroup_Name_Parse_Ctx.print_in_name)
  1424
+        if '.' in parse_res:
  1425
+            parse_res = parse_res.replace('.', HostGroup_Name_Parse_Ctx.dot_in_name)
1422 1426
         if ' ' in parse_res:
1423 1427
             parse_res = parse_res.replace(' ', HostGroup_Name_Parse_Ctx.space_in_name)
1424 1428
         return parse_res
6  test/etc/hostgroup_with_space/hostgroups.cfg
@@ -72,3 +72,9 @@ define hostgroup {
72 72
     hostgroup_name          And Another One
73 73
     members                 test_router_0,test_host_0
74 74
 }
  75
+
  76
+
  77
+define hostgroup {
  78
+    hostgroup_name          With a dot . here
  79
+    members                 test_router_0,test_host_0
  80
+}
19  test/etc/hostgroup_with_space/services.cfg
@@ -81,3 +81,22 @@ define service{
81 81
   action_url                     /nagios/pnp/index.php?host=$HOSTNAME$&srv=$SERVICEDESC$
82 82
   _custname                      custvalue
83 83
 }
  84
+
  85
+
  86
+define service{
  87
+  active_checks_enabled          1
  88
+  check_command                  check_service!ok
  89
+  check_interval                 1
  90
+  hostgroups                     With a dot . here&And Another One
  91
+  icon_image                     ../../docs/images/tip.gif?host=$HOSTNAME$&srv=$SERVICEDESC$
  92
+  icon_image_alt                 icon alt string
  93
+  notes                          just a notes string
  94
+  retry_interval                 1
  95
+  service_description            test_With dot
  96
+  servicegroups                  servicegroup_01,ok
  97
+  use                            generic-service
  98
+  event_handler                  eventhandler
  99
+  notes_url                      /nagios/wiki/doku.php/$HOSTNAME$/$SERVICEDESC$
  100
+  action_url                     /nagios/pnp/index.php?host=$HOSTNAME$&srv=$SERVICEDESC$
  101
+  _custname                      custvalue
  102
+}

0 notes on commit 5e1e29a

Please sign in to comment.
Something went wrong with that request. Please try again.