Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 2 > Installation/Configuration

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #21  
Old 27th August 2006, 15:35
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,046
Thanks: 826
Thanked 5,388 Times in 4,233 Posts
Default

If the IP 213.173.250.118 is the IP address of your server, then you are monitoring the services on your server.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
Sponsored Links
  #22  
Old 28th August 2006, 02:48
MicCo MicCo is offline
Junior Member
 
Join Date: Aug 2006
Location: Denmark
Posts: 23
Thanks: 0
Thanked 0 Times in 0 Posts
Post

Quote:
Originally Posted by till
If the IP 213.173.250.118 is the IP address of your server, then you are monitoring the services on your server.
Hello Till,

Yes also what we was hoping to do, and then ?
__________________
Best regards,

MicCo
________________________________
Reply With Quote
  #23  
Old 28th August 2006, 10:47
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,046
Thanks: 826
Thanked 5,388 Times in 4,233 Posts
Default

Quote:
Originally Posted by MicCo
Yes also what we was hoping to do, and then ?
You are now monitoring your server and you where informed by email when a service stops running on your server. Thats the purpose of the services monitoring tool.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #24  
Old 28th August 2006, 22:48
MicCo MicCo is offline
Junior Member
 
Join Date: Aug 2006
Location: Denmark
Posts: 23
Thanks: 0
Thanked 0 Times in 0 Posts
Exclamation WARNING: service not running

Hello Till,

Regarding:
Quote:
Originally Posted by till
You are now monitoring your server and you where informed by email when a service stops running on your server. Thats the purpose of the services monitoring tool.
- You are right as far as that is what the monitoring service are for and that it was a hope that we was monitoring our server where the ISPConfig are installed.

But You see the problem is when we activate (Active = Yes) other monitoring of other services then the once activated in topic no. 20, where You can see an screenshot of the ISP Services, then we recive an warning with the information saying:

Quote:
WARNING: service not running (server: epsilon.eurohost.dk, port: 22)!

WARNING: service dns not running (server: epsilon.eurohost.dk, port: 53)!

WARNING: service dns not running (server: epsilon.eurohost.dk, port: 53)!

WARNING: service not running (server: epsilon.eurohost.dk, port: 10000)!

WARNING: service mail not running (server: epsilon.eurohost.dk, port: 143)!

WARNING: service mail not running (server: epsilon.eurohost.dk, port: 993)!

WARNING: service pop3 not running (server: epsilon.eurohost.dk, port: 995)!

WARNING: service not running (server: epsilon.eurohost.dk, port: 3306)!

WARNING: service web not running (server: epsilon.eurohost.dk, port: 953)!

WARNING: service not running (server: epsilon.eurohost.dk, port: 8888)!

WARNING: service not running (server: epsilon.eurohost.dk, port: 17070)!

WARNING: service web not running (server: epsilon.eurohost.dk, port: 4949)!
But whit only the active monitoring as You can see at topic no. 20 then we do not recive such message/warning, so the conclution must be that the monitoring of the server can't be done for other then this activated services as showend in topic no. 20.
__________________
Best regards,

MicCo
________________________________
Reply With Quote
  #25  
Old 29th August 2006, 18:26
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,741 Times in 2,575 Posts
Default

I'm not quite sure I understand what your problem is right now...
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #26  
Old 31st August 2006, 21:31
MicCo MicCo is offline
Junior Member
 
Join Date: Aug 2006
Location: Denmark
Posts: 23
Thanks: 0
Thanked 0 Times in 0 Posts
Exclamation

Hi Falko,

Regarding:
Quote:
Originally Posted by falko
I'm not quite sure I understand what your problem is right now...
The problem isen't a problem as so, but any way, some how it is, due to that fact as described the warning send by email from the system says that all active monitored services aint running, as soon as we add one of the other services on the list then the once showing to be monitored at the screenshot.



Just to make sure that You do understand.

By running monitoring of the services showend as active at the screenshot = No warning by email are recived.

By activating one more, of the other services showend as not monitored, we recive an warning by the system telling us that alle the monitored services AIN'T running.

Summar Summarum = can we trust the warnings send from the system (ISPConfig) to be right, due to the fact that if we test the services to run, the result is that they are all running, EVEN that the warning send by email by the system, ISPConfig, says that the services ain't running.!!!!

Pyyyhhaaa, that was a lot of ways to say the same thing, sorry.
__________________
Best regards,

MicCo
________________________________
Reply With Quote
  #27  
Old 1st September 2006, 17:22
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,741 Times in 2,575 Posts
Default

Quote:
Originally Posted by MicCo
By activating one more, of the other services showend as not monitored, we recive an warning by the system telling us that alle the monitored services AIN'T running.
What does /root/ispconfig/scripts/shell/check_services.php look like when this happens again?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #28  
Old 2nd September 2006, 21:41
MicCo MicCo is offline
Junior Member
 
Join Date: Aug 2006
Location: Denmark
Posts: 23
Thanks: 0
Thanked 0 Times in 0 Posts
Thumbs up

Hi Falko,

Regarding:
Quote:
Originally Posted by falko
What does /root/ispconfig/scripts/shell/check_services.php look like when this happens again?
This is how it looks before adding any other monitoring:
Quote:
<?php

