Domain Monitoring Tool

Status
Not open for further replies.
I don't want to keep this file available to just anybody, so I've added the code that was previously suggested to allow access only from localhost. Is it possible to add a password on the file so I can access it from elsewhere? I know I could allow from a specific IP address, but I don't have a static IP here and I'm often traveling to other places anyway. Can I do something like an .htaccess solution?
 
i got it now

Hey guys,

I'm running this on my webserver now, however are there any scripts to email the admin rather than the users? I'd like to see how this will effect my users, i.e. when will they receive emails, how often, and what would cause the system to email the user (apache process using over half the CPU for x amount of minutes?)

Secondly the domainmonitor.php that someone made on this list is no longer available, was it a pretty output, does anyone have a copy of it for me?

I want to see what it does before I start suspending users or sending them emails about over utilization when I dont know what the thresholds are.

Cheers
Barry
 
Re: i got it now

icepick said:
Hey guys,

I'm running this on my webserver now, however are there any scripts to email the admin rather than the users? I'd like to see how this will effect my users, i.e. when will they receive emails, how often, and what would cause the system to email the user (apache process using over half the CPU for x amount of minutes?)
Hello,

To change the email address notices are sent to you will need to edit the lib/directadmin.php file included in the archive. All of the PHP mail() functions will need changed to:
Code:
mail("[email protected]", ...
Instead of this tool you may also be interested in the Apache mod_throttle module. You can do similar stuff with that.

Cheers, Phil.
 
script auto unsuspends

Ok, while I do really like this script there is one major flaw about how the suspend/unsuspend is handled.

When an admin suspends an account manually (for whatever reason non-payment, etc) this script will just unsuspend it automatically if the user is not at the resource limits. (eg no tracking is done on the script to see if it was actually suspended by the script or by an admin).

This would be something that I would see as being a majorly needed feature to this script, otherwise it makes it kind of unuseable.
 
Dear guys,

I have read it... I try to install but i faild.. (Fedora 3 server)

I have on my server http://ip/httpd-server (its works)
the http.conf is also edited.
But it dont works..

Can someone just write the installation for "noopies"

- Where must i upload the files?
- Can is use /var/www/html/<directory>
- I have used my reseller account to create a mysql. Is this ok?

Could you chek this config file:

$__server_type = 'DirectAdmin';
$__server_addr = "IP;
$__server_user = ; <--RESELLER ACCOUNT?
$__server_pass = '; <--RESELLER PASSWORD??

$__url_source = 'http://IP/httpd-status';

$__sql_host = 'localhost';
$__sql_dbase = 'powerdomei_serv'; <Reseller DBASE
$__sql_user = 'powerdomei_serv';
$__sql_pass = '12345';

With these config file i get this error:

Warning: opendir(/usr/local/directadmin/data/users): failed to open dir: Permission denied in /var/www/html/cpu/lib/directadmin.php on line 36

Warning: readdir(): supplied argument is not a valid Directory resource in /var/www/html/cpu/lib/directadmin.php on line 37

Warning: closedir(): supplied argument is not a valid Directory resource in /var/www/html/cpu/lib/directadmin.php on line 70

Warning: opendir(/usr/local/directadmin/data/users): failed to open dir: Permission denied in /var/www/html/cpu/lib/directadmin.php on line 36

Warning: readdir(): supplied argument is not a valid Directory resource in /var/www/html/cpu/lib/directadmin.php on line 37
mysql error: Unknown column 'status' in 'field list'
mysql error code: 1054

Please i need just some help!
 
Can anyone explain me what represent exactly the values of average cpu load and process in the monitor tool?

I can compare and its nice but i would like know more, in some box this values variaty a lot of.

Thanks
 
I cannot create a cron job

Hello everybody

I cannot create a cron job for domain monitor

Can anyone help me?


This is the cron job I already create:
*/5 * * * * root /usr/local/bin/php -f /usr/local/monitor/monitor.php
 
those links are not working anymore.
has somewone these modifed files?


XBL said:
@ RayManZ: You set the 'zero' to the actual suspend limit (is kind of confusing, I had to read it from monitor.php).

@ Everyone: I made a small script to monitor the database. Current functions:
  • Order by:
  • Domain
  • CPU Usage
  • Processes
  • Descending and Ascending
  • Search by domain
Any ideas on what to add are very welcome (e-mail (jochem at vuilnisbak dot com) or PM).

Download: domainmonitor.php
Test: domainmonitor/.
Username: admin
Password: password


Jochem
 
Ok, while I do really like this script there is one major flaw about how the suspend/unsuspend is handled.

When an admin suspends an account manually (for whatever reason non-payment, etc) this script will just unsuspend it automatically if the user is not at the resource limits. (eg no tracking is done on the script to see if it was actually suspended by the script or by an admin).

This would be something that I would see as being a majorly needed feature to this script, otherwise it makes it kind of unuseable.

Same problem is here.

Is there any way to solve unsuspend problem?
 
error in mysql

[root@server15 ~]# /usr/local/bin/php -f monitor.php
fatal error: UPDATE cpu_monitor SET status='warned' WHERE domain='xxxxxx.xxx'<p>mysql error: Unknown column 'status' in 'field list'<br>mysql error code: 1054



Wael
 
dedi262:/home/ricky/domain# php monitor.php
Table updated

But cpu_monitor is empty :eek:
 
i got 2 question:

may i do server-status link showin in only a domain?

example: my-company-domain/serverstatus ok
client-domain/serverstatus doesnt work

is possible?

second, there is a php file for see the stats sorted and graphics?

thanks
 
help

1st, does this script actually work?
2nd, going through directadmin.php, I dont see how to change the php mail() functions
I have a particular server that seems to go into high load average (30+) on Sunday of each week, by the time I get there its almost impossible to sort where the troubles are, so I'm hoping that this will help sort the problems. I to want to be notified as to which domain is causing the troubles, any updates on a package that is more configurable?

Hello,

To change the email address notices are sent to you will need to edit the lib/directadmin.php file included in the archive. All of the PHP mail() functions will need changed to:
Code:
mail("[email protected]", ...
Instead of this tool you may also be interested in the Apache mod_throttle module. You can do similar stuff with that.

Cheers, Phil.
 
Status
Not open for further replies.
Back
Top