From john@executech.com Wed Jun 24 08:23:14 2026 From: john@executech.com To: xymon@xymon.com Subject: [Xymon] Trends HTML to Email Date: Mon, 27 Apr 2015 19:55:11 +0000 Message-ID: <1430164713451.66318@executech.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============6819142561392447753==" --===============6819142561392447753== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable I'm looking for a way to send the contents of the the trends page to an exter= nal user with information from the trends page and don't want to give them in= ternal access. Anyone know a way to dump the page to a file? I've tried this ?so = far with little success: #!/bin/sh . /usr/lib/hobbit/server/etc/hobbitcgi.cfg HOST=3D$1 SERVICE=3Dtrends env REQUEST_URI=3D/hobbit-cgi/bb-hostsvc.sh?HOST=3D${HOST}\&SERVICE=3D$SERVICE SCRIPT_NAME=3D/hobbit-cgi/bb-hostsvc.sh QUERY_STRING=3DHOST=3D${HOST}\&SERVICE=3D$SERVICE REQUEST_METHOD=3DGET /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 Invalid request Invalid request It acts as though it didn't find a host name to query. Any other suggestions would be very helpful! Thanks, John Tullis --===============6819142561392447753==-- From jlaidman@rebel-it.com.au Wed Jun 24 08:23:14 2026 From: jlaidman@rebel-it.com.au To: xymon@xymon.com Subject: [Xymon] Trends HTML to Email Date: Tue, 28 Apr 2015 14:08:30 +1000 Message-ID: In-Reply-To: <1430164713451.66318@executech.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============4211520407847070508==" --===============4211520407847070508== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit 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 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 ​ > 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 > > Invalid request > Invalid request > > 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 > > --===============4211520407847070508==-- From ralphmitchell@gmail.com Wed Jun 24 08:23:14 2026 From: ralphmitchell@gmail.com To: xymon@xymon.com Subject: [Xymon] Trends HTML to Email Date: Tue, 28 Apr 2015 00:21:17 -0400 Message-ID: In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============2174381868346612234==" --===============2174381868346612234== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit 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: 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 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 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 ​ >> 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 >> >> Invalid request >> Invalid request >> >> 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 > > --===============2174381868346612234==--