Forum

Error while getting statistics logfile index from webserver

Gour
19 October 2014, 23:42
Hello,

I'm running few web sites - each one is configured as Hiawatha's virtual host and the Hiawatha server itself is behind Nginx (reverse proxy).

I did configure database, launched Monitor-1.0 site and added few sites. All sites are listed in the Dashboard, green in color (I had some failures until figured out what to put for the Name, IP and port).

Moreover, I see bunch of *.txt.gz files in

hiawatha-root/var/lib/hiawatha/monitor


The problem is that there is no statistics - I tried by executing commands which are set in cron job and I even received email with the report, but it only contains several

Error while getting statistics logfile index from webserver


lines which are also listed in 'Events' tab.

Any hint what might be missing?

Hiawatha version:
Operating System:
Hugo Leisink
20 October 2014, 09:20
The Hiawatha Monitor should be able to directly connect to the Hiawatha webservers it monitors. It will not work via a reverse proxy, specially not if all are behind one and the same reverse proxy.
Gour
20 October 2014, 11:13
It will not work via a reverse proxy, specially not if all are behind one and the same reverse proxy.

Ahh, now it's clear.

Well, I have to wait with Monitor (and Hiawatha) on the front-end until I decide to admin my own VPS...the main thing which prevents me to do it is managinf/administering of my own mail server not wanting to create some mess. Otherwise, web stuff and MySQL/MariaDB won't be too difficult 'cause I'm already doing it on my Debian desktop machine.
Gour
31 October 2014, 08:05
I see that on my new hosts there are still bunch of *.txt.gz files in

hiawatha-root/var/lib/hiawatha/monitor


which disappear when I manually execute:

/monitorroot/public/database/fetch_webserver_logs


so it looks that crontab job is not working properly. At the moment it's set as root's cronjob, but maybe that's not correct?
Hugo Leisink
31 October 2014, 08:09
Doesn't matter who executes it, as long as it has access to website.conf for the database settings. What does 'crontab -l' show you?
Gour
31 October 2014, 11:06
What does 'crontab -l' show you?

Well, asking made me stupid, but helped to solve the problem.

I did have wrong paths in the cron, iow:

monitorroot/public/database/...

instead of:
monitorroot/database/...




Everything is fine now.

For root it shows:
SHELL=/bin/sh
*/5 * * * * /var/www/monitor/wwwroot/public/database/fetch_webserver_logs
0 0 * * * /var/www/monitor/wwwroot/public/database/delete_old_logs
59 23 * * * /var/www/monitor/wwwroot/publici/database/send_reports


according to README?
Hugo Leisink
31 October 2014, 11:11
Just change the publici to public in the last line and I think it looks ok.
This topic has been closed.