On Tue, 17 Sep 2019 at 05:53, Root, Paul T <user-76fdb6883669@xymon.invalid>
wrote:
Looping back on this:
Running the showgraph by hand
$ *./showgraph.sh host=nsmdenvp185 service=ncv:ConfigPulls
graph_width=576 graph_height=120 disp=nsmdenvp185 nostale color=blue
graph_start=1568489816 graph_end=1568662616 graph=hourly action=view*
This won't work. The showgraph.cgi binary expects to be run as a CGI and
requires QUERY_STRING to be set (to
host=nsmdenvp185&service=ncv:ConfigPulls&graph_width=...) and
REQUEST_MATHOD to be set to "GET". It also expects SCRIPT_NAME to be set
(and normally it would be showgraph.sh) but I think this only generates
warnings.
Try running like so:
SCRIPT_NAME=showgraph.sh REQUEST_METHOD=GET
QUERY_STRING='host=nsmdenvp185&service=ncv:ConfigPulls&graph_width=576&graph_height=120&disp=nsmdenvp185&nostale&color=blue&graph_start=1568489816&graph_end=1568662616&graph=hourly&action=view'
./showgraph.sh
The output will be partly binary, so you might want to try:
SCRIPT_NAME=showgraph.sh REQUEST_METHOD=GET
QUERY_STRING='host=nsmdenvp185&service=ncv:ConfigPulls&graph_width=576&graph_height=120&disp=nsmdenvp185&nostale&color=blue&graph_start=1568489816&graph_end=1568662616&graph=hourly&action=view'
./showgraph.sh | sed '1,/^$/d' | file -
and see if it shows that a PNG file format was generated.
If this doesn't work, check for a service name such as "cpu" that is known
to work, rather than your custom "ncv:ConfigPulls".
Content-type: text/html
<html><head><title>Invalid request</title></head>
<body>Invalid request - no host or service</body></html>
Yep, cos no QUERY_STRING.
$ *ls /var/lib/xymon/rrd/nsmdenvp185/ConfigPulls**
/var/lib/xymon/rrd/nsmdenvp185/ConfigPulls.rrd
root nsmdenvp117:/usr/lib64/xymon/cgi-bin
$ cat ~ptroot/crap2
#!/bin/bash
$* curl -k
https://nsmdenvp117.corp.intranet/xymon-cgi/showgraph.sh\?host=nsmdenvp185\&service=ncv:ConfigPulls\&graph_width=576\&graph_height=120\&disp=nsmdenvp185\&nostale\&color=blue\&graph_start=1568489816\&graph_end=1568662616\&graph=hourly\&action=view
<https://nsmdenvp117.corp.intranet/xymon-cgi/showgraph.sh%5C?host=nsmdenvp185%5C&service=ncv:ConfigPulls%5C&graph_width=576%5C&graph_height=120%5C&disp=nsmdenvp185%5C&nostale%5C&color=blue%5C&graph_start=1568489816%5C&graph_end=1568662616%5C&graph=hourly%5C&action=view>*
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>500 Internal Server Error</title>
This works for me (substituting my own Xymon servername, hostname and
service.
</head><body>
<h1>Internal Server Error</h1>
Check your Apache/webserver logs for the cause.
Again, if I run rrdtool graph by hand, I get a good graph..
Could this be the Test name is too long for showgraph, or maybe doesn?t
like mixed case?
I don't think so. I have a graph that shows with
"service=bind9-stats-extended" which is longer than your "nsv:ConfigPulls"
including the prefix.
J
*From:* Xymon <xymon-bounces at xymon.com> *On Behalf Of *Root, Paul T
*Sent:* Wednesday, September 11, 2019 8:26 AM
*To:* 'Jeremy Laidman' <user-0608abae5e7c@xymon.invalid>
*Cc:* xymon at xymon.com
*Subject:* Re: [Xymon] Graphing in Xymon
Looking this morning. There is no change, no graph.
Manually making the graph works perfectly.
*From:* Jeremy Laidman <user-0608abae5e7c@xymon.invalid>
*Sent:* Tuesday, September 10, 2019 11:46 AM
*To:* Root, Paul T <user-76fdb6883669@xymon.invalid>
*Cc:* Japheth Cleaver <user-87556346d4af@xymon.invalid>; Ralph Mitchell <
user-00a5e44c48c0@xymon.invalid>; xymon at xymon.com
*Subject:* Re: [Xymon] Graphing in Xymon
I thing RRD needs two or more consecutive data points before it produces
results. If you add more than one within a timeslot, it rejects the second
and subsequent ones. If you've configured your RRD file to work on an
hourly basis, you need to wait 2-3 hours.
On Wed, 11 Sep 2019 at 02:07, Root, Paul T <user-76fdb6883669@xymon.invalid>
wrote:
A couple hours later, and still no graph in xymon. Ssl_error_log yields:
[Tue Sep 10 11:01:36 2019] [error] [client 10.139.63.193] Premature end of
script headers: showgraph.sh, referer:
https://xymon.corp.intranet/xymon-cgi/svcstatus.sh?HOST=nsmdenvp185&SERVICE=ConfigPulls
The manual graph is still getting more data in, using the exact same
definitions as in graphs.cfg.
*From:* Root, Paul T
*Sent:* Tuesday, September 10, 2019 9:09 AM
*To:* 'Jeremy Laidman' <user-0608abae5e7c@xymon.invalid>
*Cc:* Japheth Cleaver <user-87556346d4af@xymon.invalid>; Ralph Mitchell <
user-00a5e44c48c0@xymon.invalid>; xymon at xymon.com
*Subject:* RE: [Xymon] Graphing in Xymon
Excellent, that?s probably the key.
I?ve made the change, I?m guessing I need a new input before anything can
work.
rrdtool tune ConfigPulls.rrd -h NetAtoD:86400 -h NetEtoN:86400 -h
NetOtoZ1to9:86400 -h Other:86400 -h InfraGen:86400 -h InfraSec:86400
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE rrd SYSTEM "http://oss.oetiker.ch/rrdtool/rrdtool.dtd">
<!-- Round Robin Database Dump --><rrd> <version> 0003 </version>
<step> 300 </step> <!-- Seconds -->
<lastupdate> 1568123701 </lastupdate> <!-- 2019-09-10 08:55:01 CDT
-->
<ds>
<name> NetAtoD </name>
<type> GAUGE </type>
<minimal_heartbeat> 86400 </minimal_heartbeat>
<min> NaN </min>
<max> NaN </max>
<!-- PDP Status -->
<last_ds> 167 </last_ds>
<value> NaN </value>
<unknown_sec> 1 </unknown_sec>
</ds>
Impatient as I am, I manually ran the script again, and then ran the
rrdtool graph, and I got data points on the graph. So I should be close
now.
Thanks,
Paul.
*From:* Jeremy Laidman <user-0608abae5e7c@xymon.invalid>
*Sent:* Tuesday, September 10, 2019 8:38 AM
*To:* Root, Paul T <user-76fdb6883669@xymon.invalid>
*Cc:* Japheth Cleaver <user-87556346d4af@xymon.invalid>; Ralph Mitchell <
user-00a5e44c48c0@xymon.invalid>; xymon at xymon.com
*Subject:* Re: [Xymon] Graphing in Xymon
"ds[NetAtoD].minimal_heartbeat = 600"
Isn't the minimal_heartbeat setting for telling RRD to discard samples
that exist on their own? I think the idea is that it doesn't make sense to
calculate values from DERIVE or COUNTER inputs. From the man page for
rrdcreate:
<*The "heartbeat" defines the maximum acceptable interval between
samples/updates. If the interval between samples is less than "heartbeat",
then an average rate is calculated and applied for that interval. If the
interval between samples is longer than "heartbeat", then that entire
interval is considered "unknown".*>
If you're sampling once per hour, then every sample will exceed the 600
second heartbeat. So you might need to re-create (or rrdtune) your RRD file
and increase the mimimal_heartbeat value.
And from the man page for rrdtune:
<*--heartbeat**|-h ds-name:heartbeat *
*modify the heartbeat of a data source. By setting this to a high value
the **RRD will accept things like one value per day.*>
J
This communication is the property of CenturyLink and may contain
confidential or privileged information. Unauthorized use of this
communication is strictly prohibited and may be unlawful. If you have
received this communication in error, please immediately notify the sender
by reply e-mail and destroy all copies of the communication and any
attachments.
This communication is the property of CenturyLink and may contain
confidential or privileged information. Unauthorized use of this
communication is strictly prohibited and may be unlawful. If you have
received this communication in error, please immediately notify the sender
by reply e-mail and destroy all copies of the communication and any
attachments.
This communication is the property of CenturyLink and may contain
confidential or privileged information. Unauthorized use of this
communication is strictly prohibited and may be unlawful. If you have
received this communication in error, please immediately notify the sender
by reply e-mail and destroy all copies of the communication and any
attachments.