Monit information in Domoticz?
Moderators: leecollings, remb0
-
- Posts: 748
- Joined: Saturday 27 February 2016 12:49
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2020.2
- Location: NL
- Contact:
Monit information in Domoticz?
I installed Monit, following the instructions in the Wiki. It runs fine, but I was wondering how to display info from Monit in Domoticz.
Is this possible? If so, is there a description somewhere?
Is this possible? If so, is there a description somewhere?
Hans
-
- Posts: 11
- Joined: Wednesday 24 December 2014 13:23
- Target OS: Raspberry Pi / ODroid
- Domoticz version: beta
- Location: Toulouse, France
- Contact:
Re: Monit information in Domoticz?
it's possible using shell and a curl.
In a shell script just try :
You just need to define "${message}" and change the ip of domoticz with yours.
--max-time 15 sets a timeout to 15s
&>/dev/null removes the display
& allows to continue the script without waiting for the return of the command
hope it helps.
In a shell script just try :
Code: Select all
curl -Gs 'http://192.168.1.18:8080/json.htm' --data-urlencode "type=command" --data-urlencode "param=addlogmessage" --data-urlencode "message=${message}" --max-time 15 &>/dev/null &
--max-time 15 sets a timeout to 15s
&>/dev/null removes the display
& allows to continue the script without waiting for the return of the command
hope it helps.
---------------------------------------
Want more about Domoticz scripts and DiY devices?
Go to ---------- http://mydomotic.blogspot.com
Want more about Domoticz scripts and DiY devices?
Go to ---------- http://mydomotic.blogspot.com
-
- Posts: 748
- Joined: Saturday 27 February 2016 12:49
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2020.2
- Location: NL
- Contact:
Re: Monit information in Domoticz?
I'm not there yet.uNGam3R wrote: ↑Tuesday 05 September 2017 18:16 it's possible using shell and a curl.
In a shell script just try :
You just need to define "${message}" and change the ip of domoticz with yours.Code: Select all
curl -Gs 'http://192.168.1.18:8080/json.htm' --data-urlencode "type=command" --data-urlencode "param=addlogmessage" --data-urlencode "message=${message}" --max-time 15 &>/dev/null &
--max-time 15 sets a timeout to 15s
&>/dev/null removes the display
& allows to continue the script without waiting for the return of the command
hope it helps.
Where should I define this shell script? Which directory?
Where do I define the message? And which information is being transferred? I don't see a ref to a Monit file anywhere.
Am I missing something?
Hans
Re: Monit information in Domoticz?
What kind of info from Monit would you like to use in Domoticz?
-
- Posts: 748
- Joined: Saturday 27 February 2016 12:49
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2020.2
- Location: NL
- Contact:
Re: Monit information in Domoticz?
For starters, percentage-load would be good.
Reason is I just went through a confusing period where my R-Pi behaved strange and slow. Installed Monit and found a consistent load of 35 to 40%. Never knew it would be this high.
So I now move to a Pi-3, and Monit tells me it now runs at about 4%.
I want to ensure I see this in the future, if it happens.
So: total load of the R-Pi.
Hans
Re: Monit information in Domoticz?
In Domoticz -> Setup -> Hardware you can select Motherboard.
Then you get a sensor CPU_Usage (and others).
That's the easy way.
A lot of the Monit Info can be fetch with scripting.
If you want to check outside of Domoticz but still have history, install RPi-Monitor
Then you get a sensor CPU_Usage (and others).
That's the easy way.
A lot of the Monit Info can be fetch with scripting.
If you want to check outside of Domoticz but still have history, install RPi-Monitor
-
- Posts: 748
- Joined: Saturday 27 February 2016 12:49
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2020.2
- Location: NL
- Contact:
Re: Monit information in Domoticz?
OK, got it and it works.EddyG wrote: ↑Tuesday 05 September 2017 21:26 In Domoticz -> Setup -> Hardware you can select Motherboard.
Then you get a sensor CPU_Usage (and others).
That's the easy way.
A lot of the Monit Info can be fetch with scripting.
If you want to check outside of Domoticz but still have history, install RPi-Monitor
Is this based on Monit data, or can I remove that program now?
Hans
Re: Monit information in Domoticz?
It is internal to Domoticz, has nothing to do with Monit.
You still can use Monit, just to monitor processes and restart them if they die.
I use it to monitor several processes.
So if Domoticz dies for some reason you can monitor that with Monit and restart Domoticz.
Also if Domoticz uses too much cpu you can let Monit send you an email with that cpu usage.
etc......
You still can use Monit, just to monitor processes and restart them if they die.
I use it to monitor several processes.
So if Domoticz dies for some reason you can monitor that with Monit and restart Domoticz.
Also if Domoticz uses too much cpu you can let Monit send you an email with that cpu usage.
etc......
Who is online
Users browsing this forum: No registered users and 1 guest