Hello Silke,
I added your config for weewx to my monit config file but for my case it 
doesn't work. I have the problem that sometimes my gw1000 driver didn't 
work, probalby because of wifi problems. See topic here:

https://groups.google.com/g/weewx-user/c/muxtBGJWkJs

It happened yesterday again but monit did not start weewx.

Maybe you can help me?
Regards
Thomas

silke schrieb am Samstag, 9. März 2024 um 23:54:02 UTC+1:

> I'm sorry I saw your response a bit too late after posting here! Your 
> comments were really helpful 
>
> In case there are others out there using monit, this is my new working 
> config for weewx (avoiding use of PID altogether):
>
> check program weewx with path "/usr/bin/systemctl --quiet is-active weewx"
> if status != 0 then alert
> if status != 0 then exec "/usr/bin/systemctl start weewx.service"
> if 10 restarts within 10 cycles then timeout
>
> Tom Keffer schrieb am Samstag, 9. März 2024 um 23:35:10 UTC+1:
>
>> I don't know what I can add to the comments I already made on the issues 
>> list: the --pidfile option is only used if you use the --daemon option.
>>
>> On Sat, Mar 9, 2024 at 2:19 PM silke <silk...@gmail.com> wrote:
>>
>>> Hello,
>>>
>>> I recently made the switch to v5 and overall the migration was working 
>>> quite smoothly, despite running many extensions and skins. I'm on Ubuntu 
>>> and use DEB installation.
>>>
>>> The one thing that is not working yet is my weewx process health 
>>> monitoring which is based on PID file. I cannot get weewx to create a PID 
>>> file whatever I try. (in v4 this worked out of the box)
>>>
>>> I'm adding the --pidfile option to the systemd file, and it shows 
>>> correctly in the process list:
>>>
>>> weewx     941451 51.1  8.7 1921212 1415068 ?     Ssl  23:00   3:23 
>>> python3 /usr/share/weewx/weewxd.py /etc/weewx/weewx.conf --pidfile 
>>> /run/weewx/weewx.pid
>>>
>>> the folder /run/weewx is owned by weewx:weewx 
>>>
>>> silke@enterprise:/etc/weewx$ ls -la /run/weewx/
>>> total 0
>>> drwxrwxr-x  2 weewx weewx   40 Mär  9 23:00 .
>>> drwxr-xr-x 50 root  root  1420 Mär  9 23:00 ..
>>>
>>> but still, no file is getting created upon restart.
>>>
>>> Anyone having an idea what I'm doing wrong?
>>>
>>> Thanks a lot, Silke
>>>
>>> -- 
>>> You received this message because you are subscribed to the Google 
>>> Groups "weewx-user" group.
>>> To unsubscribe from this group and stop receiving emails from it, send 
>>> an email to weewx-user+...@googlegroups.com.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/weewx-user/fb454ef9-ae53-4211-bf15-283bd067c567n%40googlegroups.com
>>>  
>>> <https://groups.google.com/d/msgid/weewx-user/fb454ef9-ae53-4211-bf15-283bd067c567n%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to weewx-user+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/95e8effe-4eba-4078-8d0a-22a0b79ca9e8n%40googlegroups.com.

Reply via email to