Welcome to the Cumulus Support forum.

Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024

Cumulus MX V4 beta test release 4.0.0 (build 4019) - 03 April 2024

Legacy Cumulus 1 release 1.9.4 (build 1099) - 28 November 2014
(a patch is available for 1.9.4 build 1099 that extends the date range of drop-down menus to 2030)

Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki

MX diags .txt Interrogator

From build 3044 the development baton passed to Mark Crossley. Mark has been responsible for all the Builds since. He has made the code available on GitHub. It is Mark's hope that others will join in this development, but at the very least he welcomes your ideas for future developments (see Cumulus MX Development suggestions).

Moderator: mcrossley

Post Reply
User avatar
beteljuice
Posts: 3292
Joined: Tue 09 Dec 2008 1:37 pm
Weather Station: None !
Operating System: W10 - Threadripper 16core, etc
Location: Dudley, West Midlands, UK

MX diags .txt Interrogator

Post by beteljuice »

Yup ... It's another plaything from the beteljuice stable.

MX diags .txt Interrogator

You can do basic regex type stuff (search for things) in a diags .txt file.

Like everything else in life it's a good idea to ask the right question :)

It's javascript so performance will very, very much depend upon your PC / browser / file size.

It has been tried on a 12 meg file / over a million entries, and unsurprisingly the browser farted a bit 8-)

Edit: Don't let the next few posts about scary regex put you off - Just type the bit of text you want to find in any entry and click "search"
The entries will be highlighted in GREEN or you can tick "Exclude !" to hide them.

For real regex people, please note.
The search expression is per entry, NOT the file as a whole.
Last edited by beteljuice on Sat 11 Sep 2021 12:28 am, edited 1 time in total.
Image
......................Imagine, what you will KNOW tomorrow !
User avatar
HansR
Posts: 5957
Joined: Sat 20 Oct 2012 6:53 am
Weather Station: GW1100 (WS80/WH40)
Operating System: Raspberry OS/Bookworm
Location: Wagenborgen (NL)
Contact:

Re: MX diags .txt Interrogator

Post by HansR »

Ah... nice. Don't know if I am going to use it much but still.... nice.

I tried it with ^((?!Realtime).)*$ to get all lines which did not contain the word Realtime. Seemed sensible because I never (rarely) have errors so I was curious what would be left of the log when those repetitive non-informational lines would have disappeared (I have to set Debug on etc If I really need info). The result was a nicely greened lines which remained and the lines with Realtime had been not greened but remained visible.

I assume that was OK.
Hans

https://meteo-wagenborgen.nl
CMX build 4017+ ● RPi 3B+ ● Raspbian Linux 6.1.21-v7+ armv7l ● dotnet 8.0.3
User avatar
beteljuice
Posts: 3292
Joined: Tue 09 Dec 2008 1:37 pm
Weather Station: None !
Operating System: W10 - Threadripper 16core, etc
Location: Dudley, West Midlands, UK

Re: MX diags .txt Interrogator

Post by beteljuice »

@Hans ...

I didn't dare try such a complex expression :lol: - So I'm very pleased it was 'accepted' and worked :clap:
The result was a nicely greened lines which remained and the lines with Realtime had been not greened but remained visible.
Matches to the question (NOT Realtime) are highlighted, with 'point of interest' a brighter highlight.
Pressing the 'collapse' option will show only the matches.

B.T.W. I'm still trying to see how your negative expression got through and worked :?
It looks like by using the ^ and the $, full regex is evaluated .... but I'm probably wrong :bash:

For someone who says they hate regex it's a cracker to throw at my poor program :lol: :lol:

It's intended for simple queries for simple people (like me !) using simple text (altime) with possibly an (AND) .*something else
I've just been emboldened to try (OR) | in simple text ... It works :clap:

Edit: Hmm ... I wonder if I could / should create a 'match' or 'exclude' option (negate) :groan:
Image
......................Imagine, what you will KNOW tomorrow !
User avatar
HansR
Posts: 5957
Joined: Sat 20 Oct 2012 6:53 am
Weather Station: GW1100 (WS80/WH40)
Operating System: Raspberry OS/Bookworm
Location: Wagenborgen (NL)
Contact:

Re: MX diags .txt Interrogator

Post by HansR »

beteljuice wrote: Thu 09 Sep 2021 1:00 pm B.T.W. I'm still trying to see how your negative expression got through and worked :?
So am I :lol:

beteljuice wrote: Thu 09 Sep 2021 1:00 pm It looks like by using the ^ and the $, full regex is evaluated .... but I'm probably wrong :bash:
I really have no idea
beteljuice wrote: Thu 09 Sep 2021 1:00 pm For someone who says they hate regex it's a cracker to throw at my poor program :lol: :lol:
:lol: :lol: Google is my friend: I looked for a challenge and I found something with a claim and put that to the test for your claim that it could handle regex. But really, I have no idea
It looks lovely though. And had I remained silent I would have gained a lot of respect no doubt. But with Google everybody can be a programmer ;)
beteljuice wrote: Thu 09 Sep 2021 1:00 pm Edit: Hmm ... I wonder if I could / should create a 'match' or 'exclude' option (negate) :groan:
Yes you can :clap:
Hans

