Xymon Mailing List Archive search

red.html generation

10 messages in this thread

list Kris Springer · Thu, 27 Oct 2022 09:27:22 -0600 ·
Anyone know what exact code or file generates the red.html page? I'd like to customize mine a bit and even possibly create my own new page.? I can't find any documentation on it and my grep searching isn't producing any results either.

-- 
Thank You,
Kris Springer
Systems Admin
I/O Network Administration
https://www.ionetworkadmin.com
list John Thurston · Thu, 27 Oct 2022 07:37:08 -0800 ·
The application named 'xymongen' builds the pages, using the templates 
in the 'web' directory.

--
Do things because you should, not just because you can.

John Thurston    XXX-XXX-XXXX
user-ce4d79d99bab@xymon.invalid
Department of Administration
State of Alaska

On 10/27/2022 7:27 AM, IO Support wrote:
Anyone know what exact code or file generates the red.html page?
list Kris Springer · Thu, 27 Oct 2022 09:47:36 -0600 ·
Understood, but I'm finding nothing in there that defines the red.html 
page.

Thank You,
Kris Springer
quoted from John Thurston


On 10/27/22 09:37, John Thurston wrote:
The application named 'xymongen' builds the pages, using the templates 
in the 'web' directory.

--
Do things because you should, not just because you can.

John Thurston    XXX-XXX-XXXX
user-ce4d79d99bab@xymon.invalid
Department of Administration
State of Alaska
On 10/27/2022 7:27 AM, IO Support wrote:
Anyone know what exact code or file generates the red.html page?
list John Horne · Thu, 27 Oct 2022 16:40:06 +0000 ·
Hello,

I suspect it is generated by xymongen but within the code itself. We modify the
generated 'nongreen.html' page so that if there is nothing 'non-green' (i.e
everything is green) then it says 'All monitored systems OK'. To do that we had
to modify the 'xymongen/pagegen.c' file in the source.

Taking a quick look at the source in xymongen/xymongen.c (line 664) shows:

nongreen_color = do_nongreen_page(nssidebarfilename, PAGE_NONGREEN, "red");

I suspect this is what actually creates the 'red.html' page. Three lines up
shows it doing the same for the 'nongreen.html' file. ('do_nongreen_page'
source is within 'pagegen.c'.)


John.
quoted from Kris Springer

On Thu, 2022-10-27 at 09:47 -0600, IO Support wrote:
Understood, but I'm finding nothing in there that defines the red.html
page.

Thank You,
Kris Springer


On 10/27/22 09:37, John Thurston wrote:
The application named 'xymongen' builds the pages, using the templates
in the 'web' directory.

--
Do things because you should, not just because you can.

John Thurston    XXX-XXX-XXXX
user-ce4d79d99bab@xymon.invalid
Department of Administration
State of Alaska
On 10/27/2022 7:27 AM, IO Support wrote:
Anyone know what exact code or file generates the red.html page?
--

