Xymon Mailing List Archive search

Trends HTML to Email

list Jeremy Laidman
Tue, 28 Apr 2015 14:08:30 +1000
Message-Id: <user-56714e3a913f@xymon.invalid>

John

Perhaps a variant of "wget -p" might be able to fetch the page and all
image components.

But what you've tried should work.  In fact I have an old Hobbit server
that I tested your script on, and got the results as you would want.
However, I had to join the lines together from "env" to the end, all as one
long line, to get it to work.

J


On 28 April 2015 at 05:55, John Tullis <user-a6bbfd057f07@xymon.invalid> wrote:
 I'm looking for a way to send the contents of the the trends page to an
external user with information from the trends page and don't want to give
them internal access.


 Anyone know a way to dump the page to a file?


 I've tried this ​
<http://lists.xymon.com/oldarchive/2010/02/msg00188.html>so far with
little success:


  #!/bin/sh
. /usr/lib/hobbit/server/etc/hobbitcgi.cfg
HOST=$1
 SERVICE=trends
env REQUEST_URI=/hobbit-cgi/bb-hostsvc.sh?HOST=${HOST}\&SERVICE=$SERVICE
SCRIPT_NAME=/hobbit-cgi/bb-hostsvc.sh
QUERY_STRING=HOST=${HOST}\&SERVICE=$SERVICE REQUEST_METHOD=GET
/usr/lib/hobbit/server/bin/hobbitsvc.cgi $CGI_SVC_OPTS --debug


 Then I run sh test.sh server​.name


 The result is:


 Content-type: text/html

 <html><head><title>Invalid request</title></head>
<body>Invalid request</body></html>

It acts as though it didn't find a host name to query.

 Any other suggestions would be very helpful!


 Thanks,


  John Tullis