[Xymon] Trends HTML to Email

Ralph Mitchell ralphmitchell at gmail.com
Tue Apr 28 06:21:17 CEST 2015


Doesn't the "env" command do pretty much the same as "export"ing every
variable listed?  So you *would* need to have from "env" to the end as a
single line.  Or export the things not on the env line:

<assign various values>
export HOST SERVICE REQUEST_URI SCRIPT_NAME QUERY_STRING= REQUEST_METHOD
/usr/lib/hobbit/server/bin/hobbitsvc.cgi $CGI_SVC_OPTS --debug

Or something like that?

Ralph Mitchell


On Tue, Apr 28, 2015 at 12:08 AM, Jeremy Laidman <jlaidman at rebel-it.com.au>
wrote:

> 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
>>
>>
>
> _______________________________________________
> 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/099e4332/attachment.html>


More information about the Xymon mailing list