Greetings,
I'm working with Galen on getting this set up correctly, and here are the problems I'm running into:
First, I've set up the site specific pages as described, i.e. I was using the "custgroup blah blah' moniker in the bb-hosts file, but have now moved to having bbgen call a stripped down version of the bb-hosts file of only the machines I want the special group to see. i.e. in hobbitlaunch.cfg
[cust-display] ENVFILE /usr/local/hobbit/server/etc/hobbitserver.cfg CMD /usr/local/hobbit/server/ext/cust-display.sh LOGFILE $HOBBITCLIENTHOME/logs/bb-display.log INTERVAL 1m
And the cust-display.sh file contains:
#!/bin/sh BBWEB="/hobbit/cust" BBHOSTS=/usr/local/hobbit/server/etc/bb-hosts-cust BBSKIN="$BBSERVERWWWURL/cust/gifs" BBMENUSKIN="$BBSERVERWWWURL/cust/menu" BBHELPSKIN="$BBSERVERWWWURL/cust/help" # Hobbit URL prefix for the online help files. BBREPURL="$BBSERVERWWWURL/cust/rep" # Hobbit URL prefix for the Hobbit availability reports BBSNAPURL="$BBSERVERWWWURL/cust/snap" # Hobbit URL prefix for the Hobbit snapshots $BBHOME/bin/bbgen --pageset=cust --template=cust $BBHOME/www/cust/
I have created cust_header/cust_footer files in the "/server/web" directory, and everything creates fine in the "http://site/hobbit/cust" web link. I have enabled apache to only allow the special users to visit the site via http://site/hobbit/cust, and not have access to /hobbit. I've also enabled them to run things in the cgi-bin script directory. This works fine for just showing them the main page with a status.
I want them to be able to run metric/snapshot reports on specific machines only. The problem is the menu options allow them to see all the servers in the environment, not just the ones in their specific bb-hosts-cust file. I've even attempted to manually create a cgi-bin directory under the /hobbit/cust location and edit each cgi sh script (adding some environ vars for the BBSERVERCGIURL etc), but to no avail.
I guess my big question is where does a script such as hobbit-hostgraphs.sh grab its list of servers to show in the choice pane? If I can restrict these scripts to only report on the servers in the bb-hosts-cust file, I believe I'll have this set up like a charm. Also, can I set up custom templates for files other than header and footer? I.e. if I want to keep the menu option when a person clicks on CPU, then the graphs_footer file which is a symlink to bb_footer gets pulled in instead of a custom graphs footer. I get the access denied to the menu due to my apache restrictions on /hobbit since it's pulling the URL "/hobbit/menu/menu.js" instead of my /hobbit/cust/menu/menu.js link
Thanks, Tom
On Thu, 2007-07-19 at 14:41 -0400, Galen Johnson wrote:
We are tryingto set up site specific pages to allow different groups to view only their specific servers (and limit the tests they see). We also want to prevent them from being able to see the menu options. This is easy for the main pages but when you drill into the monitors the menu reappears. What do we have to add/edit to prevent this behavior. I was able to accomplish this with bbgen by just duplicating the templates folder and editing each of the different header/footer combos.
TO make it so the menus disappear you can create custom headers and footers, just copy your bb_header and bb_footer to "pagename"_header and "pagename"_footer then modify as needed.
Example: in your bb_host file you have a page setup like page UNIX Unix Servers
so your files would be UNIX_header and UNIX_footer
We do this very thing, this way specific user can only see the pages they need to see. Make sure you remove the reference to the menus in the footer file
Trent
I've looked at this (and will probably use it) http://www.hswn.dk/hobbiton/2006/06/msg00184.html. However, we're a little concerned about some of the possible bleedthrough for the cgi scripts.
=G=
To unsubscribe from the hobbit list, send an e-mail to hobbit-unsubscribe (at) hswn.dk
On Thu, Jul 19, 2007 at 04:48:59PM -0400, Tom Moore wrote:
I guess my big question is where does a script such as hobbit-hostgraphs.sh grab its list of servers to show in the choice pane?
It grabs it from the Hobbit server, using the "hobbitdboard" command. Done in the lib/headfoot.c "fetch_board()" code, which is eventually used to build the "&HOSTLIST" output that is included into the hostgraphs_form output.
I hadn't thought about the need to filter the hobbitdboard output to include only the hosts included in a stripped-down version of the bb-hosts file, but it's very easy to do that.
You need to make a small code-change. In the lib/headfoot.c file there's a "fetch_board()" routine. Line 327 of that file (in the 4.2.0 version) looks like this: if (hname && wanted_host(hname)) { Change that to if (hname && wanted_host(hname) && hostinfo(hname)) { This will check that the hostname exists in the bb-hosts file, and skip data from un-defined hosts.
Regards, Henrik
Thanks Henrik, I will definitely give that a try.
As just a followup for curiousity, how would I get this new /cust site to recognize customized templates? I.e. I'm using the --template=cust option in bbgen, but that seems to only trigger the reading of the cust_header and cust_footer files. When you click on a monitor such as "CPU", the "bb-hostsvc.sh" seems to autogenerate a new page, but ignores the cust_header/cust_footer files and rather uses the hostsvc_header/hostsvc_footer files. I could modify those files specifically but I don't want to affect the main site itself.
Is there some environment variable I'm missing maybe that would tell bbgen to look for all its template files in say /server/www/cust/templates or something of that ilk?
TIA, Tom
-----Original Message----- From: Henrik Stoerner [mailto:henrik at hswn.dk] Sent: Thursday, July 19, 2007 5:09 PM To: hobbit at hswn.dk Subject: Re: [hobbit] Re: Please Help
On Thu, Jul 19, 2007 at 04:48:59PM -0400, Tom Moore wrote:
I guess my big question is where does a script such as hobbit-hostgraphs.sh grab its list of servers to show in the choice pane?
It grabs it from the Hobbit server, using the "hobbitdboard" command. Done in the lib/headfoot.c "fetch_board()" code, which is eventually used to build the "&HOSTLIST" output that is included into the hostgraphs_form output.
I hadn't thought about the need to filter the hobbitdboard output to include only the hosts included in a stripped-down version of the bb-hosts file, but it's very easy to do that.
You need to make a small code-change. In the lib/headfoot.c file there's a "fetch_board()" routine. Line 327 of that file (in the 4.2.0 version) looks like this: if (hname && wanted_host(hname)) { Change that to if (hname && wanted_host(hname) && hostinfo(hname)) { This will check that the hostname exists in the bb-hosts file, and skip data from un-defined hosts.
Regards, Henrik
To unsubscribe from the hobbit list, send an e-mail to hobbit-unsubscribe at hswn.dk
Just to follow up a bit on this as well, when I had originally set up a similar site using the BBGEN extension to big brother, I created a templates folder (just as Tom is asking) and it built the pages from this area. Did this change with Hobbit? I can see several cases where this functionality could be useful...especially for an ISP that wants to allow branded monitoring sites or even customized sites for inclusion in other internal groups pages to give a consistent look and feel for what is already there.
=G=
-----Original Message----- From: Tom Moore [mailto:Tom.Moore at sas.com] Sent: Thursday, July 19, 2007 5:39 PM To: hobbit at hswn.dk Subject: RE: [hobbit] Re: Please Help
Thanks Henrik, I will definitely give that a try.
As just a followup for curiousity, how would I get this new /cust site to recognize customized templates? I.e. I'm using the --template=cust option in bbgen, but that seems to only trigger the reading of the cust_header and cust_footer files. When you click on a monitor such as "CPU", the "bb-hostsvc.sh" seems to autogenerate a new page, but ignores the cust_header/cust_footer files and rather uses the hostsvc_header/hostsvc_footer files. I could modify those files specifically but I don't want to affect the main site itself.
Is there some environment variable I'm missing maybe that would tell bbgen to look for all its template files in say /server/www/cust/templates or something of that ilk?
TIA, Tom
-----Original Message----- From: Henrik Stoerner [mailto:henrik at hswn.dk] Sent: Thursday, July 19, 2007 5:09 PM To: hobbit at hswn.dk Subject: Re: [hobbit] Re: Please Help
On Thu, Jul 19, 2007 at 04:48:59PM -0400, Tom Moore wrote:
I guess my big question is where does a script such as hobbit-hostgraphs.sh grab its list of servers to show in the choice pane?
It grabs it from the Hobbit server, using the "hobbitdboard" command. Done in the lib/headfoot.c "fetch_board()" code, which is eventually used to build the "&HOSTLIST" output that is included into the hostgraphs_form output.
I hadn't thought about the need to filter the hobbitdboard output to include only the hosts included in a stripped-down version of the bb-hosts file, but it's very easy to do that.
You need to make a small code-change. In the lib/headfoot.c file there's a "fetch_board()" routine. Line 327 of that file (in the 4.2.0 version) looks like this: if (hname && wanted_host(hname)) { Change that to if (hname && wanted_host(hname) && hostinfo(hname)) { This will check that the hostname exists in the bb-hosts file, and skip data from un-defined hosts.
Regards, Henrik
To unsubscribe from the hobbit list, send an e-mail to hobbit-unsubscribe at hswn.dk
To unsubscribe from the hobbit list, send an e-mail to hobbit-unsubscribe at hswn.dk
Hi Henrik, I applied your patch and recompiled hobbit, but the "Metrics Report" for example still shows all of the servers in the main bb-hosts file, rather than the bb-hosts-cust file that the subpage uses to generate the /hobbit/custweb directory. (/hobbit-cgi/hobbit-hostgraphs.sh) Here's the diff: --- headfoot.c-orig 2007-07-20 09:58:48.000000000 -0400 +++ headfoot.c 2007-07-20 09:59:57.000000000 -0400 @@ -324,7 +324,7 @@ hname = gettok(buf, "|"); - if (hname && wanted_host(hname)) { + if (hname && wanted_host(hname) && hostinfo(hname)) { newrec = (treerec_t *)malloc(sizeof(treerec_t)); newrec->name = strdup(hname); newrec->flag = 0; -----Original Message----- From: Henrik Stoerner [mailto:henrik at hswn.dk] Sent: Thursday, July 19, 2007 5:09 PM To: hobbit at hswn.dk Subject: Re: [hobbit] Re: Please Help On Thu, Jul 19, 2007 at 04:48:59PM -0400, Tom Moore wrote:
I guess my big question is where does a script such as hobbit-hostgraphs.sh grab its list of servers to show in the choice pane?
It grabs it from the Hobbit server, using the "hobbitdboard" command. Done in the lib/headfoot.c "fetch_board()" code, which is eventually used to build the "&HOSTLIST" output that is included into the hostgraphs_form output. I hadn't thought about the need to filter the hobbitdboard output to include only the hosts included in a stripped-down version of the bb-hosts file, but it's very easy to do that. You need to make a small code-change. In the lib/headfoot.c file there's a "fetch_board()" routine. Line 327 of that file (in the 4.2.0 version) looks like this: if (hname && wanted_host(hname)) { Change that to if (hname && wanted_host(hname) && hostinfo(hname)) { This will check that the hostname exists in the bb-hosts file, and skip data from un-defined hosts. Regards, Henrik To unsubscribe from the hobbit list, send an e-mail to hobbit-unsubscribe at hswn.dk
Henrik, Could this be added as a feature request to 4.3.0? =G= -----Original Message----- From: Tom Moore [mailto:Tom.Moore at sas.com] Sent: Friday, July 20, 2007 10:33 AM To: hobbit at hswn.dk Subject: RE: [hobbit] Re: Please Help Hi Henrik, I applied your patch and recompiled hobbit, but the "Metrics Report" for example still shows all of the servers in the main bb-hosts file, rather than the bb-hosts-cust file that the subpage uses to generate the /hobbit/custweb directory. (/hobbit-cgi/hobbit-hostgraphs.sh) Here's the diff: --- headfoot.c-orig 2007-07-20 09:58:48.000000000 -0400 +++ headfoot.c 2007-07-20 09:59:57.000000000 -0400 @@ -324,7 +324,7 @@ hname = gettok(buf, "|"); - if (hname && wanted_host(hname)) { + if (hname && wanted_host(hname) && hostinfo(hname)) { newrec = (treerec_t *)malloc(sizeof(treerec_t)); newrec->name = strdup(hname); newrec->flag = 0; -----Original Message----- From: Henrik Stoerner [mailto:henrik at hswn.dk] Sent: Thursday, July 19, 2007 5:09 PM To: hobbit at hswn.dk Subject: Re: [hobbit] Re: Please Help On Thu, Jul 19, 2007 at 04:48:59PM -0400, Tom Moore wrote:
I guess my big question is where does a script such as hobbit-hostgraphs.sh grab its list of servers to show in the choice pane?
It grabs it from the Hobbit server, using the "hobbitdboard" command. Done in the lib/headfoot.c "fetch_board()" code, which is eventually used to build the "&HOSTLIST" output that is included into the hostgraphs_form output. I hadn't thought about the need to filter the hobbitdboard output to include only the hosts included in a stripped-down version of the bb-hosts file, but it's very easy to do that. You need to make a small code-change. In the lib/headfoot.c file there's a "fetch_board()" routine. Line 327 of that file (in the 4.2.0 version) looks like this: if (hname && wanted_host(hname)) { Change that to if (hname && wanted_host(hname) && hostinfo(hname)) { This will check that the hostname exists in the bb-hosts file, and skip data from un-defined hosts. Regards, Henrik To unsubscribe from the hobbit list, send an e-mail to hobbit-unsubscribe at hswn.dk To unsubscribe from the hobbit list, send an e-mail to hobbit-unsubscribe at hswn.dk
On Sun, Jul 22, 2007 at 10:29:20AM -0400, Galen Johnson wrote:
Henrik,
Could this be added as a feature request to 4.3.0?
It's already there. I think the problem that remains is to get the CGI's to read the stripped-down bb-hosts file instead of the main one.
But the real solution for this would be to move authentication and authorization into Hobbit, so all of the web programs know what the user is allowed to see. That, however, is a much larger change.
Regards, Henrik
Hi All/Henrik,
On the hobbit demo site, specifically: http://www.hswn.dk/hobbit/servers/servers.html
Does anyone know how to set up the vmio and raid tests that appear on voodoo? Or is this some new feature in the snapshots?
Thanks, Jason.
On Mon, Jul 23, 2007 at 11:54:31AM +0100, Jones, Jason (Altrincham) wrote:
On the hobbit demo site, specifically: http://www.hswn.dk/hobbit/servers/servers.html
Does anyone know how to set up the vmio and raid tests that appear on voodoo? Or is this some new feature in the snapshots?
"vmio" is one of the old Big Brother add-ons I grabbed off www.deadcat.net .
"raid" is based on the bb-mdstat.sh script (also from deadcat), but I seem to recall that I had to do some tweaking in order for it to work. If you want, grab it from http://www.hswn.dk/~henrik/bb-mdstat.sh
Regards, Henrik
PS: It's funny - I haven't been to deadcat for ages, but I just went over there. bbgen and bb-memory are both in the top-10 downloads - it's amazing how some software never dies :-)
Well, good software never dies :)
Thanks for the help, Jason.
-----Original Message----- From: Henrik Stoerner [mailto:henrik at hswn.dk] Sent: 23 July 2007 17:02 To: hobbit at hswn.dk Subject: Re: [hobbit] vmio + raid
On Mon, Jul 23, 2007 at 11:54:31AM +0100, Jones, Jason (Altrincham) wrote:
On the hobbit demo site, specifically: http://www.hswn.dk/hobbit/servers/servers.html
Does anyone know how to set up the vmio and raid tests that appear on voodoo? Or is this some new feature in the snapshots?
"vmio" is one of the old Big Brother add-ons I grabbed off www.deadcat.net .
"raid" is based on the bb-mdstat.sh script (also from deadcat), but I seem to recall that I had to do some tweaking in order for it to work. If you want, grab it from http://www.hswn.dk/~henrik/bb-mdstat.sh
Regards, Henrik
PS: It's funny - I haven't been to deadcat for ages, but I just went over there. bbgen and bb-memory are both in the top-10 downloads - it's amazing how some software never dies :-)
To unsubscribe from the hobbit list, send an e-mail to hobbit-unsubscribe at hswn.dk
Actually, there are some RAID monitors I haven't put up on The Shire yet. They are all similar enough I was going to try to make them more generic before I posted them.
=G=
-----Original Message----- From: Jones, Jason (Altrincham) [mailto:JasonAS_Jones at mentor.com] Sent: Monday, July 23, 2007 12:14 PM To: hobbit at hswn.dk Subject: RE: [hobbit] vmio + raid
Well, good software never dies :)
Thanks for the help, Jason.
-----Original Message----- From: Henrik Stoerner [mailto:henrik at hswn.dk] Sent: 23 July 2007 17:02 To: hobbit at hswn.dk Subject: Re: [hobbit] vmio + raid
On Mon, Jul 23, 2007 at 11:54:31AM +0100, Jones, Jason (Altrincham) wrote:
On the hobbit demo site, specifically: http://www.hswn.dk/hobbit/servers/servers.html
Does anyone know how to set up the vmio and raid tests that appear on voodoo? Or is this some new feature in the snapshots?
"vmio" is one of the old Big Brother add-ons I grabbed off www.deadcat.net .
"raid" is based on the bb-mdstat.sh script (also from deadcat), but I seem to recall that I had to do some tweaking in order for it to work. If you want, grab it from http://www.hswn.dk/~henrik/bb-mdstat.sh
Regards, Henrik
PS: It's funny - I haven't been to deadcat for ages, but I just went over there. bbgen and bb-memory are both in the top-10 downloads - it's amazing how some software never dies :-)
To unsubscribe from the hobbit list, send an e-mail to hobbit-unsubscribe at hswn.dk
To unsubscribe from the hobbit list, send an e-mail to hobbit-unsubscribe at hswn.dk
participants (4)
-
Galen.Johnson@sas.com
-
henrik@hswn.dk
-
JasonAS_Jones@mentor.com
-
Tom.Moore@sas.com