You can subscribe to this list here.
2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(19) |
Oct
(10) |
Nov
(14) |
Dec
(58) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2007 |
Jan
|
Feb
(5) |
Mar
(33) |
Apr
(31) |
May
(3) |
Jun
(30) |
Jul
(4) |
Aug
(26) |
Sep
(23) |
Oct
|
Nov
(6) |
Dec
(56) |
2008 |
Jan
(12) |
Feb
(9) |
Mar
(2) |
Apr
(8) |
May
(2) |
Jun
(3) |
Jul
(4) |
Aug
(1) |
Sep
|
Oct
|
Nov
(16) |
Dec
(4) |
2009 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(36) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2010 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(4) |
Oct
|
Nov
|
Dec
|
From: Florian G. <re...@us...> - 2006-09-15 10:56:50
|
Update of /cvsroot/perfparse/_perfparse In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24574 Modified Files: TODO Log Message: changed todofile Index: TODO =================================================================== RCS file: /cvsroot/perfparse/_perfparse/TODO,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** TODO 27 Apr 2006 07:25:15 -0000 1.2 --- TODO 15 Sep 2006 10:56:43 -0000 1.3 *************** *** 1 **** ! Add database port as config parameter --- 1,2 ---- ! Use storage modules to get data for cgi/phpui similar to saving data. Getting Data should only use first storage module configured. ! Integrate ajax framework. Ideas: create tinyurls for graphs via ajax. Make menus more dynamic ... |
From: Florian G. <re...@us...> - 2006-09-15 06:34:56
|
Update of /cvsroot/perfparse/_perfparse-phpgui In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24876/phpgui Modified Files: perfparse.php Log Message: reconstructing lost defaults in cgi and corrected cgi variables handed to graph Index: perfparse.php =================================================================== RCS file: /cvsroot/perfparse/_perfparse-phpgui/perfparse.php,v retrieving revision 1.37 retrieving revision 1.38 diff -C2 -d -r1.37 -r1.38 *** perfparse.php 14 Sep 2006 15:31:16 -0000 1.37 --- perfparse.php 15 Sep 2006 06:34:53 -0000 1.38 *************** *** 304,310 **** // create url here $actgraph['url']= ! '/nagios/cgi-bin/perfchart.png?host='.urlencode($host_name). ! '&service='.urlencode($service). ! '&metric='.urlencode($metric). $scalepars. '&select_line=1'. --- 304,308 ---- // create url here $actgraph['url']= ! '/nagios/cgi-bin/perfchart.png?metric_id='.urlencode($metric_id). $scalepars. '&select_line=1'. |
From: Florian G. <re...@us...> - 2006-09-15 06:34:56
|
Update of /cvsroot/perfparse/_perfparse/cgi In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24876/cgi Modified Files: perfchart.c Log Message: reconstructing lost defaults in cgi and corrected cgi variables handed to graph Index: perfchart.c =================================================================== RCS file: /cvsroot/perfparse/_perfparse/cgi/perfchart.c,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** perfchart.c 14 Sep 2006 21:05:16 -0000 1.6 --- perfchart.c 15 Sep 2006 06:34:52 -0000 1.7 *************** *** 60,66 **** /* CGI in */ ! char sHost[76]; ! char sService[76]; ! char sMetric[76]; int sMetricId = FALSE; char sFrom[30], sTo[30]; --- 60,66 ---- /* CGI in */ ! char sHost[76]=""; ! char sService[76]=""; ! char sMetric[76]=""; int sMetricId = FALSE; char sFrom[30], sTo[30]; |
From: Florian G. <re...@us...> - 2006-09-14 21:05:20
|
Update of /cvsroot/perfparse/_perfparse In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7500 Modified Files: ChangeLog Log Message: changes queries in perfchart Index: ChangeLog =================================================================== RCS file: /cvsroot/perfparse/_perfparse/ChangeLog,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** ChangeLog 17 Aug 2006 13:57:16 -0000 1.11 --- ChangeLog 14 Sep 2006 21:05:16 -0000 1.12 *************** *** 1,3 **** --- 1,4 ---- Version 0.106.2 + Changed database schema. Normalized some tables (FG) Added option to set port and/or socket for database connection (FG) Fixed bug where parsing was dependent on LC_NUMERIC (Thanks to Christophe Borivant) (FG) |
From: Florian G. <re...@us...> - 2006-09-14 21:05:19
|
Update of /cvsroot/perfparse/_perfparse/cgi In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7500/cgi Modified Files: perfchart.c Log Message: changes queries in perfchart Index: perfchart.c =================================================================== RCS file: /cvsroot/perfparse/_perfparse/cgi/perfchart.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** perfchart.c 24 Aug 2006 15:27:35 -0000 1.5 --- perfchart.c 14 Sep 2006 21:05:16 -0000 1.6 *************** *** 60,66 **** /* CGI in */ ! char sHost[76] = ""; ! char sService[76] = ""; ! char sMetric[76] = ""; char sFrom[30], sTo[30]; char sTimeRange[2]; --- 60,67 ---- /* CGI in */ ! char sHost[76]; ! char sService[76]; ! char sMetric[76]; ! int sMetricId = FALSE; char sFrom[30], sTo[30]; char sTimeRange[2]; *************** *** 194,198 **** printf("Expires: Sun, 02 Jan 2000 01:01:01 GMT\n"); ! printf("content-type: image/png\n\n"); setlocale(LC_ALL, ""); --- 195,200 ---- printf("Expires: Sun, 02 Jan 2000 01:01:01 GMT\n"); ! printf("content-type: image/png\n"); ! printf("Content-Disposition: inline; filename=perfchart.png\n\n"); setlocale(LC_ALL, ""); *************** *** 335,349 **** #endif #ifdef USE_DB_MYSQL ! g_string_printf(s_SQL, "SELECT UNIX_TIMESTAMP(ctime), value, warn, critical FROM perfdata_service_bin WHERE host_name = '%s'", ! sql_escape(sHost,PERCENT_ESCAPE_CHAR)); #elif defined USE_DB_POSTGRESQL ! g_string_printf(s_SQL, "SELECT ctime, value, warn, critical FROM perfdata_service_bin WHERE host_name = '%s'", ! sql_escape(sHost,PERCENT_ESCAPE_CHAR)); #endif - g_string_append_printf(s_SQL, " AND service_description = '%s'", - sql_escape(sService,PERCENT_ESCAPE_CHAR)); - g_string_append_printf(s_SQL, " AND metric = '%s'", - sql_escape(sMetric,PERCENT_ESCAPE_CHAR)); g_string_append_printf(s_SQL, " AND ctime BETWEEN '%s' AND '%s' ORDER BY ctime", sFrom, sTo); --- 337,368 ---- #endif + // get sHost sService and sMetric from sMetricId + g_string_printf(s_SQL, "SELECT h.host_name,s.service_description,m.metric FROM perfdata_host h, perfdata_service s, perfdata_service_metric m WHERE "); + g_string_append_printf(s_SQL, "h.host_id=s.host_id AND s.service_id=m.service_id AND m.metric_id=%d",sMetricId); + #ifdef USE_DB_MYSQL + if (mysql_query(&db_mysql, s_SQL->str)) + print_sql_failure_image(__FILE__,__LINE__, s_SQL->str, mysql_error(&db_mysql)); + query_result = mysql_use_result(&db_mysql); + while ((result_row = mysql_fetch_row(query_result))) { + #elif defined USE_DB_POSTGRESQL + /* pgsql untested here*/ + query_result = PQexec(db_postgresql, s_SQL->str); + if(PQresultStatus(query_result) == PGRES_BAD_RESPONSE || PQresultStatus(query_result) == PGRES_FATAL_ERROR) + print_sql_failure_image(__FILE__,__LINE__, s_SQL->str, PQresultErrorMessage(query_result)); + numberOfRows = rows(); + for (currentRow = 0; currentRow<numberOfRows; currentRow++){ + #endif + strncpy(sHost,sData(0),76); + strncpy(sService,sData(1),76); + strncpy(sMetric,sData(2),76); + } + #ifdef USE_DB_MYSQL ! g_string_printf(s_SQL, "SELECT UNIX_TIMESTAMP(ctime), value, warn, critical FROM perfdata_service_bin WHERE metric_id = %d", ! sMetricId); #elif defined USE_DB_POSTGRESQL ! g_string_printf(s_SQL, "SELECT ctime, value, warn, critical FROM perfdata_service_bin WHERE metric_id = '%s'", ! sMetricId); #endif g_string_append_printf(s_SQL, " AND ctime BETWEEN '%s' AND '%s' ORDER BY ctime", sFrom, sTo); *************** *** 1511,1517 **** /* Graph details */ ! strncpy(sHost, scgi("host"),76); ! strncpy(sService, scgi("service"),76); ! strncpy(sMetric, scgi("metric"),76); if ((s = scgi("max"))[0] > ' ') { --- 1530,1534 ---- /* Graph details */ ! sMetricId=atoi(scgi("metric_id")); if ((s = scgi("max"))[0] > ' ') { |
From: Florian G. <re...@us...> - 2006-09-14 15:31:18
|
Update of /cvsroot/perfparse/_perfparse-phpgui In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7578 Modified Files: perfparse.php Log Message: fixed some syntax errs. cleaned debug spam Index: perfparse.php =================================================================== RCS file: /cvsroot/perfparse/_perfparse-phpgui/perfparse.php,v retrieving revision 1.36 retrieving revision 1.37 diff -C2 -d -r1.36 -r1.37 *** perfparse.php 14 Sep 2006 14:02:06 -0000 1.36 --- perfparse.php 14 Sep 2006 15:31:16 -0000 1.37 *************** *** 214,221 **** if(get_request_var('graphs','array')) { ! echo "<pre>\ngraphs from Request:\n";print_r($graphs); echo "</pre>"; ! echo "<pre>\nRequest:\n";print_r($_REQUEST); echo "</pre>"; get_request_var('displaygraphs','array'); ! echo "<pre>\ndisplaygraphs from Request:\n";print_r($diaplaygraphs); echo "</pre>"; foreach($graphs as $metric_id => $metricarray) { //foreach($hostarray as $service => $servicearray) { --- 214,220 ---- if(get_request_var('graphs','array')) { ! // echo "<pre>\ngraphs from Request:\n";print_r($graphs); echo "</pre>"; get_request_var('displaygraphs','array'); ! // echo "<pre>\ndisplaygraphs from Request:\n";print_r($displaygraphs); echo "</pre>"; foreach($graphs as $metric_id => $metricarray) { //foreach($hostarray as $service => $servicearray) { *************** *** 223,227 **** $tmparr=get_metric_props($db,$metric_id); if($tmparr!=FALSE) { ! echo "<pre>tmparr:\n";print_r($tmparr);echo "</pre>"; $numgraphs++; // build a array that holds all information. --- 222,226 ---- $tmparr=get_metric_props($db,$metric_id); if($tmparr!=FALSE) { ! // echo "<pre>tmparr:\n";print_r($tmparr);echo "</pre>"; $numgraphs++; // build a array that holds all information. *************** *** 230,234 **** $metric=$tmparr['metric']; ! if (!isset($displaygraphs[$host_name][$service][$metric]) { $displaygraphs[$host_name][$service][$metric]=array(); } --- 229,233 ---- $metric=$tmparr['metric']; ! if (!isset($displaygraphs[$host_name][$service][$metric])) { $displaygraphs[$host_name][$service][$metric]=array(); } *************** *** 305,309 **** // create url here $actgraph['url']= ! 'cgi-bin/perfchart.png?host='.urlencode($host_name). '&service='.urlencode($service). '&metric='.urlencode($metric). --- 304,308 ---- // create url here $actgraph['url']= ! '/nagios/cgi-bin/perfchart.png?host='.urlencode($host_name). '&service='.urlencode($service). '&metric='.urlencode($metric). *************** *** 338,342 **** } // if(get_request_var('graphs' ... ! echo "<pre>\ndisplaygraphs:\n";print_r($displaygraphs); echo "</pre>"; if($numgraphs>0) { --- 337,341 ---- } // if(get_request_var('graphs' ... ! // echo "<pre>\ndisplaygraphs:\n";print_r($displaygraphs); echo "</pre>"; if($numgraphs>0) { |
From: Florian G. <re...@us...> - 2006-09-14 14:02:12
|
Update of /cvsroot/perfparse/_perfparse-phpgui/templates In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5652/templates Modified Files: graph.tpl.html Log Message: graph page works half - with some debug enabled Index: graph.tpl.html =================================================================== RCS file: /cvsroot/perfparse/_perfparse-phpgui/templates/graph.tpl.html,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** graph.tpl.html 8 Apr 2006 23:59:47 -0000 1.10 --- graph.tpl.html 14 Sep 2006 14:02:06 -0000 1.11 *************** *** 48,54 **** </td></tr></table></td> </tr> ! <tr><td align="center" colspan="7"><input type="submit" value="<{tr}>Draw graph<{/tr}>" /></td></tr> ! <!-- loop through graphs --> ! <{foreach from=$graphs key=host_name item=hostarray}> <!-- host <{$host_name}> --> <{foreach from=$hostarray key=service item=servicearray}> --- 48,59 ---- </td></tr></table></td> </tr> ! <tr><td align="center" colspan="7"><input type="submit" value="<{tr}>Draw graph<{/tr}>" /> ! <!-- save the graphs array --> ! <{foreach from=$graphs key=mid item=bla}> ! <input type="hidden" name="graphs[<{$mid}>]" value="<{$bla}>" /> ! <{/foreach}> ! </td></tr> ! <!-- loop through displaygraphs --> ! <{foreach from=$displaygraphs key=host_name item=hostarray}> <!-- host <{$host_name}> --> <{foreach from=$hostarray key=service item=servicearray}> *************** *** 73,77 **** <td align=right><font face="Arial, Helvetica" size=2><{tr}>Scale<{/tr}>:</td> <td> ! <select name="graphs[<{$host_name}>][<{$service}>][<{$metric}>][scale]"> <option value="1" <{if $metricarray.scale == 1}>selected="selected"<{/if}>><{tr}>User<{/tr}>: <option value="0" <{if $metricarray.scale == 0}>selected="selected"<{/if}>><{tr}>User, Rounded<{/tr}>: --- 78,82 ---- <td align=right><font face="Arial, Helvetica" size=2><{tr}>Scale<{/tr}>:</td> <td> ! <select name="displaygraphs[<{$host_name}>][<{$service}>][<{$metric}>][scale]"> <option value="1" <{if $metricarray.scale == 1}>selected="selected"<{/if}>><{tr}>User<{/tr}>: <option value="0" <{if $metricarray.scale == 0}>selected="selected"<{/if}>><{tr}>User, Rounded<{/tr}>: *************** *** 89,93 **** </td> <td> ! <input type=text name="graphs[<{$host_name}>][<{$service}>][<{$metric}>][minin]" value="<{$metricarray.minin}>" size=12 maxlength=12> </td> <td align=right><font face="Arial, Helvetica" size=2> --- 94,98 ---- </td> <td> ! <input type=text name="displaygraphs[<{$host_name}>][<{$service}>][<{$metric}>][minin]" value="<{$metricarray.minin}>" size=12 maxlength=12> </td> <td align=right><font face="Arial, Helvetica" size=2> *************** *** 95,99 **** </td> <td> ! <input type=text name="graphs[<{$host_name}>][<{$service}>][<{$metric}>][maxin]" value="<{$metricarray.maxin}>" size=12 maxlength=12> </td> </tr> --- 100,104 ---- </td> <td> ! <input type=text name="displaygraphs[<{$host_name}>][<{$service}>][<{$metric}>][maxin]" value="<{$metricarray.maxin}>" size=12 maxlength=12> </td> </tr> *************** *** 101,125 **** <tr> <td align=right rowspan=2><font face="Arial, Helvetica" size=2><{tr}>Period<{/tr}>:</td> ! <td valign=middle><font face="Arial, Helvetica" size=2> <input type=radio name="graphs[<{$host_name}>][<{$service}>][<{$metric}>][timerange]" value="r" onclick="javascript:isAbsRelVisible(this,'<{$host_name}>_<{$service}>_<{$metric}>')" id="RelSwitch" <{if $metricarray.timerange=="r"}>checked="checked"<{/if}> ><{tr}>Relative<{/tr}></td> <td align=right id="Rel_<{$host_name}>_<{$service}>_<{$metric}>"><font face="Arial, Helvetica" size=2><{tr}>Rel Period<{/tr}>:</td> ! <td valign=middle id="Rel_<{$host_name}>_<{$service}>_<{$metric}>"><font face="Arial, Helvetica" size=2> <input type=text name="graphs[<{$host_name}>][<{$service}>][<{$metric}>][relativedays]" value="<{$metricarray.relativedays}>" size=2 maxlength=4> <{tr}>Days<{/tr}> </td> <td align=right id="Rel_<{$host_name}>_<{$service}>_<{$metric}>"><font face="Arial, Helvetica" size=2> <{tr}>And Hours<{/tr}>: </td> <td id="Rel_<{$host_name}>_<{$service}>_<{$metric}>"><font face="Arial, Helvetica" size=2> ! <input type=text name="graphs[<{$host_name}>][<{$service}>][<{$metric}>][relativetime]" value="<{$metricarray.relativetime}>" size=5 maxlength=5> <{tr}>HH:MM<{/tr}> </td> </tr> <tr> <td><font face="Arial, Helvetica" size=2> ! <input type=radio name="graphs[<{$host_name}>][<{$service}>][<{$metric}>][timerange]" value="a" onclick="javascript:isAbsRelVisible(this,'<{$host_name}>_<{$service}>_<{$metric}>')" id="AbsSwitch" <{if $metricarray.timerange=="a"}>checked="checked"<{/if}>><{tr}>Absolute<{/tr}> </td> <td align=right id="Abs_<{$host_name}>_<{$service}>_<{$metric}>"><font face="Arial, Helvetica" size=2><{tr}>Abs From<{/tr}>:</td> ! <td id="Abs_<{$host_name}>_<{$service}>_<{$metric}>"><input type=text name="graphs[<{$host_name}>][<{$service}>][<{$metric}>][from]" value="<{$metricarray.from}>" size=17 maxlength=20></td> <td align=right id="Abs_<{$host_name}>_<{$service}>_<{$metric}>"><font face="Arial, Helvetica" size=2><{tr}>Abs To<{/tr}>:</td> ! <td id="Abs_<{$host_name}>_<{$service}>_<{$metric}>"><input type=text name="graphs[<{$host_name}>][<{$service}>][<{$metric}>][to]" value="<{$metricarray.to}>" size=17 maxlength=20></td> </tr> <tr><td colspan=6 height=4><hr height=4></td></tr> <tr> <td align=right><font face="Arial, Helvetica" size=2><{tr}>Output<{/tr}>:</td> ! <td><select name="graphs[<{$host_name}>][<{$service}>][<{$metric}>][output]"> <option value="Histogram" <{if $metricarray.output=="Histogram"}>selected="selected"<{/if}>><{tr}>Histogram<{/tr}> <option value="Average" <{if $metricarray.output=="Average"}>selected="selected"<{/if}>><{tr}>Daily Average<{/tr}> --- 106,130 ---- <tr> <td align=right rowspan=2><font face="Arial, Helvetica" size=2><{tr}>Period<{/tr}>:</td> ! <td valign=middle><font face="Arial, Helvetica" size=2> <input type=radio name="displaygraphs[<{$host_name}>][<{$service}>][<{$metric}>][timerange]" value="r" onclick="javascript:isAbsRelVisible(this,'<{$host_name}>_<{$service}>_<{$metric}>')" id="RelSwitch" <{if $metricarray.timerange=="r"}>checked="checked"<{/if}> ><{tr}>Relative<{/tr}></td> <td align=right id="Rel_<{$host_name}>_<{$service}>_<{$metric}>"><font face="Arial, Helvetica" size=2><{tr}>Rel Period<{/tr}>:</td> ! <td valign=middle id="Rel_<{$host_name}>_<{$service}>_<{$metric}>"><font face="Arial, Helvetica" size=2> <input type=text name="displaygraphs[<{$host_name}>][<{$service}>][<{$metric}>][relativedays]" value="<{$metricarray.relativedays}>" size=2 maxlength=4> <{tr}>Days<{/tr}> </td> <td align=right id="Rel_<{$host_name}>_<{$service}>_<{$metric}>"><font face="Arial, Helvetica" size=2> <{tr}>And Hours<{/tr}>: </td> <td id="Rel_<{$host_name}>_<{$service}>_<{$metric}>"><font face="Arial, Helvetica" size=2> ! <input type=text name="displaygraphs[<{$host_name}>][<{$service}>][<{$metric}>][relativetime]" value="<{$metricarray.relativetime}>" size=5 maxlength=5> <{tr}>HH:MM<{/tr}> </td> </tr> <tr> <td><font face="Arial, Helvetica" size=2> ! <input type=radio name="displaygraphs[<{$host_name}>][<{$service}>][<{$metric}>][timerange]" value="a" onclick="javascript:isAbsRelVisible(this,'<{$host_name}>_<{$service}>_<{$metric}>')" id="AbsSwitch" <{if $metricarray.timerange=="a"}>checked="checked"<{/if}>><{tr}>Absolute<{/tr}> </td> <td align=right id="Abs_<{$host_name}>_<{$service}>_<{$metric}>"><font face="Arial, Helvetica" size=2><{tr}>Abs From<{/tr}>:</td> ! <td id="Abs_<{$host_name}>_<{$service}>_<{$metric}>"><input type=text name="displaygraphs[<{$host_name}>][<{$service}>][<{$metric}>][from]" value="<{$metricarray.from}>" size=17 maxlength=20></td> <td align=right id="Abs_<{$host_name}>_<{$service}>_<{$metric}>"><font face="Arial, Helvetica" size=2><{tr}>Abs To<{/tr}>:</td> ! <td id="Abs_<{$host_name}>_<{$service}>_<{$metric}>"><input type=text name="displaygraphs[<{$host_name}>][<{$service}>][<{$metric}>][to]" value="<{$metricarray.to}>" size=17 maxlength=20></td> </tr> <tr><td colspan=6 height=4><hr height=4></td></tr> <tr> <td align=right><font face="Arial, Helvetica" size=2><{tr}>Output<{/tr}>:</td> ! <td><select name="displaygraphs[<{$host_name}>][<{$service}>][<{$metric}>][output]"> <option value="Histogram" <{if $metricarray.output=="Histogram"}>selected="selected"<{/if}>><{tr}>Histogram<{/tr}> <option value="Average" <{if $metricarray.output=="Average"}>selected="selected"<{/if}>><{tr}>Daily Average<{/tr}> *************** *** 129,133 **** <td colspan=2> </td> <td align=right><font face="Arial, Helvetica" size=2><{tr}>Size<{/tr}>:</td> ! <td><select name="graphs[<{$host_name}>][<{$service}>][<{$metric}>][size]"> <option value="400x200" <{if $metricarray.size=="400x200"}>selected="selected"<{/if}>><{tr}>Small<{/tr}> <option value="585x300" <{if $metricarray.size=="585x300"}>selected="selected"<{/if}>><{tr}>Normal<{/tr}> --- 134,138 ---- <td colspan=2> </td> <td align=right><font face="Arial, Helvetica" size=2><{tr}>Size<{/tr}>:</td> ! <td><select name="displaygraphs[<{$host_name}>][<{$service}>][<{$metric}>][size]"> <option value="400x200" <{if $metricarray.size=="400x200"}>selected="selected"<{/if}>><{tr}>Small<{/tr}> <option value="585x300" <{if $metricarray.size=="585x300"}>selected="selected"<{/if}>><{tr}>Normal<{/tr}> *************** *** 138,146 **** <td align=right><font face="Arial, Helvetica" size=2><{tr}>Plot<{/tr}>:</td> <td colspan=5><font face="Arial, Helvetica" size="2"> ! <input type=checkbox name="graphs[<{$host_name}>][<{$service}>][<{$metric}>][s_val]" value="1" <{if $metricarray.s_val}>checked="checked"<{/if}>> <{tr}>Value<{/tr}> ! <input type=checkbox name="graphs[<{$host_name}>][<{$service}>][<{$metric}>][s_smo]" value="1" <{if $metricarray.s_smo}>checked="checked"<{/if}>> <{tr}>Smooth<{/tr}>* ! <input type=checkbox name="graphs[<{$host_name}>][<{$service}>][<{$metric}>][s_war]" value="1" <{if $metricarray.s_war}>checked="checked"<{/if}>> <{tr}>Warning<{/tr}> ! <input type=checkbox name="graphs[<{$host_name}>][<{$service}>][<{$metric}>][s_cri]" value="1" <{if $metricarray.s_cri}>checked="checked"<{/if}>> <{tr}>Critical<{/tr}> ! <input type=checkbox name="graphs[<{$host_name}>][<{$service}>][<{$metric}>][s_sta]" value="1" <{if $metricarray.s_sta}>checked="checked"<{/if}>> <{tr}>Stan. Dev<{/tr}>* </font> <font face="Arial, Helvetica" size="1">(* <{tr}>Where Used<{/tr}>)</font> </td> --- 143,151 ---- <td align=right><font face="Arial, Helvetica" size=2><{tr}>Plot<{/tr}>:</td> <td colspan=5><font face="Arial, Helvetica" size="2"> ! <input type=checkbox name="displaygraphs[<{$host_name}>][<{$service}>][<{$metric}>][s_val]" value="1" <{if $metricarray.s_val}>checked="checked"<{/if}>> <{tr}>Value<{/tr}> ! <input type=checkbox name="displaygraphs[<{$host_name}>][<{$service}>][<{$metric}>][s_smo]" value="1" <{if $metricarray.s_smo}>checked="checked"<{/if}>> <{tr}>Smooth<{/tr}>* ! <input type=checkbox name="displaygraphs[<{$host_name}>][<{$service}>][<{$metric}>][s_war]" value="1" <{if $metricarray.s_war}>checked="checked"<{/if}>> <{tr}>Warning<{/tr}> ! <input type=checkbox name="displaygraphs[<{$host_name}>][<{$service}>][<{$metric}>][s_cri]" value="1" <{if $metricarray.s_cri}>checked="checked"<{/if}>> <{tr}>Critical<{/tr}> ! <input type=checkbox name="displaygraphs[<{$host_name}>][<{$service}>][<{$metric}>][s_sta]" value="1" <{if $metricarray.s_sta}>checked="checked"<{/if}>> <{tr}>Stan. Dev<{/tr}>* </font> <font face="Arial, Helvetica" size="1">(* <{tr}>Where Used<{/tr}>)</font> </td> *************** *** 154,158 **** </font></td> <td colspan=2> ! <input type="text" name="graphs[<{$host_name}>][<{$service}>][<{$metric}>][title]" value="<{$metricarray.title}>" size=60 maxlength=80> </td> </tr> --- 159,163 ---- </font></td> <td colspan=2> ! <input type="text" name="displaygraphs[<{$host_name}>][<{$service}>][<{$metric}>][title]" value="<{$metricarray.title}>" size=60 maxlength=80> </td> </tr> *************** *** 162,166 **** </td> <td colspan=2><nobr> ! <input type="text" name="graphs[<{$host_name}>][<{$service}>][<{$metric}>][g_sigma]" value="<{$metricarray.g_sigma}>" size=5 maxlength=5> <font face="Arial, Helvetica" size=1>(<{tr}>Large = Slow, see<{/tr}> <a href="http://perfparse.sourceforge.net/faq.php#gaussian"><{tr}>FAQ<{/tr}></a>)</font> </td> --- 167,171 ---- </td> <td colspan=2><nobr> ! <input type="text" name="displaygraphs[<{$host_name}>][<{$service}>][<{$metric}>][g_sigma]" value="<{$metricarray.g_sigma}>" size=5 maxlength=5> <font face="Arial, Helvetica" size=1>(<{tr}>Large = Slow, see<{/tr}> <a href="http://perfparse.sourceforge.net/faq.php#gaussian"><{tr}>FAQ<{/tr}></a>)</font> </td> *************** *** 170,177 **** <{tr}>Save graph for future reference<{/tr}>: </font></td> ! <td><input type=checkbox name="graphs[<{$host_name}>][<{$service}>][<{$metric}>][save_graph]" value="<{$metricarray.save_graph}>"></td> <td align=right><font face="Arial, Helvetica" size=2><nobr> <{tr}>Save with Title<{/tr}>: ! <input type="text" name="graphs[<{$host_name}>][<{$service}>][<{$metric}>][graph_name]" value="<{$metricarray.graph_name}>" size=40 maxlength=80> </font></td> </tr> --- 175,182 ---- <{tr}>Save graph for future reference<{/tr}>: </font></td> ! <td><input type=checkbox name="displaygraphs[<{$host_name}>][<{$service}>][<{$metric}>][save_graph]" value="<{$metricarray.save_graph}>"></td> <td align=right><font face="Arial, Helvetica" size=2><nobr> <{tr}>Save with Title<{/tr}>: ! <input type="text" name="displaygraphs[<{$host_name}>][<{$service}>][<{$metric}>][graph_name]" value="<{$metricarray.graph_name}>" size=40 maxlength=80> </font></td> </tr> |
From: Florian G. <re...@us...> - 2006-09-14 14:02:10
|
Update of /cvsroot/perfparse/_perfparse-phpgui In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5652 Modified Files: perfparse.php utils.php Log Message: graph page works half - with some debug enabled Index: utils.php =================================================================== RCS file: /cvsroot/perfparse/_perfparse-phpgui/utils.php,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** utils.php 13 Sep 2006 20:30:03 -0000 1.25 --- utils.php 14 Sep 2006 14:02:06 -0000 1.26 *************** *** 153,156 **** --- 153,170 ---- } + function get_metric_props(&$db,$metricId) { + $query ='SELECT s.service_id, s.service_description, m.metric_id, m.metric, '; + $query.='m.unit, m.notes, m.value_max, m.value_min, h.host_id, h.host_name FROM '; + $query.='perfdata_service_metric m, perfdata_service s, perfdata_host h '; + $query.='WHERE h.host_id=s.host_id AND s.service_id=m.service_id '; + $query.='AND m.metric_id=?'; + $ret=$db->GetRow($query,array($metricId)); + if(!$ret) { + echo $db->ErrorMsg(); + } + return($ret); + } + + function have_service_metric(&$db,$host,$service,$metric) { $where=array(); *************** *** 212,222 **** } - function get_metric_props(&$db,$host,$service,$metric) { - $query ='SELECT value_max, value_min, unit FROM perfdata_service_metric WHERE host_name = ? '; - $query.='AND service_description = ? AND metric = ?'; - $ret=$db->GetRow($query,array($host,$service,$metric)); - return($ret); - } - function get_groups(&$db) { $query ='SELECT group_name from perfdata_host_group'; --- 226,229 ---- Index: perfparse.php =================================================================== RCS file: /cvsroot/perfparse/_perfparse-phpgui/perfparse.php,v retrieving revision 1.35 retrieving revision 1.36 diff -C2 -d -r1.35 -r1.36 *** perfparse.php 14 Sep 2006 09:15:29 -0000 1.35 --- perfparse.php 14 Sep 2006 14:02:06 -0000 1.36 *************** *** 214,229 **** if(get_request_var('graphs','array')) { ! // echo "<pre>\ngraphs from Request:\n";print_r($graphs); echo "</pre>"; ! foreach($graphs as $host_name => $hostarray) { ! foreach($hostarray as $service => $servicearray) { ! foreach($servicearray as $metric => $metricarray) { ! if(have_service_metric($db,$host_name,$service,$metric)>0) { $numgraphs++; // build a array that holds all information. // make code better readable ! $actgraph=&$graphs[$host_name][$service][$metric]; // make code better readable ! ! $tmparr=get_metric_props($db,$host_name,$service,$metric); $actgraph['value_max']=$tmparr['value_max']; $actgraph['value_min']=$tmparr['value_min']; --- 214,238 ---- if(get_request_var('graphs','array')) { ! echo "<pre>\ngraphs from Request:\n";print_r($graphs); echo "</pre>"; ! echo "<pre>\nRequest:\n";print_r($_REQUEST); echo "</pre>"; ! get_request_var('displaygraphs','array'); ! echo "<pre>\ndisplaygraphs from Request:\n";print_r($diaplaygraphs); echo "</pre>"; ! foreach($graphs as $metric_id => $metricarray) { ! //foreach($hostarray as $service => $servicearray) { ! // foreach($servicearray as $metric => $metricarray) { ! $tmparr=get_metric_props($db,$metric_id); ! if($tmparr!=FALSE) { ! echo "<pre>tmparr:\n";print_r($tmparr);echo "</pre>"; $numgraphs++; // build a array that holds all information. + $host_name=$tmparr['host_name']; + $service=$tmparr['service_description']; + $metric=$tmparr['metric']; + if (!isset($displaygraphs[$host_name][$service][$metric]) { + $displaygraphs[$host_name][$service][$metric]=array(); + } // make code better readable ! $actgraph=&$displaygraphs[$host_name][$service][$metric]; $actgraph['value_max']=$tmparr['value_max']; $actgraph['value_min']=$tmparr['value_min']; *************** *** 233,238 **** $actgraph['id']=$id; $deftitle='Host \''.$host_name.'\' Service \''.$service.'\' Metric \''.$metric.'\''; ! $actgraph['title']= ! 'Host \''.$host_name.'\' Service \''.$service.'\' Metric \''.$metric.'\''; // get_request_var(variable, type, default value) // check_setdefault(variable, type, default value) --- 242,246 ---- $actgraph['id']=$id; $deftitle='Host \''.$host_name.'\' Service \''.$service.'\' Metric \''.$metric.'\''; ! $actgraph['title']=$deftitle; // get_request_var(variable, type, default value) // check_setdefault(variable, type, default value) *************** *** 323,337 **** } else { // if(have_service_metric ... // should we write a error message??? ! unset($graphs[$host_name][$service][$metric]); } } // foreach($metricarray as $metric) { ! } // foreach($servicearray as ... ! } // foreach($graphs ... } // if(get_request_var('graphs' ... ! // echo "<pre>\ngraphs:\n";print_r($graphs); echo "</pre>"; if($numgraphs>0) { $smarty->assign_by_ref('graphs',$graphs); // handle saving graph --- 331,346 ---- } else { // if(have_service_metric ... // should we write a error message??? ! unset($graphs[$metric_id]); } } // foreach($metricarray as $metric) { ! // } // foreach($servicearray as ... ! // } // foreach($graphs ... } // if(get_request_var('graphs' ... ! echo "<pre>\ndisplaygraphs:\n";print_r($displaygraphs); echo "</pre>"; if($numgraphs>0) { $smarty->assign_by_ref('graphs',$graphs); + $smarty->assign_by_ref('displaygraphs',$displaygraphs); // handle saving graph |
From: Florian G. <re...@us...> - 2006-09-14 09:15:33
|
Update of /cvsroot/perfparse/_perfparse-phpgui/templates In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13810/templates Modified Files: select_host.tpl.html select_metric.tpl.html Log Message: made js clickboxes work again. simplified parameter handover to next screen. Index: select_host.tpl.html =================================================================== RCS file: /cvsroot/perfparse/_perfparse-phpgui/templates/select_host.tpl.html,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** select_host.tpl.html 13 Sep 2006 10:14:51 -0000 1.7 --- select_host.tpl.html 14 Sep 2006 09:15:29 -0000 1.8 *************** *** 24,28 **** els = document.getElementsByTagName("input"); for(i = 0; i < els.length; ++i) { ! if(els[i].type == "checkbox" && els[i].name == "host_name[]" && els[i].id == hgr ) { if(edsw.checked) { // els[i].disabled = true; --- 24,28 ---- els = document.getElementsByTagName("input"); for(i = 0; i < els.length; ++i) { ! if(els[i].type == "checkbox" && els[i].name == "host_id[]" && els[i].id == hgr ) { if(edsw.checked) { // els[i].disabled = true; Index: select_metric.tpl.html =================================================================== RCS file: /cvsroot/perfparse/_perfparse-phpgui/templates/select_metric.tpl.html,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** select_metric.tpl.html 13 Sep 2006 20:30:03 -0000 1.8 --- select_metric.tpl.html 14 Sep 2006 09:15:29 -0000 1.9 *************** *** 72,76 **** <{if $metricid != "service_description"}> <td><font face="Arial, Helvetica" size=2> ! <input type="checkbox" name="graphs[<{$hostid}>][<{$serviceid}>][<{$metricid}>][display]" value="true" id="<{$serviceid}>_<{$metricid}>" onclick="javascript:UncheckMetricSwitch(this,'all_<{$serviceid}>_<{$mmetricid}>')"/><{$metricname}> </td> <{/if}> --- 72,76 ---- <{if $metricid != "service_description"}> <td><font face="Arial, Helvetica" size=2> ! <input type="checkbox" name="graphs[<{$metricid}>][display]" value="true" id="<{$metric.service_description}>_<{$metricname}>" onclick="javascript:UncheckMetricSwitch(this,'all_<{$metric.service_description}>_<{$metricname}>')"/><{$metricname}> </td> <{/if}> *************** *** 89,105 **** <fieldset><legend><b><{tr}>Select common metrics for all Hosts<{/tr}></legend> <table width="100%" border=0 cellpadding=0 cellspacing=0> ! <{foreach from=$diffmetrics key=serviceid item=metric}> <tr> <td align=center> ! <font face="Arial, Helvetica" size=2><b><{tr}>Service<{/tr}>:</b> <{$metric.service_description}></font> <table width="100%" border=1 cellpadding=5 cellspacing=0 bgcolor="#FFFFFF"> <tr> <{foreach from=$metric key=n item=m}> - <{if $n != "service_description"}> <td><font face="Arial, Helvetica" size=2> ! <input type="checkbox" name="all" id="all_<{$serviceid}>_<{$n}>" value="true" onclick="javascript:CheckAllMetrics(this,'<{$serviceid}>_<{$n}>')" /><{$m.metric_name}> (<{$m.count}> <{tr}>Hosts<{/tr}>) </td> - <{/if}> <{/foreach}> </tr></table> --- 89,103 ---- <fieldset><legend><b><{tr}>Select common metrics for all Hosts<{/tr}></legend> <table width="100%" border=0 cellpadding=0 cellspacing=0> ! <{foreach from=$diffmetrics key=service item=metric}> <tr> <td align=center> ! <font face="Arial, Helvetica" size=2><b><{tr}>Service<{/tr}>:</b> <{$service}></font> <table width="100%" border=1 cellpadding=5 cellspacing=0 bgcolor="#FFFFFF"> <tr> <{foreach from=$metric key=n item=m}> <td><font face="Arial, Helvetica" size=2> ! <input type="checkbox" name="all" id="all_<{$service}>_<{$n}>" value="true" onclick="javascript:CheckAllMetrics(this,'<{$service}>_<{$n}>')" /><{$n}> (<{$m.count}> <{tr}>Hosts<{/tr}>) </td> <{/foreach}> </tr></table> |
From: Florian G. <re...@us...> - 2006-09-14 09:15:33
|
Update of /cvsroot/perfparse/_perfparse-phpgui In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13810 Modified Files: perfparse.php Log Message: made js clickboxes work again. simplified parameter handover to next screen. Index: perfparse.php =================================================================== RCS file: /cvsroot/perfparse/_perfparse-phpgui/perfparse.php,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -d -r1.34 -r1.35 *** perfparse.php 13 Sep 2006 20:30:03 -0000 1.34 --- perfparse.php 14 Sep 2006 09:15:29 -0000 1.35 *************** *** 183,192 **** foreach($metrics as $hostId => $servicearray) { foreach($servicearray as $serviceid => $metricarray) { ! $diffmetrics[$serviceid]['service_description']=$metricarray['service_description']; foreach($metricarray as $metricid=>$metric ) { if($metricid != 'service_description'){ ! $diffmetrics[$serviceid][$metricid]["hosts"][$hostId]=$hidnames[$hostId]; ! $diffmetrics[$serviceid][$metricid]["metric_name"]=$metric; ! $diffmetrics[$serviceid][$metricid]["count"]=count($diffmetrics[$serviceid][$metricid]["hosts"]); } } --- 183,193 ---- foreach($metrics as $hostId => $servicearray) { foreach($servicearray as $serviceid => $metricarray) { ! $service_description=$metricarray['service_description']; ! //$diffmetrics[$service_description]['service_id']=$serviceid; foreach($metricarray as $metricid=>$metric ) { if($metricid != 'service_description'){ ! // $diffmetrics[$service_description][$metric]["hosts"][$hostId]=$hidnames[$hostId]; ! $diffmetrics[$service_description][$metric]["metric_ids"][]=$metricid; ! $diffmetrics[$service_description][$metric]["count"]=count($diffmetrics[$service_description][$metric]["metric_ids"]); } } |
From: Florian G. <re...@us...> - 2006-09-13 20:30:08
|
Update of /cvsroot/perfparse/_perfparse-phpgui In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12600 Modified Files: perfparse.php utils.php Log Message: select_metric input mask finished rework Index: utils.php =================================================================== RCS file: /cvsroot/perfparse/_perfparse-phpgui/utils.php,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** utils.php 13 Sep 2006 15:22:36 -0000 1.24 --- utils.php 13 Sep 2006 20:30:03 -0000 1.25 *************** *** 129,133 **** $query='SELECT host_id,host_name FROM perfdata_host '; $query.='WHERE host_id in ('.str_repeat('?,',$n_hids-1).'?)'; ! echo $query; //debug $ret=$db->GetAssoc($query,$hostId); return($ret); --- 129,133 ---- $query='SELECT host_id,host_name FROM perfdata_host '; $query.='WHERE host_id in ('.str_repeat('?,',$n_hids-1).'?)'; ! // echo $query; //debug $ret=$db->GetAssoc($query,$hostId); return($ret); *************** *** 194,198 **** function get_metrics_from_hostid(&$db,$host_id) { ! $query ='SELECT s.service_description,m.metric FROM '; $query.='perfdata_service_metric m, perfdata_service s '; $query.='WHERE s.service_id=m.service_id AND s.host_id=? '; --- 194,199 ---- function get_metrics_from_hostid(&$db,$host_id) { ! $query ='SELECT s.service_description, s.service_id, '; ! $query.='m.metric, m.metric_id FROM '; $query.='perfdata_service_metric m, perfdata_service s '; $query.='WHERE s.service_id=m.service_id AND s.host_id=? '; *************** *** 202,206 **** if($res) { while($t=$res->FetchRow()) { ! $ret[$t['service_description']][]=$t['metric']; } } else { --- 203,208 ---- if($res) { while($t=$res->FetchRow()) { ! $ret[$t['service_id']][$t['metric_id']]=$t['metric']; ! $ret[$t['service_id']]['service_description']=$t['service_description']; } } else { Index: perfparse.php =================================================================== RCS file: /cvsroot/perfparse/_perfparse-phpgui/perfparse.php,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -d -r1.33 -r1.34 *** perfparse.php 13 Sep 2006 15:22:36 -0000 1.33 --- perfparse.php 13 Sep 2006 20:30:03 -0000 1.34 *************** *** 54,58 **** // php-perfparse version ! $smarty->assign('version','perfparse 0.106.1 php-perfparse v.04'); // Parse perfparse.conf to get database variables --- 54,58 ---- // php-perfparse version ! $smarty->assign('version','perfparse 0.106.1 php-perfparse v.05'); // Parse perfparse.conf to get database variables *************** *** 173,192 **** $hidnames=get_hostname_from_id($db,$host_id); ! echo "<pre>metrics:\n"; print_r($metrics); echo "</pre>"; ! echo "<pre>hidnames:\n"; print_r($hidnames); echo "</pre>"; $smarty->assign_by_ref('metrics',$metrics); // find all metrics that more than one host own // used for selecting all metrics of a type via js $diffmetrics=array(); foreach($metrics as $hostId => $servicearray) { ! foreach($servicearray as $service => $metricarray) { ! foreach($metricarray as $metric ) { ! $diffmetrics[$service][$metric]["hostids"][]=$hostId; ! $diffmetrics[$service][$metric]["count"]=count($diffmetrics[$service][$metric]["hostids"]); } } } ! echo "diffmetrics array:<br /><pre>"; print_r($diffmetrics); echo "</pre>"; $smarty->assign_by_ref('diffmetrics',$diffmetrics); --- 173,197 ---- $hidnames=get_hostname_from_id($db,$host_id); ! // echo "<pre>metrics:\n"; print_r($metrics); echo "</pre>"; ! // echo "<pre>hidnames:\n"; print_r($hidnames); echo "</pre>"; $smarty->assign_by_ref('metrics',$metrics); + $smarty->assign_by_ref('hidnames',$hidnames); // find all metrics that more than one host own // used for selecting all metrics of a type via js $diffmetrics=array(); foreach($metrics as $hostId => $servicearray) { ! foreach($servicearray as $serviceid => $metricarray) { ! $diffmetrics[$serviceid]['service_description']=$metricarray['service_description']; ! foreach($metricarray as $metricid=>$metric ) { ! if($metricid != 'service_description'){ ! $diffmetrics[$serviceid][$metricid]["hosts"][$hostId]=$hidnames[$hostId]; ! $diffmetrics[$serviceid][$metricid]["metric_name"]=$metric; ! $diffmetrics[$serviceid][$metricid]["count"]=count($diffmetrics[$serviceid][$metricid]["hosts"]); ! } } } } ! // echo "diffmetrics array:<br /><pre>"; print_r($diffmetrics); echo "</pre>"; $smarty->assign_by_ref('diffmetrics',$diffmetrics); |
From: Florian G. <re...@us...> - 2006-09-13 20:30:07
|
Update of /cvsroot/perfparse/_perfparse-phpgui/templates In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12600/templates Modified Files: select_metric.tpl.html Log Message: select_metric input mask finished rework Index: select_metric.tpl.html =================================================================== RCS file: /cvsroot/perfparse/_perfparse-phpgui/templates/select_metric.tpl.html,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** select_metric.tpl.html 8 Apr 2006 23:59:47 -0000 1.7 --- select_metric.tpl.html 13 Sep 2006 20:30:03 -0000 1.8 *************** *** 44,48 **** <td align=center><font face="Arial, Helvetica" size=2> <b><{tr}>Select Metric to Graph for host(s)<{/tr}>:<br> ! <{foreach from=$host_name key=n item=host}> '<{$host}>' <{/foreach}> --- 44,48 ---- <td align=center><font face="Arial, Helvetica" size=2> <b><{tr}>Select Metric to Graph for host(s)<{/tr}>:<br> ! <{foreach from=$hidnames key=n item=host}> '<{$host}>' <{/foreach}> *************** *** 59,76 **** <form action="perfparse.php?page=graph" method="POST"> <tr><td><input type="submit" value="<{tr}>submit<{/tr}>"></td></tr> ! <{foreach from=$host_name key=n item=host}> <tr><td> <fieldset><legend><b><{tr}>Host<{/tr}>:</b> <{$host}></legend> <table width="100%" border=0 cellpadding=0 cellspacing=0> ! <{foreach from=$metrics[$host] key=service item=metric}> <tr> <td align=center> ! <font face="Arial, Helvetica" size=2><b><{tr}>Service<{/tr}>:</b> <{$service}></font> <table width="100%" border=1 cellpadding=5 cellspacing=0 bgcolor="#FFFFFF"> <tr> ! <{foreach from=$metric key=n item=m}> <td><font face="Arial, Helvetica" size=2> ! <input type="checkbox" name="graphs[<{$host}>][<{$service}>][<{$m}>][display]" value="true" id="<{$service}>_<{$m}>" onclick="javascript:UncheckMetricSwitch(this,'all_<{$service}>_<{$m}>')"/><{$m}> </td> <{/foreach}> </tr></table> --- 59,78 ---- <form action="perfparse.php?page=graph" method="POST"> <tr><td><input type="submit" value="<{tr}>submit<{/tr}>"></td></tr> ! <{foreach from=$hidnames key=hostid item=host}> <tr><td> <fieldset><legend><b><{tr}>Host<{/tr}>:</b> <{$host}></legend> <table width="100%" border=0 cellpadding=0 cellspacing=0> ! <{foreach from=$metrics[$hostid] key=serviceid item=metric}> <tr> <td align=center> ! <font face="Arial, Helvetica" size=2><b><{tr}>Service<{/tr}>:</b> <{$metric.service_description}></font> <table width="100%" border=1 cellpadding=5 cellspacing=0 bgcolor="#FFFFFF"> <tr> ! <{foreach from=$metric key=metricid item=metricname}> ! <{if $metricid != "service_description"}> <td><font face="Arial, Helvetica" size=2> ! <input type="checkbox" name="graphs[<{$hostid}>][<{$serviceid}>][<{$metricid}>][display]" value="true" id="<{$serviceid}>_<{$metricid}>" onclick="javascript:UncheckMetricSwitch(this,'all_<{$serviceid}>_<{$mmetricid}>')"/><{$metricname}> </td> + <{/if}> <{/foreach}> </tr></table> *************** *** 87,101 **** <fieldset><legend><b><{tr}>Select common metrics for all Hosts<{/tr}></legend> <table width="100%" border=0 cellpadding=0 cellspacing=0> ! <{foreach from=$diffmetrics key=service item=metric}> <tr> <td align=center> ! <font face="Arial, Helvetica" size=2><b><{tr}>Service<{/tr}>:</b> <{$service}></font> <table width="100%" border=1 cellpadding=5 cellspacing=0 bgcolor="#FFFFFF"> <tr> <{foreach from=$metric key=n item=m}> <td><font face="Arial, Helvetica" size=2> ! <input type="checkbox" name="all" id="all_<{$service}>_<{$n}>" value="true" onclick="javascript:CheckAllMetrics(this,'<{$service}>_<{$n}>')" /><{$n}> (<{$m.count}> <{tr}>Hosts<{/tr}>) </td> <{/foreach}> </tr></table> --- 89,105 ---- <fieldset><legend><b><{tr}>Select common metrics for all Hosts<{/tr}></legend> <table width="100%" border=0 cellpadding=0 cellspacing=0> ! <{foreach from=$diffmetrics key=serviceid item=metric}> <tr> <td align=center> ! <font face="Arial, Helvetica" size=2><b><{tr}>Service<{/tr}>:</b> <{$metric.service_description}></font> <table width="100%" border=1 cellpadding=5 cellspacing=0 bgcolor="#FFFFFF"> <tr> <{foreach from=$metric key=n item=m}> + <{if $n != "service_description"}> <td><font face="Arial, Helvetica" size=2> ! <input type="checkbox" name="all" id="all_<{$serviceid}>_<{$n}>" value="true" onclick="javascript:CheckAllMetrics(this,'<{$serviceid}>_<{$n}>')" /><{$m.metric_name}> (<{$m.count}> <{tr}>Hosts<{/tr}>) </td> + <{/if}> <{/foreach}> </tr></table> |
From: Florian G. <re...@us...> - 2006-09-13 15:22:38
|
Update of /cvsroot/perfparse/_perfparse-phpgui In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22960/phpgui Modified Files: perfparse.php utils.php Log Message: some changes with debug enabled ... in the middle of some work :-) Index: utils.php =================================================================== RCS file: /cvsroot/perfparse/_perfparse-phpgui/utils.php,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** utils.php 13 Sep 2006 10:14:51 -0000 1.23 --- utils.php 13 Sep 2006 15:22:36 -0000 1.24 *************** *** 118,121 **** --- 118,138 ---- } + function get_hostname_from_id(&$db,$hostId) { + // return a array with hostnames and ids + if(!is_array($hostId)) { + $hostId=array($hostId); + } + $n_hids=count($hostId); + if($n_hids==0) { + return(array()); + } + $query='SELECT host_id,host_name FROM perfdata_host '; + $query.='WHERE host_id in ('.str_repeat('?,',$n_hids-1).'?)'; + echo $query; //debug + $ret=$db->GetAssoc($query,$hostId); + return($ret); + } + + function have_host(&$db,$host) { $query='SELECT count(*) FROM perfdata_host where host_name=?'; Index: perfparse.php =================================================================== RCS file: /cvsroot/perfparse/_perfparse-phpgui/perfparse.php,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** perfparse.php 13 Sep 2006 10:14:51 -0000 1.32 --- perfparse.php 13 Sep 2006 15:22:36 -0000 1.33 *************** *** 170,174 **** } ! // echo "<pre>"; print_r($metrics); echo "</pre>"; $smarty->assign_by_ref('metrics',$metrics); --- 170,178 ---- } ! // get hostnames ! $hidnames=get_hostname_from_id($db,$host_id); ! ! echo "<pre>metrics:\n"; print_r($metrics); echo "</pre>"; ! echo "<pre>hidnames:\n"; print_r($hidnames); echo "</pre>"; $smarty->assign_by_ref('metrics',$metrics); |
From: Florian G. <re...@us...> - 2006-09-13 10:15:00
|
Update of /cvsroot/perfparse/_perfparse-phpgui/templates In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19708/phpgui/templates Modified Files: select_host.tpl.html Log Message: rework phpui for new db schema ongoing Index: select_host.tpl.html =================================================================== RCS file: /cvsroot/perfparse/_perfparse-phpgui/templates/select_host.tpl.html,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** select_host.tpl.html 8 Apr 2006 23:59:47 -0000 1.6 --- select_host.tpl.html 13 Sep 2006 10:14:51 -0000 1.7 *************** *** 61,66 **** <fieldset><legend><b><{tr}>Group<{/tr}>:</b> <{$group}></legend> <input type="checkbox" id="EnaDis<{$group}>" onclick="javascript:EnableDisableHostgroup(this,'<{$group}>')"><b><{tr}>All hosts of group<{/tr}>:</b> <{$group}><br /> ! <{foreach from=$hostarray item=host}> ! <nobr><input type="checkbox" name="host_name[]" id="<{$group}>" value="<{$host}>" onclick="javascript:UncheckHostgroupSwitch(this,'<{$group}>')" ><{$host}></nobr> <{/foreach}> </fieldset> --- 61,66 ---- <fieldset><legend><b><{tr}>Group<{/tr}>:</b> <{$group}></legend> <input type="checkbox" id="EnaDis<{$group}>" onclick="javascript:EnableDisableHostgroup(this,'<{$group}>')"><b><{tr}>All hosts of group<{/tr}>:</b> <{$group}><br /> ! <{foreach from=$hostarray key=host_id item=host}> ! <nobr><input type="checkbox" name="host_id[]" id="<{$group}>" value="<{$host_id}>" onclick="javascript:UncheckHostgroupSwitch(this,'<{$group}>')" ><{$host}></nobr> <{/foreach}> </fieldset> |
From: Florian G. <re...@us...> - 2006-09-13 10:14:55
|
Update of /cvsroot/perfparse/_perfparse-phpgui In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19708/phpgui Modified Files: README.perfparse_phpui perfparse.php utils.php Log Message: rework phpui for new db schema ongoing Index: utils.php =================================================================== RCS file: /cvsroot/perfparse/_perfparse-phpgui/utils.php,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** utils.php 12 Sep 2006 15:30:49 -0000 1.22 --- utils.php 13 Sep 2006 10:14:51 -0000 1.23 *************** *** 100,104 **** function get_hosts(&$db) { ! $query='SELECT h.host_name, g.group_name FROM perfdata_host h LEFT JOIN perfdata_host_groups hg ON h.host_id=hg.host_id LEFT JOIN perfdata_groups g ON g.group_id=hg.group_id --- 100,104 ---- function get_hosts(&$db) { ! $query='SELECT h.host_name, g.group_name, h.host_id FROM perfdata_host h LEFT JOIN perfdata_host_groups hg ON h.host_id=hg.host_id LEFT JOIN perfdata_groups g ON g.group_id=hg.group_id *************** *** 109,115 **** while($t=$res->FetchRow()) { if($t['group_name'] == '') { ! $t['group_name'] = 'Unassigned'; } ! $ret[$t['group_name']][]=$t['host_name']; } } --- 109,115 ---- while($t=$res->FetchRow()) { if($t['group_name'] == '') { ! $t['group_name'] = 'Unassigned'; } ! $ret[$t['group_name']][$t['host_id']]=$t['host_name']; } } *************** *** 124,127 **** --- 124,133 ---- } + function have_host_id(&$db,$hostID) { + $query='SELECT count(*) FROM perfdata_host where host_id=?'; + $ret=$db->GetOne($query,array($hostID)); + return($ret); + } + function have_group(&$db,$group) { $query='SELECT count(*) FROM perfdata_groups where group_name=?'; *************** *** 170,177 **** // mark: continue here ! function get_metrics(&$db,$host) { ! $query ='SELECT service_description,metric FROM perfdata_service_metric '; ! $query.='WHERE host_name=? order by service_description, metric'; ! $res=$db->Execute($query,array($host)); $ret=array(); if($res) { --- 176,185 ---- // mark: continue here ! function get_metrics_from_hostid(&$db,$host_id) { ! $query ='SELECT s.service_description,m.metric FROM '; ! $query.='perfdata_service_metric m, perfdata_service s '; ! $query.='WHERE s.service_id=m.service_id AND s.host_id=? '; ! $query.='order by s.service_description, m.metric'; ! $res=$db->Execute($query,array($host_id)); $ret=array(); if($res) { Index: perfparse.php =================================================================== RCS file: /cvsroot/perfparse/_perfparse-phpgui/perfparse.php,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** perfparse.php 12 Sep 2006 15:30:49 -0000 1.31 --- perfparse.php 13 Sep 2006 10:14:51 -0000 1.32 *************** *** 144,154 **** // display the page $smarty->display($config['PHP_Style'].'select_host.tpl.html'); ! // print_r($hosts); // for debug break; case 'select_metric': // get host array ! get_request_var('host_name','array'); ! $numhosts=count($host_name); $smarty->assign('numhosts',$numhosts); --- 144,154 ---- // display the page $smarty->display($config['PHP_Style'].'select_host.tpl.html'); ! // echo "<pre>"; print_r($hosts); echo "</pre>";// for debug break; case 'select_metric': // get host array ! get_request_var('host_id','array'); ! $numhosts=count($host_id); $smarty->assign('numhosts',$numhosts); *************** *** 160,176 **** } ! foreach($host_name as $host) { ! if(!have_host($db,$host)) { ! $smarty->assign('message','Unknown Hostname'); $smarty->display($config['PHP_Style'].'error.tpl.html'); die(); } // get metrics and save them in a array ! $metrics[$host]=get_metrics($db,$host); } ! // echo "<pre>"; ! // print_r($metrics); ! // echo "</pre>"; $smarty->assign_by_ref('metrics',$metrics); --- 160,174 ---- } ! foreach($host_id as $hostId) { ! if(!have_host_id($db,$hostId)) { ! $smarty->assign('message','Unknown Host ID '.$hostId); $smarty->display($config['PHP_Style'].'error.tpl.html'); die(); } // get metrics and save them in a array ! $metrics[$hostId]=get_metrics_from_hostid($db,$hostId); } ! // echo "<pre>"; print_r($metrics); echo "</pre>"; $smarty->assign_by_ref('metrics',$metrics); *************** *** 178,192 **** // used for selecting all metrics of a type via js $diffmetrics=array(); ! foreach($metrics as $host => $servicearray) { foreach($servicearray as $service => $metricarray) { foreach($metricarray as $metric ) { ! $diffmetrics[$service][$metric]["hosts"][]=$host; ! $diffmetrics[$service][$metric]["count"]=count($diffmetrics[$service][$metric]["hosts"]); } } } ! // echo "<pre>"; ! // print_r($diffmetrics); ! // echo "</pre>"; $smarty->assign_by_ref('diffmetrics',$diffmetrics); --- 176,188 ---- // used for selecting all metrics of a type via js $diffmetrics=array(); ! foreach($metrics as $hostId => $servicearray) { foreach($servicearray as $service => $metricarray) { foreach($metricarray as $metric ) { ! $diffmetrics[$service][$metric]["hostids"][]=$hostId; ! $diffmetrics[$service][$metric]["count"]=count($diffmetrics[$service][$metric]["hostids"]); } } } ! echo "diffmetrics array:<br /><pre>"; print_r($diffmetrics); echo "</pre>"; $smarty->assign_by_ref('diffmetrics',$diffmetrics); Index: README.perfparse_phpui =================================================================== RCS file: /cvsroot/perfparse/_perfparse-phpgui/README.perfparse_phpui,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** README.perfparse_phpui 8 Apr 2006 23:59:47 -0000 1.3 --- README.perfparse_phpui 13 Sep 2006 10:14:51 -0000 1.4 *************** *** 24,29 **** If you want to install the ui manually: ! Unpack all in your /usr/local/nagios/share folder. Then make the templates_c ! folder writable for your apache. Example: chgrp www templates_c --- 24,29 ---- If you want to install the ui manually: ! Unpack all in your /usr/local/nagios/share/phpui folder. Then make the ! templates_c folder writable for your apache. Example: chgrp www templates_c *************** *** 32,36 **** -- Configuration -- ! Edit the ../etc/perfparse.cfg and add to your Database configurateion the Database Type (example): DB_Type="mysql" --- 32,36 ---- -- Configuration -- ! Edit the ../../etc/perfparse.cfg and add to your Database configuration the Database Type (example): DB_Type="mysql" *************** *** 41,45 **** Note: only mysql is tested for now! ! Optional: edit the ../etc/perfparse.cfg and add PHP-GUI specific parameters: PHP_Lang = "de" --- 41,46 ---- Note: only mysql is tested for now! ! Optional: edit the ../../etc/perfparse.cfg and add PHP-GUI specific ! parameters: PHP_Lang = "de" *************** *** 49,53 **** (omit PHP_Style parameter) or the Style "flo". ! if your webserver devilvers images other than from /nagios/images, then you should add the parameter --- 50,54 ---- (omit PHP_Style parameter) or the Style "flo". ! if your webserver delivers images other than from /nagios/images, then you should add the parameter *************** *** 57,58 **** --- 58,61 ---- fl...@re... + + $Id$ |
From: Florian G. <re...@us...> - 2006-09-12 15:30:59
|
Update of /cvsroot/perfparse/_perfparse-phpgui In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9482/phpgui Modified Files: perfparse.php utils.php Log Message: moved phpui installation to another subdirectory for easier install. First changes in phpui for new table schema. Index: utils.php =================================================================== RCS file: /cvsroot/perfparse/_perfparse-phpgui/utils.php,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** utils.php 6 Sep 2006 21:58:41 -0000 1.21 --- utils.php 12 Sep 2006 15:30:49 -0000 1.22 *************** *** 100,106 **** function get_hosts(&$db) { ! $query='SELECT h.host_name, g.group_name FROM perfdata_host h, ! perfdata_groups g, perfdata_host_groups hg where ! h.host_id=gh.host_id and g.group_id=hg.group_id ORDER BY g.group_name, h.host_name'; $res=$db->Execute($query); --- 100,106 ---- function get_hosts(&$db) { ! $query='SELECT h.host_name, g.group_name FROM perfdata_host h ! LEFT JOIN perfdata_host_groups hg ON h.host_id=hg.host_id ! LEFT JOIN perfdata_groups g ON g.group_id=hg.group_id ORDER BY g.group_name, h.host_name'; $res=$db->Execute($query); *************** *** 540,545 **** function mktime_YmdHM($datestr) { $a=array(); ! if(!preg_match('/^(\d+)-(\d+)-(\d+) (\d+):(\d+)$/',$datestr,&$a)) { ! preg_match('/^(\d+)-(\d+)-(\d+) (\d+):(\d+):(\d+)$/',$datestr,&$a); // with seconds } if(!isset($a[6])) $a[6]=0; --- 540,545 ---- function mktime_YmdHM($datestr) { $a=array(); ! if(!preg_match('/^(\d+)-(\d+)-(\d+) (\d+):(\d+)$/',$datestr,$a)) { ! preg_match('/^(\d+)-(\d+)-(\d+) (\d+):(\d+):(\d+)$/',$datestr,$a); // with seconds } if(!isset($a[6])) $a[6]=0; Index: perfparse.php =================================================================== RCS file: /cvsroot/perfparse/_perfparse-phpgui/perfparse.php,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -d -r1.30 -r1.31 *** perfparse.php 7 Jul 2006 13:56:03 -0000 1.30 --- perfparse.php 12 Sep 2006 15:30:49 -0000 1.31 *************** *** 3,6 **** --- 3,8 ---- // Copyright (c) 2004,2005,2006 Florian Gleixner // Licensed under the GNU GENERAL PUBLIC LICENSE or the BSD License + // + // $Id$ // magic quotes rubbish *************** *** 24,29 **** // setup section ! $cfgfile='../etc/perfparse.cfg'; ! $nagioscfgfile='../etc/nagios.cfg'; // Compatibility functions. --- 26,31 ---- // setup section ! $cfgfile='../../etc/perfparse.cfg'; ! $nagioscfgfile='../../etc/nagios.cfg'; // Compatibility functions. *************** *** 56,60 **** // Parse perfparse.conf to get database variables ! $http_image_path="/nagios/images/"; $configfile=@file($cfgfile); --- 58,62 ---- // Parse perfparse.conf to get database variables ! $http_image_path="/nagios/perfparse/images/"; $configfile=@file($cfgfile); |
From: Florian G. <re...@us...> - 2006-09-12 15:30:59
|
Update of /cvsroot/perfparse/_perfparse In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9482 Modified Files: configure configure.ac Log Message: moved phpui installation to another subdirectory for easier install. First changes in phpui for new table schema. Index: configure.ac =================================================================== RCS file: /cvsroot/perfparse/_perfparse/configure.ac,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** configure.ac 17 Aug 2006 13:57:17 -0000 1.19 --- configure.ac 12 Sep 2006 15:30:49 -0000 1.20 *************** *** 316,320 **** AC_SUBST(cgidir) ! INST_PHPUI_PATH=${sbindir} AC_ARG_WITH(phpuidir, [ --with-phpuidir=DIR PHP webinterface dir (default=sbindir)],[ --- 316,320 ---- AC_SUBST(cgidir) ! INST_PHPUI_PATH=${prefix}/share/phpui AC_ARG_WITH(phpuidir, [ --with-phpuidir=DIR PHP webinterface dir (default=sbindir)],[ *************** *** 452,455 **** --- 452,456 ---- echo if test "0${ENABLE_CGIS}" != "0no" -o "0${ENABLE_PHPUI}" != "0no" ; then + echo "PHP interface path: ${INST_PHPUI_PATH}" echo "HTTP path for images: ${HTTP_IMAGE_PATH}" echo "Installation path for images: ${INST_IMAGE_PATH}" Index: configure =================================================================== RCS file: /cvsroot/perfparse/_perfparse/configure,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** configure 17 Aug 2006 13:57:17 -0000 1.20 --- configure 12 Sep 2006 15:30:49 -0000 1.21 *************** *** 29118,29122 **** ! INST_PHPUI_PATH=${sbindir} # Check whether --with-phpuidir or --without-phpuidir was given. --- 29118,29122 ---- ! INST_PHPUI_PATH=${prefix}/share/phpui # Check whether --with-phpuidir or --without-phpuidir was given. *************** *** 30964,30967 **** --- 30964,30968 ---- echo if test "0${ENABLE_CGIS}" != "0no" -o "0${ENABLE_PHPUI}" != "0no" ; then + echo "PHP interface path: ${INST_PHPUI_PATH}" echo "HTTP path for images: ${HTTP_IMAGE_PATH}" echo "Installation path for images: ${INST_IMAGE_PATH}" |
From: Florian G. <re...@us...> - 2006-09-06 21:58:44
|
Update of /cvsroot/perfparse/_perfparse-phpgui In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23096/phpgui Modified Files: utils.php Log Message: schema changes Index: utils.php =================================================================== RCS file: /cvsroot/perfparse/_perfparse-phpgui/utils.php,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** utils.php 7 Jul 2006 13:56:03 -0000 1.20 --- utils.php 6 Sep 2006 21:58:41 -0000 1.21 *************** *** 1,4 **** --- 1,10 ---- <?php + /* + utility functions. + + $Id$ + */ + /* function to get variables from the $_REQUEST array (GET, POST, ...) * and to fix them (if someone manipulates the forms). Therefore one can *************** *** 94,98 **** function get_hosts(&$db) { ! $query='SELECT host_name, group_name FROM perfdata_host ORDER BY group_name, host_name'; $res=$db->Execute($query); $ret=array(); --- 100,107 ---- function get_hosts(&$db) { ! $query='SELECT h.host_name, g.group_name FROM perfdata_host h, ! perfdata_groups g, perfdata_host_groups hg where ! h.host_id=gh.host_id and g.group_id=hg.group_id ! ORDER BY g.group_name, h.host_name'; $res=$db->Execute($query); $ret=array(); *************** *** 122,157 **** function have_service_metric(&$db,$host,$service,$metric) { ! $where=''; $bindvars=array(); if($host != '') { ! $where='WHERE host_name=? '; $bindvars[]=$host; } if($service != '') { ! if($where=='') { ! $where='WHERE service_description=? '; ! } else { ! $where.='and service_description=? '; ! } $bindvars[]=$service; } if($metric != '') { ! if($where=='') { ! $where='WHERE metric=? '; ! } else { ! $where.='and metric=? '; ! } $bindvars[]=$metric; } ! $query ='SELECT count(*) FROM perfdata_service_metric '.$where; $ret=$db->GetOne($query,$bindvars); return($ret); } function get_metrics(&$db,$host) { $query ='SELECT service_description,metric FROM perfdata_service_metric '; --- 131,173 ---- function have_service_metric(&$db,$host,$service,$metric) { ! $where=array(); $bindvars=array(); + $tabs=array(); + $join=''; if($host != '') { ! $tabs[]='perfdata_host h'; ! $tabs[]='perfdata_service s'; // if a host is choosed then we need the join with perfdata_service ! $join="WHERE h.host_id=s.host_id AND s.service_id=m.service_id AND"; ! $where[]='h.host_name=?'; $bindvars[]=$host; } if($service != '') { ! $tabs[]='perfdata_service s'; ! $where[]='s.service_description=?'; $bindvars[]=$service; + if($join='') { + $join="WHERE s.service_id=m.service_id AND"; + } } + // in any case we need that table + $tabs[]='perfdata_service_metric m'; if($metric != '') { ! $where[]='m.metric=?'; $bindvars[]=$metric; } + $tables=implode(', ',array_unique($tabs)); + $wherestr=implode(' AND ',$where); ! $query ='SELECT count(*) FROM '.$tables.' '.$join.' '.$where; $ret=$db->GetOne($query,$bindvars); return($ret); } + // mark: continue here + function get_metrics(&$db,$host) { $query ='SELECT service_description,metric FROM perfdata_service_metric '; |
From: Florian G. <re...@us...> - 2006-09-06 21:58:44
|
Update of /cvsroot/perfparse/_perfparse/scripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23096/scripts Modified Files: mysql_create.sql Log Message: schema changes Index: mysql_create.sql =================================================================== RCS file: /cvsroot/perfparse/_perfparse/scripts/mysql_create.sql,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** mysql_create.sql 22 Aug 2006 15:23:27 -0000 1.6 --- mysql_create.sql 6 Sep 2006 21:58:41 -0000 1.7 *************** *** 30,34 **** CREATE TABLE IF NOT EXISTS perfdata_groups ( ! group_id INT PRIMARY KEY, group_name VARCHAR(75) UNIQUE ) type=InnoDB; --- 30,34 ---- CREATE TABLE IF NOT EXISTS perfdata_groups ( ! group_id INT AUTO_INCREMENT PRIMARY KEY, group_name VARCHAR(75) UNIQUE ) type=InnoDB; |