John Horne | Senior Operations Analyst | Technology and Information Services
University of Plymouth | Drake Circus | Plymouth | Devon | PL4 8AA | UK
[http://www.plymouth.ac.uk/images/email_footer.gif]<http://www.plymouth.ac.uk/worldclass>;

This email and any files with it are confidential and intended solely for the use of the recipient to whom it is addressed. If you are not the intended recipient then copying, distribution or other use of the information contained is strictly prohibited and you should not rely on it. If you have received this email in error please let the sender know immediately and delete it from your system(s). Internet emails are not necessarily secure. While we take every care, University of Plymouth accepts no responsibility for viruses and it is your responsibility to scan emails and their attachments. University of Plymouth does not accept responsibility for any changes made after it was sent. Nothing in this email or its attachments constitutes an order for goods or services unless accompanied by an official order form.
list John Thurston · Thu, 27 Oct 2022 08:41:31 -0800 ·
Crikey, I didn't even know there was a specifically-named red.html page . . and I've been poking at xymon/bb for a couple of decades. I guess that shows how often I look in that directory.

Reading in source, it looks to me like this is triggered in /xymongen.c/, as a special type of PAGE_NONGREEN (there, in line 664):

 ??? 659???????? /* The full summary page - nongreen.html */
 ??? 660???????? if (do_nongreen) {
 ??? 661???????????????? nongreen_color = do_nongreen_page(nssidebarfilename, PAGE_NONGREEN, "nongreen");
 ??? 662???????????????? nongreencolors = (nongreencolors & ~(1 << COL_YELLOW));
 ??? 663???????????????? nongreencolors = (nongreencolors & ~(1 << COL_PURPLE));
 ??? 664???????????????? nongreen_color = do_nongreen_page(nssidebarfilename, PAGE_NONGREEN, "red");
 ??? 665???????????????? add_timestamp("Non-green page generation done");
 ??? 666???????? }

and do_nongreen_page is defined in /pagegen.c/

 ?? 1128 int do_nongreen_page(char *nssidebarfilename, int summarytype, char *filenamebase)

So if you don't want this page to be generated, you're going to have to modify xymongen. And it appears that red.html is going to be controlled by exactly the same things which control nongreen.html
quoted from John Horne

--
Do things because you should, not just because you can.

John Thurston    XXX-XXX-XXXX
user-ce4d79d99bab@xymon.invalid
Department of Administration
State of Alaska
list Kris Springer · Thu, 27 Oct 2022 11:17:32 -0600 ·
Thank you all for the detailed info.? I won't be modifying source code at this time.

I've got a distributed environment with Xymon Servers running in small offices and VM networks. The built-in pages that get generated are functional, but I'm monitoring all those remote Xymon systems with a master system that essentially rolls everything up to one clean screen.? It works but I was trying to strip the red.html page down even further.? I have an alternate idea I'll pursue that should give the result I'm after.? Thanks guys!

Thank You,
Kris Springer
Systems Admin
I/O Network Administration
user-a65af99e49c9@xymon.invalid
https://www.ionetworkadmin.com
quoted from John Thurston


On 10/27/22 10:41, John Thurston wrote:
Crikey, I didn't even know there was a specifically-named red.html page . . and I've been poking at xymon/bb for a couple of decades. I guess that shows how often I look in that directory.

Reading in source, it looks to me like this is triggered in /xymongen.c/, as a special type of PAGE_NONGREEN (there, in line 664):

??? 659???????? /* The full summary page - nongreen.html */
??? 660???????? if (do_nongreen) {
??? 661???????????????? nongreen_color = do_nongreen_page(nssidebarfilename, PAGE_NONGREEN, "nongreen");
??? 662???????????????? nongreencolors = (nongreencolors & ~(1 << COL_YELLOW));
??? 663???????????????? nongreencolors = (nongreencolors & ~(1 << COL_PURPLE));
??? 664???????????????? nongreen_color = do_nongreen_page(nssidebarfilename, PAGE_NONGREEN, "red");
??? 665???????????????? add_timestamp("Non-green page generation done");
??? 666???????? }

and do_nongreen_page is defined in /pagegen.c/

?? 1128 int do_nongreen_page(char *nssidebarfilename, int summarytype, char *filenamebase)

So if you don't want this page to be generated, you're going to have to modify xymongen. And it appears that red.html is going to be controlled by exactly the same things which control nongreen.html

--
Do things because you should, not just because you can.

John Thurston    XXX-XXX-XXXX
user-ce4d79d99bab@xymon.invalid
Department of Administration
State of Alaska

list Kris Springer · Thu, 27 Oct 2022 15:07:33 -0600 ·
To those interested in my end result, I created a cron file that runs 'sed' commands to strip out what I don't want from the red.html file.? Not the cleanest way to accomplish my desired result, but it beats recompiling.? :-)
quoted from Kris Springer

Thank You,
Kris Springer
Systems Admin
I/O Network Administration
user-a65af99e49c9@xymon.invalid
https://www.ionetworkadmin.com


On 10/27/22 11:17, IO Support wrote:
Thank you all for the detailed info.? I won't be modifying source code at this time.

I've got a distributed environment with Xymon Servers running in small offices and VM networks. The built-in pages that get generated are functional, but I'm monitoring all those remote Xymon systems with a master system that essentially rolls everything up to one clean screen.? It works but I was trying to strip the red.html page down even further.? I have an alternate idea I'll pursue that should give the result I'm after.? Thanks guys!

Thank You,
Kris Springer
Systems Admin
I/O Network Administration
user-a65af99e49c9@xymon.invalid
https://www.ionetworkadmin.com


On 10/27/22 10:41, John Thurston wrote:
Crikey, I didn't even know there was a specifically-named red.html page . . and I've been poking at xymon/bb for a couple of decades. I guess that shows how often I look in that directory.

Reading in source, it looks to me like this is triggered in /xymongen.c/, as a special type of PAGE_NONGREEN (there, in line 664):

??? 659???????? /* The full summary page - nongreen.html */
??? 660???????? if (do_nongreen) {
??? 661???????????????? nongreen_color = do_nongreen_page(nssidebarfilename, PAGE_NONGREEN, "nongreen");
??? 662???????????????? nongreencolors = (nongreencolors & ~(1 << COL_YELLOW));
??? 663???????????????? nongreencolors = (nongreencolors & ~(1 << COL_PURPLE));
??? 664???????????????? nongreen_color = do_nongreen_page(nssidebarfilename, PAGE_NONGREEN, "red");
??? 665???????????????? add_timestamp("Non-green page generation done");
??? 666???????? }

and do_nongreen_page is defined in /pagegen.c/

?? 1128 int do_nongreen_page(char *nssidebarfilename, int summarytype, char *filenamebase)

So if you don't want this page to be generated, you're going to have to modify xymongen. And it appears that red.html is going to be controlled by exactly the same things which control nongreen.html

--
Do things because you should, not just because you can.

John Thurston    XXX-XXX-XXXX
user-ce4d79d99bab@xymon.invalid
Department of Administration
State of Alaska

list Stef Coene · Fri, 28 Oct 2022 08:52:14 +0200 ·
Hi,

We do the same. I poll 60+ xymon servers with

xymon <remote ip> "xymondboard --timeout=10 fields=hostname,testname,color,logtime,lastchange,ackmsg,dismsg,XMH_NOPROPRED,XMH_NOPROPYELLOW"

This runs in 10 threads parallel with a sleep of 10 seconds between the different runs.

The returned data is inserted in a mysql database (key = hostname + testname + remote IP) and we built a dashboard out of it that mimics the non-green page in a DIV. So we have 1 'block' per remote xymon server. The floating divs are sorted so the most recent one is the first one.

This page is reachable via a public URL and with some apache redirects, you can reach remote the xymon servers from anywhere in the world.
If you want, I can share a screenshot privately (it contains customer information...)


Stef
quoted from Kris Springer

On 2022-10-27 19:17, IO Support wrote:
Thank you all for the detailed info.? I won't be modifying source code at this time.

I've got a distributed environment with Xymon Servers running in small offices and VM networks. The built-in pages that get generated are functional, but I'm monitoring all those remote Xymon systems with a master system that essentially rolls everything up to one clean screen.  It works but I was trying to strip the red.html page down even further.  I have an alternate idea I'll pursue that should give the result I'm after.? Thanks guys!

Thank You,
Kris Springer
Systems Admin
I/O Network Administration
user-a65af99e49c9@xymon.invalid
https://www.ionetworkadmin.com


On 10/27/22 10:41, John Thurston wrote:
Crikey, I didn't even know there was a specifically-named red.html page . . and I've been poking at xymon/bb for a couple of decades. I guess that shows how often I look in that directory.

Reading in source, it looks to me like this is triggered in /xymongen.c/, as a special type of PAGE_NONGREEN (there, in line 664):

??? 659???????? /* The full summary page - nongreen.html */
??? 660???????? if (do_nongreen) {
??? 661???????????????? nongreen_color = do_nongreen_page(nssidebarfilename, PAGE_NONGREEN, "nongreen");
??? 662???????????????? nongreencolors = (nongreencolors & ~(1 << COL_YELLOW));
??? 663???????????????? nongreencolors = (nongreencolors & ~(1 << COL_PURPLE));
??? 664???????????????? nongreen_color = do_nongreen_page(nssidebarfilename, PAGE_NONGREEN, "red");
??? 665???????????????? add_timestamp("Non-green page generation done");
??? 666???????? }

and do_nongreen_page is defined in /pagegen.c/

?? 1128 int do_nongreen_page(char *nssidebarfilename, int summarytype, char *filenamebase)

So if you don't want this page to be generated, you're going to have to modify xymongen. And it appears that red.html is going to be controlled by exactly the same things which control nongreen.html

--
Do things because you should, not just because you can.

John Thurston    XXX-XXX-XXXX
user-ce4d79d99bab@xymon.invalid
Department of Administration
State of Alaska

list Michael Hill · Mon, 31 Oct 2022 23:52:29 +0000 ·
Excellent use of the word ?crikey?.
quoted from John Thurston


From: Xymon <xymon-bounces at xymon.com> On Behalf Of John Thurston
Sent: Friday, 28 October 2022 12:42 AM
To: xymon at xymon.com
Subject: Re: [Xymon] red.html generation


Crikey, I didn't even know there was a specifically-named red.html page . . and I've been poking at xymon/bb for a couple of decades. I guess that shows how often I look in that directory.

Reading in source, it looks to me like this is triggered in xymongen.c, as a special type of PAGE_NONGREEN (there, in line 664):

    659         /* The full summary page - nongreen.html */
    660         if (do_nongreen) {
    661                 nongreen_color = do_nongreen_page(nssidebarfilename, PAGE_NONGREEN, "nongreen");
    662                 nongreencolors = (nongreencolors & ~(1 << COL_YELLOW));
    663                 nongreencolors = (nongreencolors & ~(1 << COL_PURPLE));
    664                 nongreen_color = do_nongreen_page(nssidebarfilename, PAGE_NONGREEN, "red");
    665                 add_timestamp("Non-green page generation done");
    666         }

and do_nongreen_page is defined in pagegen.c

   1128 int do_nongreen_page(char *nssidebarfilename, int summarytype, char *filenamebase)

So if you don't want this page to be generated, you're going to have to modify xymongen. And it appears that red.html is going to be controlled by exactly the same things which control nongreen.html

--

Do things because you should, not just because you can.


John Thurston    XXX-XXX-XXXX

user-ce4d79d99bab@xymon.invalid<mailto:user-ce4d79d99bab@xymon.invalid>

Department of Administration

State of Alaska
list Jeremy Laidman · Wed, 2 Nov 2022 16:41:09 +1100 ·
On Tue, 1 Nov 2022 at 10:52, Hill, Michael via Xymon <xymon at xymon.com>
wrote:
Excellent use of the word ?crikey?.
I second this! Have you spent any time in Australia John? You seem to have
picked up the lingo.
quoted from Michael Hill

*From:* Xymon <xymon-bounces at xymon.com> *On Behalf Of *John Thurston

*Sent:* Friday, 28 October 2022 12:42 AM
*To:* xymon at xymon.com
*Subject:* Re: [Xymon] red.html generation


Crikey, I didn't even know there was a specifically-named red.html page .
. and I've been poking at xymon/bb for a couple of decades. I guess that
shows how often I look in that directory.
This "red" page was news to me also. Then I discovered that I don't have
one!

It turns out it was added in version 4.2.11, which was released in April
2013. Time for an upgrade I reckon.