Incorrect links in msgs page
list Chris Morris
Hi, Running hobbit-4.2-beta, monitoring 2 log files - on the msgs page the first Full Log link is actually to the second file. Below is the html source :- No entries in <a href="/hobbit-cgi/bb-hostsvc.sh?CLIENT=trl0002&SECTION=msgs:/var/log/mes sages">/var/log/messages</a> No entries in <a href="/hobbit-cgi/bb-hostsvc.sh?CLIENT=trl0002&SECTION=msgs:/var/log/mrt g.log">/var/log/mrtg.log</a> Full log <a href="/hobbit-cgi/bb-hostsvc.sh?CLIENT=trl0002&SECTION=msgs:/var/log/mrt g.log">/var/log/messages</a> Full log <a href="/hobbit-cgi/bb-hostsvc.sh?CLIENT=trl0002&SECTION=msgs:/var/log/mrt g.log">/var/log/mrtg.log</a> Regards, Chris **************************************************************************** The information contained in this email is intended only for the use of the intended recipient at the email address to which it has been addressed. If the reader of this message is not an intended recipient, you are hereby notified that you have received this document in error and that any review, dissemination or copying of the message or associated attachments is strictly prohibited. If you have received this email in error, please contact the sender by return email or call 01793 877777 and ask for the sender and then delete it immediately from your system.Please note that neither RWE npower nor the sender accepts any responsibility for viruses and it is your responsibility to scan attachments (if any). *****************************************************************************
list Henrik Størner
▸
On Wed, Jun 07, 2006 at 12:30:55PM +0100, Morris, Chris (Shared Services) wrote:
Running hobbit-4.2-beta, monitoring 2 log files - on the msgs page the first Full Log link is actually to the second file.
This should fix it.
Regards,
Henrik
-------------- next part --------------
--- hobbitd/hobbitd_client.c 2006/06/08 11:22:53 1.87
+++ hobbitd/hobbitd_client.c 2006/06/08 20:59:54
@@ -728,7 +728,6 @@
strbuffer_t *logsummary;
int msgscolor = COL_GREEN;
char msgline[PATH_MAX];
- char sectionname[PATH_MAX];
char *group;
for (swalk = sections; (swalk && strncmp(swalk->sname, "msgs:", 5)); swalk = swalk->next) ;
@@ -749,13 +748,12 @@
int logcolor;
clearstrbuffer(logsummary);
- sprintf(sectionname, "msgs:%s", swalk->sname+5);
if (strncmp(swalk->sdata, "Cannot open logfile ", 20) == 0) {
logcolor = COL_YELLOW;
addtobuffer(logsummary, "Logfile not accessible");
}
else {
- logcolor = scan_log(hinfo, clientclass, swalk->sname+5, swalk->sdata, sectionname, logsummary);
+ logcolor = scan_log(hinfo, clientclass, swalk->sname+5, swalk->sdata, swalk->sname, logsummary);
}
if (logcolor > msgscolor) msgscolor = logcolor;
@@ -763,20 +761,20 @@
switch (logcolor) {
case COL_GREEN:
sprintf(msgline, "\nNo entries in <a href=\"%s\">%s</a>\n",
- hostsvcclienturl(hostname, sectionname), swalk->sname+5);
+ hostsvcclienturl(hostname, swalk->sname), swalk->sname+5);
addtobuffer(greendata, msgline);
break;
case COL_YELLOW:
sprintf(msgline, "\n&yellow Warnings in <a href=\"%s\">%s</a>\n",
- hostsvcclienturl(hostname, sectionname), swalk->sname+5);
+ hostsvcclienturl(hostname, swalk->sname), swalk->sname+5);
addtobuffer(yellowdata, msgline);
addtostrbuffer(yellowdata, logsummary);
break;
case COL_RED:
sprintf(msgline, "\n&red Critical entries in <a href=\"%s\">%s</a>\n",
- hostsvcclienturl(hostname, sectionname), swalk->sname+5);
+ hostsvcclienturl(hostname, swalk->sname), swalk->sname+5);
addtobuffer(reddata, msgline);
addtostrbuffer(reddata, logsummary);
break;
@@ -824,7 +822,7 @@
for (swalk = sections; (swalk && strncmp(swalk->sname, "msgs:", 5)); swalk = swalk->next) ;
while (swalk) {
sprintf(msgline, "\nFull log <a href=\"%s\">%s</a>\n",
- hostsvcclienturl(hostname, sectionname), swalk->sname+5);
+ hostsvcclienturl(hostname, swalk->sname), swalk->sname+5);
addtostatus(msgline);
addtostatus(swalk->sdata);
do { swalk=swalk->next; } while (swalk && strncmp(swalk->sname, "msgs:", 5));
list Gräub Roland
Hello Henrik Is it possible to add a function to set the networkadress that hobbitping use for network tests ? In our enviorment we use a service ip for hobbit and all firewall rules are made for this adress, so its important that Hobbit use this adress to ping the clients. For fping i found a patch that works for me (see fping-2.4b2_to+interface.patch.txt) FPING="/usr/local/bin/fping -I 192.168.1.22" # Path and options for the 'fping' program. Two small things for the hobbitclient: On Solaris Systems i get a error about top: /opt/hobbitclient/client/bin/hobbitclient-sunos.sh: top: not found when i set the full path for top in hobbitclient-sunos.sh it works fine echo "[top]" /usr/local/bin/top -b 20 With ./runclient.sh status i get the client (Solaris & Linux) dosent run, but it runs fine: [hobbit at altara client]$ ./runclient.sh status Hobbit client (clientlaunch) does not appear to be running [hobbit at altara client]$ ps -ef | grep hobbit hobbit 20015 1 0 Jun08 ? 00:00:00 /opt/hobbit/client/bin/hobbitlaunch --config=/opt/hobbit/client/etc/clientlaunch.cfg --log=/opt/hobbit/client/logs/clientlaunch.log --pidfile=/opt/hobbit/client/logs/clientlaunch.altara.rtc.ch.pid hobbit 29367 1 0 08:39 ? 00:00:00 sh -c vmstat 300 2 1>/opt/hobbit/client/tmp/hobbit_vmstat.altara.rtc.ch.29351 2>&1; mv /opt/hobbit/client/tmp/hobbit_vmstat.altara.rtc.ch.29351 /opt/hobbit/client/tmp/hobbit_vmstat.altara.rtc.ch hobbit 29369 29367 0 08:39 ? 00:00:00 vmstat 300 2 hobbit 29488 29435 0 08:41 pts/3 00:00:00 grep hobbit Regards, Roland
Attachments (1)
list Mike Rowell
Roland, Regarding the top error in the sunos client, this is due to top not being supplied in solaris as standard, there are two options, either install top on all your solaris clients or as I did, put an if [ -f /usr/local/bin/top ]; then ...... fi around the whole top section in the clients file. Henrik, I'm wondering whether it might be worth doing this as standard in the hobbitclient-sunos.sh file? Mike
▸
-----Original Message-----
From: Gräub Roland [mailto:user-3de8f19e45fe@xymon.invalid]
Sent: 09 June 2006 08:20
To: user-ae9b8668bcde@xymon.invalid
Subject: [hobbit] Feature request for hobbitping / small client bugs
Hello Henrik
Is it possible to add a function to set the networkadress that hobbitping use for network tests ?
In our enviorment we use a service ip for hobbit and all firewall rules are made for this adress, so its important that Hobbit use this adress to ping the clients.
For fping i found a patch that works for me (see fping-2.4b2_to+interface.patch.txt)
FPING="/usr/local/bin/fping -I 192.168.1.22" # Path and options for the 'fping' program.
Two small things for the hobbitclient:
On Solaris Systems i get a error about top:
/opt/hobbitclient/client/bin/hobbitclient-sunos.sh: top: not found
when i set the full path for top in hobbitclient-sunos.sh it works fine
echo "[top]"
/usr/local/bin/top -b 20
With ./runclient.sh status i get the client (Solaris & Linux) dosent run, but it runs fine:
[hobbit at altara client]$ ./runclient.sh status
Hobbit client (clientlaunch) does not appear to be running
[hobbit at altara client]$ ps -ef | grep hobbit
hobbit 20015 1 0 Jun08 ? 00:00:00 /opt/hobbit/client/bin/hobbitlaunch --config=/opt/hobbit/client/etc/clientlaunch.cfg --log=/opt/hobbit/client/logs/clientlaunch.log --pidfile=/opt/hobbit/client/logs/clientlaunch.altara.rtc.ch.pid
hobbit 29367 1 0 08:39 ? 00:00:00 sh -c vmstat 300 2 1>/opt/hobbit/client/tmp/hobbit_vmstat.altara.rtc.ch.29351 2>&1; mv /opt/hobbit/client/tmp/hobbit_vmstat.altara.rtc.ch.29351 /opt/hobbit/client/tmp/hobbit_vmstat.altara.rtc.ch
hobbit 29369 29367 0 08:39 ? 00:00:00 vmstat 300 2
hobbit 29488 29435 0 08:41 pts/3 00:00:00 grep hobbit
Regards,
Roland
This email has been scanned for all viruses by the MessageLabs service.
This email has been scanned for all viruses by the MessageLabs service.
list Dominique Frise
▸
Mike Rowell wrote:
Roland, Regarding the top error in the sunos client, this is due to top not being supplied in solaris as standard, there are two options, either install top on all your solaris clients or as I did, put an if [ -f /usr/local/bin/top ]; then ...... fi around the whole top section in the clients file. Henrik, I'm wondering whether it might be worth doing this as standard in the hobbitclient-sunos.sh file? Mike -----Original Message----- From: Gräub Roland [mailto:user-3de8f19e45fe@xymon.invalid] Sent: 09 June 2006 08:20 To: user-ae9b8668bcde@xymon.invalid Subject: [hobbit] Feature request for hobbitping / small client bugs Hello Henrik Is it possible to add a function to set the networkadress that hobbitping use for network tests ? In our enviorment we use a service ip for hobbit and all firewall rules are made for this adress, so its important that Hobbit use this adress to ping the clients. For fping i found a patch that works for me (see fping-2.4b2_to+interface.patch.txt) FPING="/usr/local/bin/fping -I 192.168.1.22" # Path and options for the 'fping' program. Two small things for the hobbitclient: On Solaris Systems i get a error about top: /opt/hobbitclient/client/bin/hobbitclient-sunos.sh: top: not found when i set the full path for top in hobbitclient-sunos.sh it works fine echo "[top]" /usr/local/bin/top -b 20 With ./runclient.sh status i get the client (Solaris & Linux) dosent run, but it runs fine: [hobbit at altara client]$ ./runclient.sh status Hobbit client (clientlaunch) does not appear to be running [hobbit at altara client]$ ps -ef | grep hobbit hobbit 20015 1 0 Jun08 ? 00:00:00 /opt/hobbit/client/bin/hobbitlaunch --config=/opt/hobbit/client/etc/clientlaunch.cfg --log=/opt/hobbit/client/logs/clientlaunch.log --pidfile=/opt/hobbit/client/logs/clientlaunch.altara.rtc.ch.pid hobbit 29367 1 0 08:39 ? 00:00:00 sh -c vmstat 300 2 1>/opt/hobbit/client/tmp/hobbit_vmstat.altara.rtc.ch.29351 2>&1; mv /opt/hobbit/client/tmp/hobbit_vmstat.altara.rtc.ch.29351 /opt/hobbit/client/tmp/hobbit_vmstat.altara.rtc.ch hobbit 29369 29367 0 08:39 ? 00:00:00 vmstat 300 2 hobbit 29488 29435 0 08:41 pts/3 00:00:00 grep hobbit Regards, Roland This email has been scanned for all viruses by the MessageLabs service. This email has been scanned for all viruses by the MessageLabs service. ________________________________________________________________________
This has already been discussed. If your using the current client release you can set the PATH in hobbitclient.cfg. Dominique UNIL - University of Lausanne
list Henrik Størner
▸
On Fri, Jun 09, 2006 at 09:20:29AM +0200, Gräub Roland wrote:
Is it possible to add a function to set the networkadress that hobbitping use for network tests ? In our enviorment we use a service ip for hobbit and all firewall rules are made for this adress, so its important that Hobbit use this adress to ping the clients.
OK, there is a patch now for this in the beta-patches "Enhancements" section at http://www.hswn.dk/hobbitsw/betapatches/ The option you'll want is "--source=IP".
▸
On Solaris Systems i get a error about top: /opt/hobbitclient/client/bin/hobbitclient-sunos.sh: top: not found when i set the full path for top in hobbitclient-sunos.sh it works fine echo "[top]" /usr/local/bin/top -b 20
I've modified all the client-side scripts to use the $TOP variable which is set during the client installation. That should resolve this issue. Patch available in the beta-patches area.
▸
With ./runclient.sh status i get the client (Solaris & Linux) dosent run, but it runs fine: [hobbit at altara client]$ ./runclient.sh status Hobbit client (clientlaunch) does not appear to be running
It was checking the wrong PID file. Patch available in the beta-patches area. Thanks, Henrik