I am running ZM 1.30 and apache on an RPI 3 under Fedora 23 . I find that running monitorix 3.9.0-1 clashes with zm somehow. Monitorix has its own builtin web server. Even if I configure the monitorix to listen on some high port, I can only connect to the first of zm and monitorix to startup. So, if I start zm first and then monitorix I can connect to the zm console, but not to the monitorix home page.
Has anyone stepped on this and found way to run zm and monitorix together?
ZM + monitorix?
- knight-of-ni
- Posts: 2406
- Joined: Thu Oct 18, 2007 1:55 pm
- Location: Shiloh, IL
Re: ZM + monitorix?
You are going to have to dig a little deeper and describe exactly what "clashes shomehow" means.
What exactly is happening that should not or what is not happening that should?
Please post relevant log file or configuration information to describe the situation.
According to this, monitorix runs on port 8080, so there is no tcpip port conflict:
http://www.monitorix.org/doc-redhat.html
Both Apache and Monitorix can run simultaneously, out of the box, with no problems.
While I don't use monitorix, I do run transmission, and it also has its own builtin web server which runs on an alternate port. While this won't fix the issue you are experiencing, one can create a single web site experience by configuring a Reverse Proxy in Apache server to alias an arbitrary url, such as myserver/transmission which points to myserver:8080. See the apache reverse proxy documentation.
Since the raspberry pi has only 1GB of ram, memory consumption is always an issue, and zoneminder+apache+mysql will use nearly all of it. You have to keep an eye on both your physical ram and the free space in your ramdisk, /dev/shm/.
Some auxiliary notes just to make you aware:
- Zabbix is also available in the repos. This tool would require you to install just the client on your pi, and then the server portion would go on some other machine.
- Have you tried Fedberry? It is a Fedora spin, but unlike Fedora it supports all the raspi's hardware (i2c, bluetooth, wifi, etc) out of the box. http://fedberry.org/
- See my blog on how to install zoneminder on a raspi 3 running Fedberry. It documents the considerations you need to make in order to monitor and conserve as much memory as possible: http://zoneminder.blogspot.com/p/raspberry-pi-3.html
What exactly is happening that should not or what is not happening that should?
Please post relevant log file or configuration information to describe the situation.
According to this, monitorix runs on port 8080, so there is no tcpip port conflict:
http://www.monitorix.org/doc-redhat.html
Both Apache and Monitorix can run simultaneously, out of the box, with no problems.
While I don't use monitorix, I do run transmission, and it also has its own builtin web server which runs on an alternate port. While this won't fix the issue you are experiencing, one can create a single web site experience by configuring a Reverse Proxy in Apache server to alias an arbitrary url, such as myserver/transmission which points to myserver:8080. See the apache reverse proxy documentation.
Since the raspberry pi has only 1GB of ram, memory consumption is always an issue, and zoneminder+apache+mysql will use nearly all of it. You have to keep an eye on both your physical ram and the free space in your ramdisk, /dev/shm/.
Some auxiliary notes just to make you aware:
- Zabbix is also available in the repos. This tool would require you to install just the client on your pi, and then the server portion would go on some other machine.
- Have you tried Fedberry? It is a Fedora spin, but unlike Fedora it supports all the raspi's hardware (i2c, bluetooth, wifi, etc) out of the box. http://fedberry.org/
- See my blog on how to install zoneminder on a raspi 3 running Fedberry. It documents the considerations you need to make in order to monitor and conserve as much memory as possible: http://zoneminder.blogspot.com/p/raspberry-pi-3.html
Visit my blog for ZoneMinder related projects using the Raspberry Pi, Orange Pi, Odroid, and the ESP8266
All of these can be found at https://zoneminder.blogspot.com/
All of these can be found at https://zoneminder.blogspot.com/
Re: ZM + monitorix?
Thanks for your helpful reply. After installing monitorix the rpi hung. Since it's in a remote location I wasn't able to reset it myself. Itrebooted after a few hours. I tried to run monitorix again and was able to connect to it briefly, but it hung and later rebooted itself again. So then I decided to remove monitorix. "dnf remove monitorix" uninstalled monitorix along with zoneminder and emacs to boot. dnf is not supposed to do that. A reinstall and a mysql restore fixed it. My install on this rpi is fedberry 23, by the way.
I am aware of zabbix, but was attracted by the lightweight and quick and dirty features of monitorix, unfortunately. I will look more fully into zabbix now.
In my small scale zoneminder installation, there doesn't seem to be any shortage of memory. I am running 2 VGA resolution cams, one at 15 FPS with Modect and the other at 7 FPS Motion only. Memory shows about 100 MB free and 550 MB buffers/cache. /dev/shm varies from 31% to 39% used. Load is never higher than 1.6. I plan to add one or two more of these cams. I am surprised at how well zm runs on the rpi3. Completely adequate for a small retail location.
By the way, thanks much for the excellent documentation on zm on rpi on your website which I had already discovered after my own installation. Have you been able to boot fedora on the rpi3 from a usb hard drive? I am about to try to set it up following Raspbian instructions. Such commentary as I have found on the fedora setup focused on the fedora 64bit Arm distribution which is not my case.
I am aware of zabbix, but was attracted by the lightweight and quick and dirty features of monitorix, unfortunately. I will look more fully into zabbix now.
In my small scale zoneminder installation, there doesn't seem to be any shortage of memory. I am running 2 VGA resolution cams, one at 15 FPS with Modect and the other at 7 FPS Motion only. Memory shows about 100 MB free and 550 MB buffers/cache. /dev/shm varies from 31% to 39% used. Load is never higher than 1.6. I plan to add one or two more of these cams. I am surprised at how well zm runs on the rpi3. Completely adequate for a small retail location.
By the way, thanks much for the excellent documentation on zm on rpi on your website which I had already discovered after my own installation. Have you been able to boot fedora on the rpi3 from a usb hard drive? I am about to try to set it up following Raspbian instructions. Such commentary as I have found on the fedora setup focused on the fedora 64bit Arm distribution which is not my case.
- knight-of-ni
- Posts: 2406
- Joined: Thu Oct 18, 2007 1:55 pm
- Location: Shiloh, IL
Re: ZM + monitorix?
Not sure what the issue was with monitorix. More experimentation would need to be one. It could be disk i/o or database.
If you followed the instructions on my blog for configuring the database, then you've got mariadb configured for extreme maximum memory conservation. That comes at the great expense of performance. Those blog instructions certainly do not take into account a second application that needs access to the database. You might need to open that back up a bit.
There is also the possibility you've got a bottleneck with the usb 2 bus. Not sure what you are writing to for event storage, but many solutions use the usb 2 bus one way or another. If your cameras are usb, then that would use a ton of usb bandwidth. If your pi is connected via wired ethernet connection and the usb bus was overwhelmed, that could explain why you lost your remote connection, since the wired nic uses the usb bus too.
Generally though, it sounds like you are doing it right. You've got to watch all the hardware resources on the pi each time you make a change as it is very easy to overwhelm it.
I've not used Zabbix much for the statistics, although I probably should. I've got a Zabbix client on my raspi, which has been deployed at my parent's home since last Christmas. I'll get an email alert the moment there is any kind of problem, but so far I've had none. It runs like a champ.
If you are only interested in statistics, there is also the raspberry monitor program which collects statistics (raspimon?). It came builtin with one of my Armbian projects and has a convenient web portal that runs on port 8080. I'm sure it wouldn't be too hard to install it on Fedora.
Hope some of this helps
If you followed the instructions on my blog for configuring the database, then you've got mariadb configured for extreme maximum memory conservation. That comes at the great expense of performance. Those blog instructions certainly do not take into account a second application that needs access to the database. You might need to open that back up a bit.
There is also the possibility you've got a bottleneck with the usb 2 bus. Not sure what you are writing to for event storage, but many solutions use the usb 2 bus one way or another. If your cameras are usb, then that would use a ton of usb bandwidth. If your pi is connected via wired ethernet connection and the usb bus was overwhelmed, that could explain why you lost your remote connection, since the wired nic uses the usb bus too.
Generally though, it sounds like you are doing it right. You've got to watch all the hardware resources on the pi each time you make a change as it is very easy to overwhelm it.
I've not used Zabbix much for the statistics, although I probably should. I've got a Zabbix client on my raspi, which has been deployed at my parent's home since last Christmas. I'll get an email alert the moment there is any kind of problem, but so far I've had none. It runs like a champ.
If you are only interested in statistics, there is also the raspberry monitor program which collects statistics (raspimon?). It came builtin with one of my Armbian projects and has a convenient web portal that runs on port 8080. I'm sure it wouldn't be too hard to install it on Fedora.
Hope some of this helps
Visit my blog for ZoneMinder related projects using the Raspberry Pi, Orange Pi, Odroid, and the ESP8266
All of these can be found at https://zoneminder.blogspot.com/
All of these can be found at https://zoneminder.blogspot.com/
Re: ZM + monitorix?
What sort of statistics are you looking for?
Might be worth keeping in mind that the enterprise monitoring solutions often offer freebies. I've used the Datadog agent on a Raspberry Pi - requires you to build the agent from source for ARM, but it's very lightweight - viewtopic.php?f=36&t=25439&p=97285&hilit=datadog#p97285. Works well, costs nothing, available anywhere etc. (similar story with Loggly and log uploads, btw).
Might be worth keeping in mind that the enterprise monitoring solutions often offer freebies. I've used the Datadog agent on a Raspberry Pi - requires you to build the agent from source for ARM, but it's very lightweight - viewtopic.php?f=36&t=25439&p=97285&hilit=datadog#p97285. Works well, costs nothing, available anywhere etc. (similar story with Loggly and log uploads, btw).