Domain Monitoring Tool

Status
Not open for further replies.
Great, I'm looking foward to it.

Also, what is likely to be the best way to set this up? Where is the best location to put it that it will work and not be a risk? Any possibility of making it so you don't have to have the monitor.php file open to the public to get information?
 
Updated the tarball.

Probably the best place to run this is in /home/admin/domain.monitor or something similar, however I currently have it running from /root/domin.monitor

Phi1.
 
Next chooce a MySQL database and execute the provided 'table.sql' file on it. Once the SQL executes, modify configure.php to reflect the database information you chose.

And while configure.php is up, fill in your new server-status URL. If you plan to suspend or warn users, you will need to fill in your administrative server control panel login details.

Lastly, run monitor.php via '/path/to/php /path/to/monitor.php' on the command line. If all goes well, you will want to set the command up as a cronjob. I suggest executing 'monitor.php' every 5 minutes, but you can do whatever you want.

do you mean i can view status at like http://serverip/statues.php?

and how to write a cron?

if i want to set up this cron under directadmin, how can i give command? thanks
 
Hello,
neorder said:
do you mean i can view status at like http://serverip/statues.php?
No, I view the program's status through phpMyAdmin.

neorder said:
and how to write a cron?

if i want to set up this cron under directadmin, how can i give command? thanks
I haven't used DA's cron feature, but I think you can enter "5" for minute and "/path/to/php /path/to/monitor.php" for command and it should work.

Phi1.
 
hi.

I have the similar problem. "Table updated." but it didnt write into the database. do you know how can i fix it?
 
I had this problem because apache was not setup properly.

Make sure you have the following in your httpd.conf

Code:
ExtendedStatus On
<Location /server-status>
        SetHandler server-status
</Location>
 
I don't think there is a specific spot. I have it stuck down at the bottom before the DA Alias's for squirrelmail, etc.

Phi1.
 
Anybody else had this problem.
I'm running Apache 1.3.31 with php 4.3.7
For some reason cpu usage calculations are not working, they remain at 0.01 or 0.00 even though viewing the monitor.php file from the web shows that users have considerable usage.

The number of processes appear to be working fine, just not cpu usage.
 
I fixed the problem. I had to comment out the the second average line where it divides by 2. After thats commented out it returns and shows the total cpu time as it should.
I'm also trying to get it to convert it to a cpu percentage usage instead of time, does anyone have some ideas how to get the necassary information to do the calculation with?

Also, if anybody else uses this, what are your suspend account settings.
 
If i put and config all the file in /root/

after this i run ./monitor.php

IT show this error :
./monitor.php: line 1: ?php: No such file or directory
./monitor.php: line 3: /aquota.group: Permission denied
./monitor.php: line 4: anaconda-ks.cfg: command not found
./monitor.php: line 5: anaconda-ks.cfg: command not found
./monitor.php: line 6: anaconda-ks.cfg: command not found
./monitor.php: line 7: anaconda-ks.cfg: command not found
./monitor.php: line 8: conf/: is a directory
./monitor.php: line 10: =: command not found
./monitor.php: line 13: require: command not found
./monitor.php: line 15: require: command not found
./monitor.php: line 16: syntax error near unexpected token `('
./monitor.php: line 16: `$DB = new DB_driver($__sql_host,$__sql_dbase,$__sql_user,$__sql_pass);'


What's wrong of my work ?
 
I can not run a cron job ...

I have creat a file call " domainmon " in /etc/cron.d/

I have put a line in the file

*/4 * * * * root php /root/monitor.php





but it seems ... it can not work properly ..... :confused:
 
This is more of a DA question than it is specifically for this script, but in which httpd.conf should I put it?

If I put it in /etc/httpd.conf then it will be overwritten right? So what if I added the /server-status/ to both /etc/httpd.conf and /usr/local/directadmin/data/templates/httpd.conf ?
 
wahaha said:
I can not run a cron job ...

I have creat a file call " domainmon " in /etc/cron.d/

I have put a line in the file

*/4 * * * * root php /root/monitor.php





but it seems ... it can not work properly ..... :confused:

You have to specify the full path to PHP otherwise it will not work in a cron job.

Regards,
Onno
 
File rights problem, whats a save one to do?

Hi all

i installed all and i'm getting this error

i dont want to messup the rights of directadmin
What rights should i use to fix this problem?


Warning: opendir(/usr/local/directadmin/data/users): failed to open dir: Permission denied in /home/nbhosting/domains/nbhosting.nl/public_html/scan/lib/directadmin.php on line 36

Warning: readdir(): supplied argument is not a valid Directory resource in /home/nbhosting/domains/nbhosting.nl/public_html/scan/lib/directadmin.php on line 37

Warning: closedir(): supplied argument is not a valid Directory resource in /home/nbhosting/domains/nbhosting.nl/public_html/scan/lib/directadmin.php on line 70
 
1) make sure you've got the latest copy.

2) does the code in line 70 resolve to a directory name? The error message says it doesn't.

Jeff
 
Status
Not open for further replies.
Back
Top