<div dir="ltr">I think work would need to be done to integrate with rrdcached.<div><br></div><div>The RRD stats are cached by xymond_rrd.  The showgraph.cgi binary sends a flush command to the xymond_rrd instances, via UNIX sockets, requesting a cache flush, so that graphs are up-to-date.  You could probably emulate this by running showgraph.cgi from the command-line.  Like so:</div>

<div><br></div><div>SCRIPT_NAME=showgraph.sh REQUEST_METHOD=GET QUERY_STRING="host=<a href="http://hostname.example.com">hostname.example.com</a>&service=conn" /usr/lib/xymon/server/bin/showgraph.cgi >/dev/null<br>

</div><div><br></div><div>In this case, the "conn" is not used for anything (all RRD files are flushed), but has to be a (I think) valid RRD filename (without the extension) or graph name (defined in graphs.cfg).</div>

<div><br></div><div>Also, if you can send a string directly to the two UNIX sockets, you can cause a flush.  The format is simply the hostname in slashes, like "/<a href="http://hostname.example.com">hostname.example.com</a>" and so you can probably achieve this using modern versions netcat or socat, or other things that can write to sockets.</div>

<div><br></div><div>And just for fun, here's an implementation in Perl.</div><div><br></div><div>Cheers</div><div>Jeremy</div><div><br></div><div><div>#!/usr/bin/perl -Tw</div><div><br></div><div>my $hostname=shift;</div>

<div>die "Specify hostname\n" unless defined($hostname);</div><div><br></div><div>my $socketdir=$ENV{XYMONTMP};</div><div>die "XYMONTMP not defined, run from xymoncmd\n" unless $socketdir;</div><div><br>

</div><div>use Socket;</div><div>socket(SOCK, AF_UNIX, SOCK_DGRAM, 0)  or die "socket: $!\n";</div><div>use Fcntl qw(F_GETFL F_SETFL O_NONBLOCK);</div><div>my $flags = fcntl(SOCK, F_SETFL, O_NONBLOCK) or die "fcntl: $!\n";</div>

<div><br></div><div>opendir(DIR,$socketdir) or die "$!: $socketdir\n";</div><div>while(my $socketfile=readdir(DIR)) {</div><div>        next unless substr($socketfile,0,7) eq "rrdctl.";</div><div>        my $socketpath="$socketdir/$socketfile";</div>

<div>        if (! -e $socketpath) {</div><div>                warn "not found: $socketpath\n";</div><div>                next;</div><div>        }</div><div>        if (! -w $socketpath) {</div><div>                warn "not writeable: $socketpath\n";</div>

<div>                next;</div><div>        }</div><div>        if (! -S $socketpath) {</div><div>                warn "not a socket: $socketpath\n";</div><div>                next;</div><div>        }</div><div>

<br></div><div>        $socketaddr=sockaddr_un($socketpath);</div><div><br></div><div>        if (defined(send(SOCK, "/$hostname/", 0, $socketaddr))) {</div><div>                print "Flush command for '$hostname' sent to $socketfile\n";</div>

<div>        } else {</div><div>                warn "Flush command for '$hostname' failed to send to socket $socketfile\n";</div><div>        }</div><div>}</div></div><div><br></div><div><br></div></div>

<div class="gmail_extra"><br><br><div class="gmail_quote">On 25 April 2014 22:29, Martin Sperl <span dir="ltr"><<a href="mailto:Martin.Sperl@amdocs.com" target="_blank">Martin.Sperl@amdocs.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">





<div lang="EN-US" link="blue" vlink="purple">
<div>
<p class="MsoNormal"><span lang="DE-AT">Hi!<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="DE-AT"><u></u> <u></u></span></p>
<p class="MsoNormal">Is there a means to flush the rrd files filled in from xymond_rrd say via the “xymon”  command?<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">As an alternative is it possible to use the generic RRDCACHED as a replacement for the caching?<u></u><u></u></p>
<p class="MsoNormal">Any experience with that?<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Thanks,<u></u><u></u></p>
<p class="MsoNormal">                                Martin<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
This message and the information contained herein is proprietary and confidential and subject to the Amdocs policy statement,
you may review at <a href="http://www.amdocs.com/email_disclaimer.asp" target="_blank">http://www.amdocs.com/email_disclaimer.asp</a>
</div>

<br>_______________________________________________<br>
Xymon mailing list<br>
<a href="mailto:Xymon@xymon.com">Xymon@xymon.com</a><br>
<a href="http://lists.xymon.com/mailman/listinfo/xymon" target="_blank">http://lists.xymon.com/mailman/listinfo/xymon</a><br>
<br></blockquote></div><br></div>