addon: os and critical icon
list Flyzone Micky
Hi, i have made some edit on the hobbit-sources.
When working in a enterprise, i found useful to see also two icons next the hostname: os and critical.
Os could be windows,linux,aix,etc....and critical usually is gold|silver|bronze.
I used the DESCR options in bb-hosts (DESCR:os:critical), hobbit will search for icons with the same
name adding ".gif" in ~hobbit/server/www/.
If someone needs the gifs just email me.
Maybe will be nice to add it as a new feature in hobbit5.0.
For who wants the same here what to do:
at line 382 of pagegen.c (~hobbit-4.2.0/bbdisplay) BEFORE:
fprintf(output, "%s",
hostnamehtml(h->hostname, ((pagetype != PAGE_BB) ? hostpage_link(h) : NULL)) );
put these lines:
int count=0;
int i=0;
int j=0;
if (pagepath) {
for (i=0; i<strlen(pagepath); i++){
if (pagepath[i]=='/') { count++; }
}
if (count!=0){
count=count/2;
for (j=0; j<count; j++){
strcat(urlimg,"../");
}
}
}
if (h->description) {
char * os_name="";
char * critical="";
char testo2[40]="";
char testo3[40]="";
strcat(testo3,h->description);
strcat(testo2,h->description);
critical=strchr(testo2,':');
if (critical){
*critical=0;
critical++;
}
os_name=strchr(testo3,':');
if (os_name){
*os_name=0;
}
os_name=testo3;
if (os_name) {
fprintf(output, "%s%s.gif\" HEIGHT=\"26\" WIDTH=\"26\" ALIGN=\"middle\"> ",urlimg,os_name);
}
if (critical) {
fprintf(output, "%s%s.gif\" HEIGHT=\"26\" WIDTH=\"26\" ALIGN=\"middle\"> ",urlimg,critical);
}
}
--
We've Got Your Name at http://www.mail.com !
Get a FREE E-mail Account Today - Choose From 100+ Domains
list Scott Walters
▸
On 8/9/07, Flyzone Micky <user-4df7b21ff8e1@xymon.invalid> wrote:
Hi, i have made some edit on the hobbit-sources. When working in a enterprise, i found useful to see also two icons next the hostname: os and critical.
Os could be windows,linux,aix,etc....I can vouch for the usefulness of an OS icon in the display. 1) For many sites, there are Windows and Unix admins. This helps them know immediately to "call for help" or to try and login themselves. 2) Saw an issue that only affected RedHat Linux servers, but I did not realize for a couple of weeks. Once the OS icon feature went in, the scope of the issue to RedHat was obvious. I am thinking the OS might be known from the client, rather than having to define it on the server. But a manual configuration would be nice, for devices that might be monitored, but without clients. Scott Walters -PacketPusher
list Scott Walters
On 8/9/07, Flyzone Micky <user-4df7b21ff8e1@xymon.invalid> wrote:
Hi, i have made some edit on the hobbit-sources. When working in a enterprise, i found useful to see also two icons next the hostname: os and critical. Os could be windows,linux,aix,etc....
I can vouch for the usefulness of an OS icon in the display. 1) For many sites, there are Windows and Unix admins. This helps them know immediately to "call for help" or to try and login themselves. 2) Saw an issue that only affected RedHat Linux servers, but I did not realize for a couple of weeks. Once the OS icon feature went in, the scope of the issue to RedHat was obvious. I am thinking the OS might be known from the client, rather than having to define it on the server. But a manual configuration would be nice, for devices that might be monitored, but without clients. Scott Walters -PacketPusher
list Dave Haertig
It's not an icon, but the "info" screen tells you the OS. I assume this is just the version of the client that was compiled and installed. You can also use the DESCR directive in the bb-hosts file to add a description to the info screen. You could also use the NAME directive to add an OS indication to the display line. -----Original Message----- From: user-7796849e4635@xymon.invalid [mailto:user-7796849e4635@xymon.invalid] On Behalf Of Scott Walters Sent: Sunday, August 19, 2007 5:52 PM To: user-ae9b8668bcde@xymon.invalid Subject: Fwd: [hobbit] addon: os and critical icon
▸
On 8/9/07, Flyzone Micky <user-4df7b21ff8e1@xymon.invalid> wrote:Hi, i have made some edit on the hobbit-sources. When working in a enterprise, i found useful to see also two icons next the hostname: os and critical. Os could be windows,linux,aix,etc....
I can vouch for the usefulness of an OS icon in the display. 1) For many sites, there are Windows and Unix admins. This helps them know immediately to "call for help" or to try and login themselves. 2) Saw an issue that only affected RedHat Linux servers, but I did not realize for a couple of weeks. Once the OS icon feature went in, the scope of the issue to RedHat was obvious. I am thinking the OS might be known from the client, rather than having to define it on the server. But a manual configuration would be nice, for devices that might be monitored, but without clients. Scott Walters -PacketPusher
list T.J. Yang
I am in the process of writing an hb server side add-on script (learn from rootlogin.pl) to do OS counting. Ie, adapting "rootlogin" perl script do some OS counting from incoming bb messages stream. hoping to get a page that can list out OS versions and subtotals of different OS that hobbit server currently monitored. There is no ETA for oscount.pl, it could be faster if my management push for it ;) ps: I think ntop has some OS icons for hb community to reuse, if we really want to implement OS icons, I might need OS icons for my oscount.pl project T.J. Yang
▸
From: "Haertig, David F (Dave)" <user-68874b735d77@xymon.invalid> Reply-To: user-ae9b8668bcde@xymon.invalid To: <user-ae9b8668bcde@xymon.invalid> Subject: RE: [hobbit] addon: os and critical icon Date: Sun, 19 Aug 2007 18:15:17 -0600 It's not an icon, but the "info" screen tells you the OS. I assume this is just the version of the client that was compiled and installed. You can also use the DESCR directive in the bb-hosts file to add a description to the info screen. You could also use the NAME directive to add an OS indication to the display line. -----Original Message----- From: user-7796849e4635@xymon.invalid [mailto:user-7796849e4635@xymon.invalid] On Behalf Of Scott Walters Sent: Sunday, August 19, 2007 5:52 PM To: user-ae9b8668bcde@xymon.invalid Subject: Fwd: [hobbit] addon: os and critical icon On 8/9/07, Flyzone Micky <user-4df7b21ff8e1@xymon.invalid> wrote:Hi, i have made some edit on the hobbit-sources. When working in a enterprise, i found useful to see also two icons next the hostname: os and critical. Os could be windows,linux,aix,etc....I can vouch for the usefulness of an OS icon in the display. 1) For many sites, there are Windows and Unix admins. This helps them know immediately to "call for help" or to try and login themselves. 2) Saw an issue that only affected RedHat Linux servers, but I did not realize for a couple of weeks. Once the OS icon feature went in, the scope of the issue to RedHat was obvious. I am thinking the OS might be known from the client, rather than having to define it on the server. But a manual configuration would be nice, for devices that might be monitored, but without clients. Scott Walters -PacketPusher
Puzzles, trivia teasers, word scrambles and more. Play for your chance to win! http://club.live.com/home.aspx?icid=CLUB_hotmailtextlink
list John Glowacki
▸
T.J. Yang wrote:
I am in the process of writing an hb server side add-on script (learn from rootlogin.pl) to do OS counting. Ie, adapting "rootlogin" perl script do some OS counting from incoming bb messages stream. hoping to get a page that can list out OS versions and subtotals of different OS that hobbit server currently monitored. There is no ETA for oscount.pl, it could be faster if my management push for it ;) ps: I think ntop has some OS icons for hb community to reuse, if we really want to implement OS icons, I might need OS icons for my oscount.pl project T.J. Yang
If you are using hobbit clients, you should be able to pull much of what
you want from hobbitdboard and bb clientlog.
bb 127.0.0.1 "hobbitdboard test=cpu fields=BBH_OS"|sort |uniq -c
6
11 linux
66 sunos
To get more detail you can pull it with bb clientlog.
for i in `bb 127.0.0.1 "hobbitdboard fields=hostname" | sort -u`
do
bb 127.0.0.1 "clientlog $i section=uname,osversion"
done
John