https://meteo-wagenborgen.nl
CMX build 4017+ ● RPi 3B+ ● Raspbian Linux 6.1.21-v7+ armv7l ● dotnet 8.0.3
User avatar
beteljuice
Posts: 3292
Joined: Tue 09 Dec 2008 1:37 pm
Weather Station: None !
Operating System: W10 - Threadripper 16core, etc
Location: Dudley, West Midlands, UK

Re: MX diags .txt Interrogator

Post by beteljuice »

O.K.

New, improved, blah, blah ....

Now has an 'exclude' option for hiding things rather than promoting them.

Used together with | (OR)('pipe' symbol) this can be very powerful.

Suppose you want to 'hide' realtime

text to enter> realt
tick the "Exclude !" checkbox.

Suppose you also want to 'hide' everything that happened between 21:00:00 > 21:59:59
timestamp example 2021-07-12 21:37:15.908
We are interested in the RED including the preceding <space>

text to enter> realt| 21:
Last edited by beteljuice on Fri 10 Sep 2021 8:51 pm, edited 1 time in total.
Image
......................Imagine, what you will KNOW tomorrow !
User avatar
HansR
Posts: 5957
Joined: Sat 20 Oct 2012 6:53 am
Weather Station: GW1100 (WS80/WH40)
Operating System: Raspberry OS/Bookworm
Location: Wagenborgen (NL)
Contact:

Re: MX diags .txt Interrogator

Post by HansR »

OK that is an improvement indeed.

But now I wanted to also remove all lines with ' DoLogFile' so I entered:

Code: Select all

Realtime | DoLogFile
but that does not work as you can see:
Schermafbeelding 2021-09-10 083854.jpg
What I would like to do is exclude everything between "Normal running" and the shutdown loglines, maybe only for every read one line (e.g. the Starting - Loop) to have a proof of life. All the rest is redundant and errors/deviations would be spotted immediately. CMX could also remove this type of redundancy in messaging I guess, but anyhow, that is how I would use your tool.

So the current question is: why does it include some lines with the word Realtime and some not (the array lines like Realtime[0]), that must be in the separator '[' , but then the '[' should limit the realtime for comparison, no?
You do not have the required permissions to view the files attached to this post.
Hans

https://meteo-wagenborgen.nl
CMX build 4017+ ● RPi 3B+ ● Raspbian Linux 6.1.21-v7+ armv7l ● dotnet 8.0.3
User avatar
beteljuice
Posts: 3292
Joined: Tue 09 Dec 2008 1:37 pm
Weather Station: None !
Operating System: W10 - Threadripper 16core, etc
Location: Dudley, West Midlands, UK

Re: MX diags .txt Interrogator

Post by beteljuice »

But now I wanted to also remove all lines with ' DoLogFile' so I entered:

Realtime | DoLogFile
Well first of all you didn't tick the 'Exclude' checkbox.

Secondly you have a space after Realtime ...

You should be able to shorten the text to: realt| dolo
Image
......................Imagine, what you will KNOW tomorrow !
User avatar
HansR
Posts: 5957
Joined: Sat 20 Oct 2012 6:53 am
Weather Station: GW1100 (WS80/WH40)
Operating System: Raspberry OS/Bookworm
Location: Wagenborgen (NL)
Contact:

Re: MX diags .txt Interrogator

Post by HansR »

beteljuice wrote: Fri 10 Sep 2021 7:36 am Well first of all you didn't tick the 'Exclude' checkbox.
True but that is irrelevant as it just removes or highlights what I get
beteljuice wrote: Fri 10 Sep 2021 7:36 am Secondly you have a space after Realtime ...
aha... yes.

My current exclusion would give a nice short logfile. Could remove the catch up of WU and even more as well ;)

Code: Select all

realt| dolo| Writing| SFTP| SendLoop| WOW| reception stats
You could make some predefined logfile filters.
Or have the user store some.... challenges challenges...
beteljuice wrote: Fri 10 Sep 2021 7:36 am You should be able to shorten the text to: realt| dolo
Next step is just thinking what I want... ;)
Hans

https://meteo-wagenborgen.nl
CMX build 4017+ ● RPi 3B+ ● Raspbian Linux 6.1.21-v7+ armv7l ● dotnet 8.0.3
User avatar
beteljuice
Posts: 3292
Joined: Tue 09 Dec 2008 1:37 pm
Weather Station: None !
Operating System: W10 - Threadripper 16core, etc
Location: Dudley, West Midlands, UK

Re: MX diags .txt Interrogator

Post by beteljuice »

I don't know how many different ways MX reports problems

but why not be 'positive' and use something like err|warn|not fou
You then use the 'player' buttons to navigate, or collapse to just show the offending block.

B.T.W. 'Exclude' highlights matches in RED which can be seen when you 'Show All' ;)
Image
......................Imagine, what you will KNOW tomorrow !
Post Reply