[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bigsister-general] Graphs on W2K


Check this bug report/fix:
http://sourceforge.net/tracker/index.php?func=detail&aid=1020336&group_id=14120&atid=114120
I have not tested this fix myself, saw after I made my own fix.

Here is the code that works for me on Win2003, just replace from $| = 1; 
to just before sub unavailable
(I had to give the IUSR  full controll to the /bigsis/tmp directory)

$| = 1;
    print "Pragma: no-cache\n";
    print "Cache-control: no-cache\n";
    print "Content-Type: image/$format\n";
    print "X-rrrdtool:";

    my $tmp;
    if( $Platform::has_fork ) {
    open( _GRAPH, "-|" );
    $rrd->rrd_graph( "-", @args );
    }
    else {
    $tmp = "/bigsis/tmp/graph.$$";
   
    $rrd->rrd_graph( Platform::filepath( $tmp ), @args );
    open( _GRAPH, "<$tmp" );
    }
    # binmode will fail if using FCGI;
    eval {
    binmode STDOUT;
    };
    binmode _GRAPH;
    while( <_GRAPH> ) { print; }
    close _GRAPH;
    unlink $tmp if( $tmp );
}



Geir

Robert W. Kramer III wrote:
> I am running Big Sister monitor, agent and server on W2k Advanced Server.
> I've found several problems with a Windows setup of BS.
>
> For one thing, I run my all of my web pages from the D: on this box. The
> pre-compiled version assumes everything is being ran from the C: and this
> doesn't work for me, so I downloaded the source code for BS and compiled it
> on my laptop using CYGWIN. I still had to make some changes manually. For
> example, all of the cgi/ scripts could not find the bigsister/common.pm
> include. I had to change the paths in these files to
> D:/inetpub/www.mydomain.com/bs.
>
> Also had a problem with the scripts in the /cgi folder. IIS doesn't appear
> to have a way to map a document without specifying a file extension. The
> easiest way to overcome this was to just rename all the /cgi/ scripts so
> they ended with .cgi and then configure IIS to map those extensions to perl
> as usual. Of course, this required me to make some changes to the html
> template for the skin I am using. This all seems to work.
>
> At this point, when I click on the little graph icon to view a host's graph,
> I see a form with a list of available graphs and time period columns to
> choose from. I've tried every combination possible, but when I click the
> View button I get a page that lists the host name at the top, followed by a
> form to select the time period and zoom factor - but only a small image icon
> with a red "x". The graph does not appear. This form seems to use the
> bsgraph script.
>
> Another method used the bshistgraph script. This one is used when you click
> the ">>" arrows at the end of the graph form. When I click on these ">>"
> arrows I get a page that allows me to specify a date range. The default
> dates are the apparent beginning date and time I started monitoring with BS
> to the current date and time. So I click the Ok button. What I see next is a
> page that allows quite a few settings to be made. There are 3 sections on
> the page. Chart, Options and Data Export. Clicking either of the two Display
> buttons simply reloads the page. The CSV Download button at the bottom
> initiates a download, but the resulting file (loaded in MS Excel) is blank.
>
> There are no errors generated, nor is there any graphic icon with a red "x"
> on it. The title of this page appears correct - "Char for 10.10.20.169: Ping
> Package Loss". I suspect the graph is supposed to be showing on this page
> along with the optional settings, but there is no graph.
>
> Yet, there is data:
>
>   www/graphs/ fills up with .html files for each host I monitor.
>   var/graphs/ files up with .graph and .rrd files for each host I monitor.
> The .rrd files are updated frequently.
>
> After viewing bshistgraph source code it appeared that the hostid routine
> wanted a database. So I configured db.cfg as per BS docs. Once I did this
> and restarted BS daemons I see that the bsmondb/ folder I created has 3
> files in it: host, perfinfo and variable. All thress of these files have
> what appears to be legit data. The perfinfo file gets updated frequently.
>
> I installed the RRDs.pm using PPM. (We use ActiveState Perl, 5.8). When
> graphs didn't display I decided to uninstall the RRDs perl module and place
> rrdtool.exe in my path. Restarted all BS daemons and the results were the
> same. I tried running both the perl module and the rrdtool.exe. Same
> results.
>
> By all counts, BS is monitoring my hosts and writing the data correctly, but
> no graphs are being created.
>
> I don't know how to test RRD to know if it's working correctly - I have no
> sample data/script, but nothing errors out.
>
> I'm excited and anxous about using BS, but the lack of the graphs means it's
> broke for us and I've exhausted myself to find a reason for it. Can anyone
> please help me figure out what isn't right?
>
> Bob
>
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys - and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> Bigsister-general mailing list
> suppressed
> https://lists.sourceforge.net/lists/listinfo/bigsister-general
>   

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Bigsister-general mailing list
suppressed
https://lists.sourceforge.net/lists/listinfo/bigsister-general


Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.