[op5-users] Service description in webconfig. Monitor 4.1.4

Kåkneryd, Daniel Daniel.Kakneryd at bossmedia.se
Fri Apr 17 16:48:07 CEST 2009


Hi,

 

Updated one of my Op5 servers with the newest software, including Op5 Monitor 4.1.4.

After the update I couldn't change any of my services ("Illegal characters in service_description"), after some code-reading I found a change in /opt/monitor/op5/webconfig/classes/service_class.php that caused the problem, a regexp that didn't take underscore character ("_") in service_description, is there any reason why it shouldn't? Will it break something? Shouldn't the webconfig read from nagios.cfg to get illegal_object_name_chars instead of having regexp everywhere in the .php-files?

 

 

Solved my problem by adding underscore to the regexp in service_class.php.

 

# diff service_class.php service_class.php.old 

105c105

<                       if (!preg_match("/^[ a-zA-Z0-9_#\/\\:@\[\]{}-]+$/", $this->obj['service_description'])) {

---

>                       if (!preg_match("/^[ a-zA-Z0-9#\/\\:@\[\]{}-]+$/", $this->obj['service_description'])) {

 

 

 

 

 

Daniel Kåkneryd
System Technician

Phone:
Mobile:
Fax:
E-Mail:
Web: 

+46 470 705706
+46 734 350773
+46 470 703050
daniel.kakneryd at bossmedia.se <mailto:daniel.kakneryd at bossmedia.se> 
www.bossmedia.com <http://www.bossmedia.com/> 

Boss Media AB
Honnörsgatan 2
 Box 3243
SE-350 53 Växjö
SWEDEN

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.op5.com/pipermail/op5-users/attachments/20090417/3d01478d/attachment.html 


More information about the op5-users mailing list