class check_services {

function warning()
{

$warning = "";

if(!$this->_check_tcp("213.173.250.118",80)) {
$warning .= "WARNING: service web not running (server: epsilon.eurohost.dk, port: 80)!\n\n";

}
if(!$this->_check_ftp("213.173.250.118",21)) {
$warning .= "WARNING: service ftp not running (server: epsilon.eurohost.dk, port: 21)!\n\n";

}
if(!$this->_check_tcp("213.173.250.118",25)) {
$warning .= "WARNING: service mail not running (server: epsilon.eurohost.dk, port: 25)!\n\n";

}
if(!$this->_check_tcp("213.173.250.118",110)) {
$warning .= "WARNING: service pop3 not running (server: epsilon.eurohost.dk, port: 110)!\n\n";

}



if($warning != ""){
$warning .= "Message generated at ".date("F j, Y, G:i", time()).".\n";
return $warning;
} else {
return false;
}

}

function _check_tcp ($host,$port) {

$fp = fsockopen ($host, $port, &$errno, &$errstr, 2);

if ($fp) {
fclose($fp);
return true;
} else {
return false;
}
}

function _check_udp ($host,$port) {

$fp = fsockopen ('udp://'.$host, $port, &$errno, &$errstr, 2);

if ($fp) {
fclose($fp);
return true;
} else {
return false;
}
}

function _check_ftp ($host,$port){

$conn_id = @ftp_connect($host, $port);

if($conn_id){
@ftp_close($conn_id);
return true;
} else {
return false;
}
}
}

$cs = new check_services;

if(is_file("/home/admispconfig/ispconfig/adminmail.txt")){
$fp = fopen ("/home/admispconfig/ispconfig/adminmail.txt", "r");
$email = trim(fread($fp, filesize ("/home/admispconfig/ispconfig/adminmail.txt")));
fclose($fp);
$email = str_replace("\r\n", "", $email);
$email = str_replace("\r", "", $email);
$email = str_replace("\n", "", $email);
}
$msg = $cs->warning();
if(!empty($email) && strstr($email, "@") && strlen($email) > 3 && $msg) mail($email, "WARNING: services not running", $msg);
?>
This is what it looks like when adding monitoring for service at port 443:

Quote:
<?php

class check_services {

function warning()
{

$warning = "";

if(!$this->_check_tcp("213.173.250.118",80)) {
$warning .= "WARNING: service web not running (server: epsilon.eurohost.dk, port: 80)!\n\n";

}
if(!$this->_check_ftp("213.173.250.118",21)) {
$warning .= "WARNING: service ftp not running (server: epsilon.eurohost.dk, port: 21)!\n\n";

}
if(!$this->_check_tcp("213.173.250.118",25)) {
$warning .= "WARNING: service mail not running (server: epsilon.eurohost.dk, port: 25)!\n\n";

}
if(!$this->_check_tcp("213.173.250.118",110)) {
$warning .= "WARNING: service pop3 not running (server: epsilon.eurohost.dk, port: 110)!\n\n";

}
if(!$this->_check_tcp("213.173.250.118/SSL",443)) {
$warning .= "WARNING: service not running (server: epsilon.eurohost.dk, port: 443)!\n\n";

}



if($warning != ""){
$warning .= "Message generated at ".date("F j, Y, G:i", time()).".\n";
return $warning;
} else {
return false;
}

}

function _check_tcp ($host,$port) {

$fp = fsockopen ($host, $port, &$errno, &$errstr, 2);

if ($fp) {
fclose($fp);
return true;
} else {
return false;
}
}

function _check_udp ($host,$port) {

$fp = fsockopen ('udp://'.$host, $port, &$errno, &$errstr, 2);

if ($fp) {
fclose($fp);
return true;
} else {
return false;
}
}

function _check_ftp ($host,$port){

$conn_id = @ftp_connect($host, $port);

if($conn_id){
@ftp_close($conn_id);
return true;
} else {
return false;
}
}
}

$cs = new check_services;

if(is_file("/home/admispconfig/ispconfig/adminmail.txt")){
$fp = fopen ("/home/admispconfig/ispconfig/adminmail.txt", "r");
$email = trim(fread($fp, filesize ("/home/admispconfig/ispconfig/adminmail.txt")));
fclose($fp);
$email = str_replace("\r\n", "", $email);
$email = str_replace("\r", "", $email);
$email = str_replace("\n", "", $email);
}
$msg = $cs->warning();
if(!empty($email) && strstr($email, "@") && strlen($email) > 3 && $msg) mail($email, "WARNING: services not running", $msg);
?>
Looking forward to see Your comment.
__________________
Best regards,

MicCo
________________________________
Reply With Quote
  #29  
Old 3rd September 2006, 18:01
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,046
Thanks: 826
Thanked 5,388 Times in 4,233 Posts
Default

Please post a screenshot of the web form where you entered the port 443 monitoring.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #30  
Old 4th September 2006, 00:01
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,741 Times in 2,575 Posts
 
Default

What's this?
Quote:
if(!$this->_check_tcp("213.173.250.118/SSL",443)) {
$warning .= "WARNING: service not running (server: epsilon.eurohost.dk, port: 443)!\n\n";

}
That's no valid IP address...
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
postfix problems with smtp linkdeb Server Operation 13 15th March 2014 17:58
log files, rotation and emailing them hairydog2 General 65 11th October 2006 13:18
Howto suggestion suse PhP ver 4 + Ver 5 wwparrish Suggest HOWTO 11 7th August 2006 13:29
Ethereal Trouble mcrosby Installation/Configuration 8 25th June 2006 03:50
Installation Big issue OpenVZ VPS jbond007 Installation/Configuration 3 7th March 2006 19:40


All times are GMT +2. The time now is 20:25.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.