<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Ok i think i just found the way myself by grepping everything everywhere ...<div><br></div><div>in criticalview.sh, it is possible to override the critical conf  file with "<b>--config</b>":</div><div><br></div><div><br></div><div><div>[root@xymon cgi-bin]# grep -n --  --config /opt/repo/src/xymon-4.3.7/web/criticalview.c</div><div>481:    else if (argnmatch(argv[argi], "--config=")) {</div></div><div><br></div><div><br></div><div>So, by modifying criticalview_NEW.sh</div><div> exec /opt/xymon//server/bin/criticalview.cgi $CGI_CRITVIEW_OPTS -<b>-config=/opt/xymon/server/etc/critical_top30.cfg</b></div><div><br></div><div>now, the /cgi-bin/criticalview_NEW.sh shows the devices of critical_top30.cfg ONLY :)</div><div><br></div><div>thanks and sorry for the noise.</div><div><br></div><div>Cheers</div><div>nico</div><div><br></div><div><div><div>Le 24 juil. 2012 à 20:54, Nico a écrit :</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>Hi <br><br>I d like to understand how the /xymon-cgi/criticalview.sh|criticalview.cgi  works.<br><br><br>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).<br><br>I tried to duplicate criticalview.sh to criticalview_NEW.sh and to modify the ENV variable:<br><br>. /opt/xymon//server/etc/cgioptions_NEW.cfg<br><br>and in this file to change XYMONENV=/opt/xymon//server/etc/xymonserver_NEW.cfg instead of /xymonserver.cfg<br>then in this file i modified HOSTSCFG="$XYMONHOME/etc/hosts.d/top10customers.cfg" instead of  HOSTSCFG="$XYMONHOME/etc/hosts.cfg.<br>but it doesn t change anything; criticalview_NEW.sh is still showing everything :/<br><br>I also though about having multiple critical.cfg  but i don t know how to tell xymon to look at another critical.cfg file :(<br><br>in /web/criticalview.c, there is a reference to this file:<br><br>  if (!critconfig[0]) {<br>               critconfig = (char **)realloc(critconfig, 2*sizeof(char *));<br>               critconfig[0] = (char *)malloc(strlen(xgetenv("XYMONHOME")) + strlen(DEFAULT_CRITCONFIGFN) + 2);<br>               sprintf(critconfig[0], "%s/%s", xgetenv("XYMONHOME"), DEFAULT_CRITCONFIGFN);<br>               critconfig[1] = NULL;<br>       }<br><br>and DEFAULT_CRITCONFIGFN is defined in /opt/repo/src/xymon-4.3.7/lib/loadcriticalconf.h<br><br>#define DEFAULT_CRITCONFIGFN "etc/critical.cfg"<br><br>but don t see anywhere how to override this variable ?<br><br>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 :(<br><br>any clue will be appreciated.<br><br>thanks<br><br><br>Cheers<br>Nico<br><br></div></blockquote></div><br></div></body></html>