[Xymon] Multiple critical view with criticalview.sh ?
Nico
nicolas at lienard.name
Tue Jul 24 20:54:28 CEST 2012
Hi
I d like to understand how the /xymon-cgi/criticalview.sh|criticalview.cgi works.
In fact; this view is really useful; and i would like to create new critical view like this one with different hosts. (one critical view for top10 customers for instance; another one for Spain hosts only etc).
I tried to duplicate criticalview.sh to criticalview_NEW.sh and to modify the ENV variable:
. /opt/xymon//server/etc/cgioptions_NEW.cfg
and in this file to change XYMONENV=/opt/xymon//server/etc/xymonserver_NEW.cfg instead of /xymonserver.cfg
then in this file i modified HOSTSCFG="$XYMONHOME/etc/hosts.d/top10customers.cfg" instead of HOSTSCFG="$XYMONHOME/etc/hosts.cfg.
but it doesn t change anything; criticalview_NEW.sh is still showing everything :/
I also though about having multiple critical.cfg but i don t know how to tell xymon to look at another critical.cfg file :(
in /web/criticalview.c, there is a reference to this file:
if (!critconfig[0]) {
critconfig = (char **)realloc(critconfig, 2*sizeof(char *));
critconfig[0] = (char *)malloc(strlen(xgetenv("XYMONHOME")) + strlen(DEFAULT_CRITCONFIGFN) + 2);
sprintf(critconfig[0], "%s/%s", xgetenv("XYMONHOME"), DEFAULT_CRITCONFIGFN);
critconfig[1] = NULL;
}
and DEFAULT_CRITCONFIGFN is defined in /opt/repo/src/xymon-4.3.7/lib/loadcriticalconf.h
#define DEFAULT_CRITCONFIGFN "etc/critical.cfg"
but don t see anywhere how to override this variable ?
tried also to create a new view with xymongen but it generates only a basic critical.html and nongreen.html file... nothing related to the CGI at the end :(
any clue will be appreciated.
thanks
Cheers
Nico
More information about the Xymon
mailing list