[Nagios-devel] Hostgroup Hiding
Posted: Fri Oct 27, 2006 2:54 am
Hello,I am trying to develop a patch that hel=
ps me to hide certain hostgroups from the status cgi. I thought of somethin=
g like adding a "shouldnotseeme-" prefix to the hostgroup alias:def=
ine hostgroup { hostgroup=5Fn=
ame shown alias &n=
bsp;  =
; This Host Group will be displayed =
members &=
nbsp; host1,host2,host3 =
}define hostgroup {
hostgroup=5Fname not-shown=
alias &nb=
sp; =
shouldnotseeme-This Host Group will not be displayed
members &=
nbsp; host3,host4,host5
}
First of all I must admit I am no C programmer. I had a look=
at the status.c source file. Around line 3090 I found a procedure show=5Fh=
ostgroup=5Foverview. Now I'd like to simply check there if hstgrp->alias=
contains the string "shouldnotseeme-"Unfortunally I do not know how to=
do this. With PHP I think it would look like this: =
if (strstr($hstgrp->alias, "shouldnotseeme-") !=3D FALSE)&nbs=
p; { // don't show thi=
s one .. }But I have no idea how to write this in C
Can someone point me in =
the right direction. Do you think this will work at all? Gruess=
e - Best regardsDaniel TuecksSystem En=
gineerConsulting ServicesComputacenter AG & =
;Co. oHGKokkolastrasse 1, 40882 Ratingen, Germ=
anyPhone: +49 (0)2102 169-0, Fax: +49 (0)=
2102 169-1144, Mobil: +49 (0)172 984 98 =
77Email: daniel=
.[email protected] us on the Intern=
et: http://www.computacenter.deVisit our On=
line-Shop: http://www.computacenter.de/connectThis email is confidential. If you are&n=
bsp;not the intended recipient,you must not&nb=
sp;disclose or use the information contained =
in it.If you have received this mail =
;in error, please tell usimmediately by r=
eturn email and delete the document.=
This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]
ps me to hide certain hostgroups from the status cgi. I thought of somethin=
g like adding a "shouldnotseeme-" prefix to the hostgroup alias:def=
ine hostgroup { hostgroup=5Fn=
ame shown alias &n=
bsp;  =
; This Host Group will be displayed =
members &=
nbsp; host1,host2,host3 =
}define hostgroup {
hostgroup=5Fname not-shown=
alias &nb=
sp; =
shouldnotseeme-This Host Group will not be displayed
members &=
nbsp; host3,host4,host5
}
First of all I must admit I am no C programmer. I had a look=
at the status.c source file. Around line 3090 I found a procedure show=5Fh=
ostgroup=5Foverview. Now I'd like to simply check there if hstgrp->alias=
contains the string "shouldnotseeme-"Unfortunally I do not know how to=
do this. With PHP I think it would look like this: =
if (strstr($hstgrp->alias, "shouldnotseeme-") !=3D FALSE)&nbs=
p; { // don't show thi=
s one .. }But I have no idea how to write this in C
the right direction. Do you think this will work at all? Gruess=
e - Best regardsDaniel TuecksSystem En=
gineerConsulting ServicesComputacenter AG & =
;Co. oHGKokkolastrasse 1, 40882 Ratingen, Germ=
anyPhone: +49 (0)2102 169-0, Fax: +49 (0)=
2102 169-1144, Mobil: +49 (0)172 984 98 =
77Email: daniel=
.[email protected] us on the Intern=
et: http://www.computacenter.deVisit our On=
line-Shop: http://www.computacenter.de/connectThis email is confidential. If you are&n=
bsp;not the intended recipient,you must not&nb=
sp;disclose or use the information contained =
in it.If you have received this mail =
;in error, please tell usimmediately by r=
eturn email and delete the document.=
This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]