[Xymon] Trends HTML to Email
Jeremy Laidman
jlaidman at rebel-it.com.au
Tue Apr 28 06:08:30 CEST 2015
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 <john at executech.com> 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
>
>
>
> _______________________________________________
> Xymon mailing list
> Xymon at xymon.com
> http://lists.xymon.com/mailman/listinfo/xymon
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xymon.com/pipermail/xymon/attachments/20150428/9a25e886/attachment.html>
More information about the Xymon
mailing list