favicon location?
list Kris Springer
I'd like to find out the html code to use inside an iframe so I can display the live favicon pulled from my xymon server. I want to add it onto another site I have that others can quickly glance at and see the color of Xymon without going there. This is useful for those who are not in the email alerts list. Does anyone have any suggestions about a simple little html code that pulls that data? Thank you. *Kris Springer* • *
list Josh Luthman
Can't you just reference /favicon.ico? Josh Luthman Office: XXX-XXX-XXXX Direct: XXX-XXX-XXXX XXXX Wayne St Suite XXXX Troy, OH XXXXX
▸
On Oct 11, 2013 8:59 PM, "Kris Springer" <user-c2caa0a7a8d5@xymon.invalid> wrote:
I'd like to find out the html code to use inside an iframe so I can display the live favicon pulled from my xymon server. I want to add it onto another site I have that others can quickly glance at and see the color of Xymon without going there. This is useful for those who are not in the email alerts list. Does anyone have any suggestions about a simple little html code that pulls that data? Thank you. *Kris Springer* • *
list Kris Springer
No. The favicon filenames are different based on the color of the xymon page at any given moment. I need a script to pull the 'current' favicon file that's listed in the xymon.html file. That's the file that get re-written every time the server polls everything and refreshes itself. When the page color changes the 'favicon' path gets changed accordingly also. When xymon.html is red, the favicon path looks like this <link rel="shortcut icon" href="/xymon/gifs/favicon-red.ico<http://monitor.innovateteam.com/xymon/gifs/favicon-red.ico>; "> When it's green it looks like this <link rel="shortcut icon" href="/xymon/gifs/favicon-green.ico<http://monitor.innovateteam.com/xymon/gifs/favicon-red.ico>; "> You can see this if you look at the source code of your xymon page in a browser. I need a script or something that pulls the 'live' favicon image that's displayed in the xymon.html file. I don't know if it's easier to have an external script pull the image out of xymon.html, or if it's easier to create a script that runs on the server itself and literally creates a new html file that only has the favicon in it. Thank you. *Kris Springer* • * On Fri, Oct 11, 2013 at 7:08 PM, Josh Luthman
▸
<user-4c45a83f15cb@xymon.invalid>wrote:
Can't you just reference /favicon.ico? Josh Luthman Office: XXX-XXX-XXXX Direct: XXX-XXX-XXXX XXXX Wayne St Suite XXXX Troy, OH XXXXX On Oct 11, 2013 8:59 PM, "Kris Springer" <user-c2caa0a7a8d5@xymon.invalid> wrote:I'd like to find out the html code to use inside an iframe so I can display the live favicon pulled from my xymon server. I want to add it onto another site I have that others can quickly glance at and see the color of Xymon without going there. This is useful for those who are not in the email alerts list. Does anyone have any suggestions about a simple little html code that pulls that data? Thank you. *Kris Springer* • *
list Mike Burger
It's probably easier to have a script to poll Xymon for its current status, and then reference the appropriate favicon-color.ico. If you installed from scratch, the icons are in $XYMONHOME/serverwww/gifs If you installed on a Red Hat type system (CentOS, RHEL, Scientific, Fedora), look in /usr/share/xymon/static/gifs and/or /var/lib/xymon/www/gifs. -- Mike Burger http://www.bubbanfriends.org "It's always suicide-mission this, save-the-planet that. No one ever just stops by to say 'hi' anymore." --Colonel Jack O'Neill, SG1
▸
No. The favicon filenames are different based on the color of the xymon page at any given moment. I need a script to pull the 'current' favicon file that's listed in the xymon.html file. That's the file that get re-written every time the server polls everything and refreshes itself. When the page color changes the 'favicon' path gets changed accordingly also. When xymon.html is red, the favicon path looks like this <link rel="shortcut icon" href="/xymon/gifs/favicon-red.ico<http://monitor.innovateteam.com/xymon/gifs/favicon-red.ico>; "> When it's green it looks like this <link rel="shortcut icon" href="/xymon/gifs/favicon-green.ico<http://monitor.innovateteam.com/xymon/gifs/favicon-red.ico>; "> You can see this if you look at the source code of your xymon page in a browser. I need a script or something that pulls the 'live' favicon image that's displayed in the xymon.html file. I don't know if it's easier to have an external script pull the image out of xymon.html, or if it's easier to create a script that runs on the server itself and literally creates a new html file that only has the favicon in it. Thank you. *Kris Springer* • * On Fri, Oct 11, 2013 at 7:08 PM, Josh Luthman <user-4c45a83f15cb@xymon.invalid>wrote:Can't you just reference /favicon.ico? Josh Luthman Office: XXX-XXX-XXXX Direct: XXX-XXX-XXXX XXXX Wayne St Suite XXXX Troy, OH XXXXX On Oct 11, 2013 8:59 PM, "Kris Springer" <user-c2caa0a7a8d5@xymon.invalid> wrote:I'd like to find out the html code to use inside an iframe so I can display the live favicon pulled from my xymon server. I want to add it onto another site I have that others can quickly glance at and see the color of Xymon without going there. This is useful for those who are not in the email alerts list. Does anyone have any suggestions about a simple little html code that pulls that data? Thank you. *Kris Springer* • *
list Kris Springer
Yes, I'd love to but I don't know how to write that code. Do you? Thank you. Kris Springer
▸
=======================
On Monday, October 14, 2013 at 11:33 AM, Mike Burger wrote:
It's probably easier to have a script to poll Xymon for its current status, and then reference the appropriate favicon-color.ico. If you installed from scratch, the icons are in $XYMONHOME/serverwww/gifs If you installed on a Red Hat type system (CentOS, RHEL, Scientific, Fedora), look in /usr/share/xymon/static/gifs and/or /var/lib/xymon/www/gifs. -- Mike Burger http://www.bubbanfriends.org "It's always suicide-mission this, save-the-planet that. No one ever just stops by to say 'hi' anymore." --Colonel Jack O'Neill, SG1No. The favicon filenames are different based on the color of the xymon page at any given moment. I need a script to pull the 'current' favicon file that's listed in the xymon.html file. That's the file that get re-written every time the server polls everything and refreshes itself. When the page color changes the 'favicon' path gets changed accordingly also. When xymon.html is red, the favicon path looks like this <link rel="shortcut icon" href="/xymon/gifs/favicon-red.ico<http://monitor.innovateteam.com/xymon/gifs/favicon-red.ico>; "> When it's green it looks like this <link rel="shortcut icon" href="/xymon/gifs/favicon-green.ico<http://monitor.innovateteam.com/xymon/gifs/favicon-red.ico>; "> You can see this if you look at the source code of your xymon page in a browser. I need a script or something that pulls the 'live' favicon image that's displayed in the xymon.html file. I don't know if it's easier to have an external script pull the image out of xymon.html, or if it's easier to create a script that runs on the server itself and literally creates a new html file that only has the favicon in it. Thank you. *Kris Springer* • * On Fri, Oct 11, 2013 at 7:08 PM, Josh Luthman <user-4c45a83f15cb@xymon.invalid>wrote:Can't you just reference /favicon.ico? Josh Luthman Office: XXX-XXX-XXXX Direct: XXX-XXX-XXXX XXXX Wayne St Suite XXXX Troy, OH XXXXX On Oct 11, 2013 8:59 PM, "Kris Springer" <user-c2caa0a7a8d5@xymon.invalid> wrote:I'd like to find out the html code to use inside an iframe so I can display the live favicon pulled from my xymon server. I want to add it onto another site I have that others can quickly glance at and see the color of Xymon without going there. This is useful for those who are not in the email alerts list. Does anyone have any suggestions about a simple little html code that pulls that data? Thank you. *Kris Springer* • *
list Mike Burger
Sure: curl -s <URL of your Xymon installation> | grep "favicon-" will give you the entire "link" line that points to the favicon-<color>.ico file currently in use.
▸
-- Mike Burger http://www.bubbanfriends.org "It's always suicide-mission this, save-the-planet that. No one ever just stops by to say 'hi' anymore." --Colonel Jack O'Neill, SG1
Yes, I'd love to but I don't know how to write that code. Do you? Thank you. Kris Springer ======================= On Monday, October 14, 2013 at 11:33 AM, Mike Burger wrote:It's probably easier to have a script to poll Xymon for its current status, and then reference the appropriate favicon-color.ico. If you installed from scratch, the icons are in $XYMONHOME/serverwww/gifs If you installed on a Red Hat type system (CentOS, RHEL, Scientific, Fedora), look in /usr/share/xymon/static/gifs and/or /var/lib/xymon/www/gifs. -- Mike Burger http://www.bubbanfriends.org "It's always suicide-mission this, save-the-planet that. No one ever just stops by to say 'hi' anymore." --Colonel Jack O'Neill, SG1No. The favicon filenames are different based on the color of the xymon page at any given moment. I need a script to pull the 'current' favicon file that's listed in the xymon.html file. That's the file that get re-written every time the server polls everything and refreshes itself. When the page color changes the 'favicon' path gets changed accordingly also. When xymon.html is red, the favicon path looks like this <link rel="shortcut icon" href="/xymon/gifs/favicon-red.ico<http://monitor.innovateteam.com/xymon/gifs/favicon-red.ico>; "> When it's green it looks like this <link rel="shortcut icon" href="/xymon/gifs/favicon-green.ico<http://monitor.innovateteam.com/xymon/gifs/favicon-red.ico>; "> You can see this if you look at the source code of your xymon page in a browser. I need a script or something that pulls the 'live' favicon image that's displayed in the xymon.html file. I don't know if it's easier to have an external script pull the image out of xymon.html, or if it's easier to create a script that runs on the server itself and literally creates a new html file that only has the favicon in it. Thank you. *Kris Springer* • * On Fri, Oct 11, 2013 at 7:08 PM, Josh Luthman <user-4c45a83f15cb@xymon.invalid>wrote:Can't you just reference /favicon.ico? Josh Luthman Office: XXX-XXX-XXXX Direct: XXX-XXX-XXXX XXXX Wayne St Suite XXXX Troy, OH XXXXX On Oct 11, 2013 8:59 PM, "Kris Springer"<user-c2caa0a7a8d5@xymon.invalid>wrote:I'd like to find out the html code to use inside an iframe so I can display the live favicon pulled from my xymon server. I want to add it onto another site I have that others can quickly glance at and see the color of Xymon without going there. This is useful for those who are not in the email alerts list. Does anyone have any suggestions about a simple little html code that pulls that data? Thank you. *Kris Springer* • *
list Jeremy Laidman
▸
On 15 October 2013 05:49, Kris Springer <user-c2caa0a7a8d5@xymon.invalid> wrote:
Yes, I'd love to but I don't know how to write that code. Do you?
Something like this in the file $XYMONHOME/ext/favicon.sh:
#!/bin/sh
# generate favicon symlink
FAV=`sed -n '/shortcut icon/{s/^.*\///;s/".*$//;p}'
$XYMONWWWDIR/nongreen.html`
[ -f "$XYMONWWWDIR/gifs/$FAV" ] && ln -f -s gifs/$FAV
$XYMONWWWDIR/favicon.ico
Then do "chmod +x $XYMONHOME/ext/favicon.sh". And finally add this to
tasks.cfg:
[favicon]
ENVFILE $XYMONHOME/etc/xymonserver.cfg
CMD $XYMONHOME/ext/favicon.sh
LOGFILE $XYMONSERVERLOGS/favicon.log
INTERVAL 1m
Adjust the interval to your needs. Check the xymonlaunch.log and
favicon.log for any errors.
J
list Kris Springer
Wow! You rock. Thanks a lot! Thank you. *Kris Springer*
▸
*=======================*
• *
On Mon, Oct 14, 2013 at 6:05 PM, Jeremy Laidman <user-71895fb2e44c@xymon.invalid>wrote:
On 15 October 2013 05:49, Kris Springer <user-c2caa0a7a8d5@xymon.invalid>wrote:Yes, I'd love to but I don't know how to write that code. Do you?Something like this in the file $XYMONHOME/ext/favicon.sh: #!/bin/sh # generate favicon symlink FAV=`sed -n '/shortcut icon/{s/^.*\///;s/".*$//;p}' $XYMONWWWDIR/nongreen.html` [ -f "$XYMONWWWDIR/gifs/$FAV" ] && ln -f -s gifs/$FAV $XYMONWWWDIR/favicon.ico Then do "chmod +x $XYMONHOME/ext/favicon.sh". And finally add this to tasks.cfg: [favicon] ENVFILE $XYMONHOME/etc/xymonserver.cfg CMD $XYMONHOME/ext/favicon.sh LOGFILE $XYMONSERVERLOGS/favicon.log INTERVAL 1m Adjust the interval to your needs. Check the xymonlaunch.log and favicon.log for any errors. J