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
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
Custom Alarm Function
Moderator: mcrossley
-
- Posts: 159
- Joined: Sun 08 May 2016 9:11 pm
- Weather Station: Vantage Pro 2
- Operating System: Windows Server 2019
- Location: Raleigh, NC
Custom Alarm Function
Is there any possibility to create a custom alarm function? For example, if the Data Stopped alarm triggers, (for me) the issue is due to a blocked COM port (more about that in another post) and the fix is to bounce the CMX service. I have a script to bounce the service, but I am trying to figure out a trigger. Instead of having a constantly-running script reading the mxdiags looking for a COM error, a trigger via the existing alarm setting would be awesome.
-
- Posts: 884
- Joined: Sat 16 Jul 2016 11:59 pm
- Weather Station: Davis VP2+ & GW1000 (Standalone)
- Operating System: Win10 Pro / rPi Buster
- Location: Australia
Re: Custom Alarm Function
I constantly revisit a similar concept regarding overall failures.
The two basic concepts in mind were a bit like this.
1. A heartbeat file is periodically uploaded to somewhere on hosiene.co.uk & a script running on the server decides if it need to notify the user that the stations off-line.
That idea would be immediately flawed in the case of a host failure etc; Ftp could be failing to the host but fine to hosiene.
2. A script on hosiene grabs a users realtime.txt periodically, say 15 or 30 minute intervals, or definable with an appropriate lower limit minimum.
If the request fails or doesn't compare appropriately a notification is sent.
Both ideas would obviously need to be server based & keep within bandwidth limitations.
Cheers
Phil.
Edit:- Light bulb moment as usual on hitting submit....
Alternate location for the server side scripts to be hosted & run from could be beteljuice.co.uk
The two basic concepts in mind were a bit like this.
1. A heartbeat file is periodically uploaded to somewhere on hosiene.co.uk & a script running on the server decides if it need to notify the user that the stations off-line.
That idea would be immediately flawed in the case of a host failure etc; Ftp could be failing to the host but fine to hosiene.
2. A script on hosiene grabs a users realtime.txt periodically, say 15 or 30 minute intervals, or definable with an appropriate lower limit minimum.
If the request fails or doesn't compare appropriately a notification is sent.
Both ideas would obviously need to be server based & keep within bandwidth limitations.
Cheers
Phil.
Edit:- Light bulb moment as usual on hitting submit....
Alternate location for the server side scripts to be hosted & run from could be beteljuice.co.uk
:Now: :Today/Yesterday:
Main Station Davis VP2+ Running Via Win10 Pro.
Secondary Stations, Ecowitt HP2551/GW1000 Via rPi 3 & 4 Running Buster GUI.
:Local Inverell Ecowitt Station: :Remote Ashford Ecowitt Station:
Main Station Davis VP2+ Running Via Win10 Pro.
Secondary Stations, Ecowitt HP2551/GW1000 Via rPi 3 & 4 Running Buster GUI.
:Local Inverell Ecowitt Station: :Remote Ashford Ecowitt Station:
-
- Posts: 2474
- Joined: Wed 08 Jun 2011 11:19 am
- Weather Station: Davis Vantage Pro 2 + Ecowitt
- Operating System: GNU/Linux Ubuntu 22.04 LXC
- Location: Alcaston, Shropshire, UK
- Contact:
Re: Custom Alarm Function
A good idea - the external monitoring bit - but as you point out it is prone to host/internet connection failures, so I think a centralised monitor is unworkable.Phil23 wrote: ↑Wed 15 Sep 2021 10:07 pm I constantly revisit a similar concept regarding overall failures.
The two basic concepts in mind were a bit like this.
1. A heartbeat file is periodically uploaded to somewhere on hosiene.co.uk & a script running on the server decides if it need to notify the user that the stations off-line.
That idea would be immediately flawed in the case of a host failure etc; Ftp could be failing to the host but fine to hosiene.
2. A script on hosiene grabs a users realtime.txt periodically, say 15 or 30 minute intervals, or definable with an appropriate lower limit minimum.
If the request fails or doesn't compare appropriately a notification is sent.
Both ideas would obviously need to be server based & keep within bandwidth limitations.
Cheers
Phil.
Edit:- Light bulb moment as usual on hitting submit....
Alternate location for the server side scripts to be hosted & run from could be beteljuice.co.uk
What I do is periodically check access to the port that the MX interface is running on, which I have found to be extremely reliable. It's not a complex script - just a simple one-liner. I put it directly in my crontab and set it to run every 5 minutes and it will drop you an email if the connection is unavailable.
Code: Select all
nc -zw 2 IP.ADDR.OF.MX 8998 && { echo "CumulusMX up" ; } || { `mail -r xxxx@hosiene.co.uk -s "[LAN monitor]: CumulusMX check" yyyy@hosiene.co.uk <<< 'CumulusMX is down'` ; }
Code: Select all
sudo apt install netcat
-
- Posts: 159
- Joined: Sun 08 May 2016 9:11 pm
- Weather Station: Vantage Pro 2
- Operating System: Windows Server 2019
- Location: Raleigh, NC
Re: Custom Alarm Function
Yeah I do like the idea. However, for some folks (myself included) it wouldn't be that useful. Everything is local; physical server, CMX db, web server, etc.
My idea (hope?) was just the support for a custom function. Like the ability to call a batch file or ps script. Then I can make it do whatever magic I'd like
My idea (hope?) was just the support for a custom function. Like the ability to call a batch file or ps script. Then I can make it do whatever magic I'd like
-
- Posts: 2474
- Joined: Wed 08 Jun 2011 11:19 am
- Weather Station: Davis Vantage Pro 2 + Ecowitt
- Operating System: GNU/Linux Ubuntu 22.04 LXC
- Location: Alcaston, Shropshire, UK
- Contact:
Re: Custom Alarm Function
The drawback of a custom function is that it won't tell you if MX stops running - as it will be MX triggering your magic.
This idea (using nc or some other external utility) is purely for alerting you when MX stops running.
This idea (using nc or some other external utility) is purely for alerting you when MX stops running.
-
- Posts: 884
- Joined: Sat 16 Jul 2016 11:59 pm
- Weather Station: Davis VP2+ & GW1000 (Standalone)
- Operating System: Win10 Pro / rPi Buster
- Location: Australia
Re: Custom Alarm Function
If you are locally hosting a publicly visible website, then wouldn't something like the 2nd idea would make sense.stefanbagnato wrote: ↑Thu 16 Sep 2021 12:43 pm Yeah I do like the idea. However, for some folks (myself included) it wouldn't be that useful. Everything is local; physical server, CMX db, web server, etc.
The initial idea is not so much a CMX not working watchdog, more a case of simply my Website is not updating.
That could be for a variety of reasons in the chain.
:Now: :Today/Yesterday:
Main Station Davis VP2+ Running Via Win10 Pro.
Secondary Stations, Ecowitt HP2551/GW1000 Via rPi 3 & 4 Running Buster GUI.
:Local Inverell Ecowitt Station: :Remote Ashford Ecowitt Station:
Main Station Davis VP2+ Running Via Win10 Pro.
Secondary Stations, Ecowitt HP2551/GW1000 Via rPi 3 & 4 Running Buster GUI.
:Local Inverell Ecowitt Station: :Remote Ashford Ecowitt Station:
-
- Posts: 884
- Joined: Sat 16 Jul 2016 11:59 pm
- Weather Station: Davis VP2+ & GW1000 (Standalone)
- Operating System: Win10 Pro / rPi Buster
- Location: Australia
Re: Custom Alarm Function
So if a service running on another Webhost somewhere was to grab my realtime.txt file every hour or two,
That would serve as a time stamp & could be compared with now and then in need be trigger an email etc.
Does that create difficulties from the point of view of cross site scripting?
Developing something like this is way out of my skill sets & have no idea what can and cannot be done from a hosts side.
Phil.
That would serve as a time stamp & could be compared with now and then in need be trigger an email etc.
Does that create difficulties from the point of view of cross site scripting?
Developing something like this is way out of my skill sets & have no idea what can and cannot be done from a hosts side.
Phil.
:Now: :Today/Yesterday:
Main Station Davis VP2+ Running Via Win10 Pro.
Secondary Stations, Ecowitt HP2551/GW1000 Via rPi 3 & 4 Running Buster GUI.
:Local Inverell Ecowitt Station: :Remote Ashford Ecowitt Station:
Main Station Davis VP2+ Running Via Win10 Pro.
Secondary Stations, Ecowitt HP2551/GW1000 Via rPi 3 & 4 Running Buster GUI.
:Local Inverell Ecowitt Station: :Remote Ashford Ecowitt Station:
-
- Posts: 2474
- Joined: Wed 08 Jun 2011 11:19 am
- Weather Station: Davis Vantage Pro 2 + Ecowitt
- Operating System: GNU/Linux Ubuntu 22.04 LXC
- Location: Alcaston, Shropshire, UK
- Contact:
Re: Custom Alarm Function
It's a simple enough proposal. It won't be affected by XSS if you code it appropriately. I would implement it internally to your LAN if it was just a lack of updates that you wished to notice. The only reason I would do it from another web host out in the wild was if you wanted to notice lack of access to your whole website - but there are providers out there who already offer this service.
-
- Posts: 159
- Joined: Sun 08 May 2016 9:11 pm
- Weather Station: Vantage Pro 2
- Operating System: Windows Server 2019
- Location: Raleigh, NC
Re: Custom Alarm Function
Yes, this is true. IMO I think this has morphed into multiple ideas, which is awesome. My initial premise was simply related to when there is an issue with data making it to CMX, and the subsequent actions taken. However, the CMX -> Website link is equally important as well, as you stated.Phil23 wrote: ↑Thu 16 Sep 2021 8:37 pm If you are locally hosting a publicly visible website, then wouldn't something like the 2nd idea would make sense.
The initial idea is not so much a CMX not working watchdog, more a case of simply my Website is not updating.
That could be for a variety of reasons in the chain.
-
- Posts: 884
- Joined: Sat 16 Jul 2016 11:59 pm
- Weather Station: Davis VP2+ & GW1000 (Standalone)
- Operating System: Win10 Pro / rPi Buster
- Location: Australia
Re: Custom Alarm Function
Ok,
Interesting real life example came up yesterday while attending one of my client's sites.
The Spare Parts Guy hits me with "When are you going to Fix your Weather Pages?".
I told him it was fine, he argued it was stuck on the 15th @ 18°C.
Opened the Gauges page in his browser & showed him it was fine.
He added that yes, the gauges worked OK & all the others were broken.
Tried hard refreshes & confirmed he was right.
Checked the same on my phone & again he's right.
Back home I find a 2nd instance has loaded due to a script timing issue (maybe).
Restarted & all was back to being fine.
So the state it was in had Realtime FTP still running fine, but the 10 minute interval process & upload was what had broken.
So in effect that creates a fault in my suggestion above that just the Realtime.txt could be used as the basis of a watchdog.
Although I check my station repeatedly each day, my link button point to the gauges page & I mostly simply take a glance then get back to what I'm doing.
Interesting real life example came up yesterday while attending one of my client's sites.
The Spare Parts Guy hits me with "When are you going to Fix your Weather Pages?".
I told him it was fine, he argued it was stuck on the 15th @ 18°C.
Opened the Gauges page in his browser & showed him it was fine.
He added that yes, the gauges worked OK & all the others were broken.
Tried hard refreshes & confirmed he was right.
Checked the same on my phone & again he's right.
Back home I find a 2nd instance has loaded due to a script timing issue (maybe).
Restarted & all was back to being fine.
So the state it was in had Realtime FTP still running fine, but the 10 minute interval process & upload was what had broken.
So in effect that creates a fault in my suggestion above that just the Realtime.txt could be used as the basis of a watchdog.
Although I check my station repeatedly each day, my link button point to the gauges page & I mostly simply take a glance then get back to what I'm doing.
:Now: :Today/Yesterday:
Main Station Davis VP2+ Running Via Win10 Pro.
Secondary Stations, Ecowitt HP2551/GW1000 Via rPi 3 & 4 Running Buster GUI.
:Local Inverell Ecowitt Station: :Remote Ashford Ecowitt Station:
Main Station Davis VP2+ Running Via Win10 Pro.
Secondary Stations, Ecowitt HP2551/GW1000 Via rPi 3 & 4 Running Buster GUI.
:Local Inverell Ecowitt Station: :Remote Ashford Ecowitt Station:
- dazza1223
- Posts: 867
- Joined: Sun 25 Jan 2015 8:41 pm
- Weather Station: Davis Vantage Pro 2 plus
- Operating System: Raspberry pi 4 (4gb)
- Location: Worthing
- Contact:
Re: Custom Alarm Function
i came across this and i think i will use it but i put all my email in and the ip off cmx but im not getting the email when i stop cmxfreddie wrote: ↑Thu 16 Sep 2021 7:41 amA good idea - the external monitoring bit - but as you point out it is prone to host/internet connection failures, so I think a centralised monitor is unworkable.Phil23 wrote: ↑Wed 15 Sep 2021 10:07 pm I constantly revisit a similar concept regarding overall failures.
The two basic concepts in mind were a bit like this.
1. A heartbeat file is periodically uploaded to somewhere on hosiene.co.uk & a script running on the server decides if it need to notify the user that the stations off-line.
That idea would be immediately flawed in the case of a host failure etc; Ftp could be failing to the host but fine to hosiene.
2. A script on hosiene grabs a users realtime.txt periodically, say 15 or 30 minute intervals, or definable with an appropriate lower limit minimum.
If the request fails or doesn't compare appropriately a notification is sent.
Both ideas would obviously need to be server based & keep within bandwidth limitations.
Cheers
Phil.
Edit:- Light bulb moment as usual on hitting submit....
Alternate location for the server side scripts to be hosted & run from could be beteljuice.co.uk
What I do is periodically check access to the port that the MX interface is running on, which I have found to be extremely reliable. It's not a complex script - just a simple one-liner. I put it directly in my crontab and set it to run every 5 minutes and it will drop you an email if the connection is unavailable.
'nc' is netcat. If you don't have it installed, use the following:Code: Select all
nc -zw 2 IP.ADDR.OF.MX 8998 && { echo "CumulusMX up" ; } || { `mail -r xxxx@hosiene.co.uk -s "[LAN monitor]: CumulusMX check" yyyy@hosiene.co.uk <<< 'CumulusMX is down'` ; }
Other package managers use different commands to install.Code: Select all
sudo apt install netcat
- dazza1223
- Posts: 867
- Joined: Sun 25 Jan 2015 8:41 pm
- Weather Station: Davis Vantage Pro 2 plus
- Operating System: Raspberry pi 4 (4gb)
- Location: Worthing
- Contact:
Re: Custom Alarm Function
Yes I installed this
sudo apt install netcat
sudo apt install netcat
-
- Posts: 2474
- Joined: Wed 08 Jun 2011 11:19 am
- Weather Station: Davis Vantage Pro 2 + Ecowitt
- Operating System: GNU/Linux Ubuntu 22.04 LXC
- Location: Alcaston, Shropshire, UK
- Contact:
Re: Custom Alarm Function
That installs netcat (nc). I mean the mail program.
What does mail -V return?
What does mail -V return?