Solved

Monit webpage showing white screen

Posted on 2008-06-25
24
392 Views
Last Modified: 2012-06-21
I have configured 2 monit for monitoring linux server processes

but after configuration when i checked the monitoring webpage in windows local machine...

i can see only a white blank page .. and other monit webpage giving currect output.

Kindly help me out!

 
0
Comment
Question by:jaisonshereen
  • 15
  • 9
24 Comments
 
LVL 14

Expert Comment

by:agriesser
ID: 21872556
Erm, can I please see the monitrc files of both machines?
Have you tried to restart monit on the affected machine?

monit stop all
monit start all

0
 

Author Comment

by:jaisonshereen
ID: 21874391
yes i did it ...but still the problem persists
0
 
LVL 14

Expert Comment

by:agriesser
ID: 21875127
What about the monitrc files of both machines?
0
Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

 

Author Comment

by:jaisonshereen
ID: 21875209
Monitrc file monit which shows white webpage
 set daemon  120
 set logfile syslog facility log_daemon
set mailserver localhost               # primary mailserver
 set mail-format { from: monit@alert-staging }
 set alert mail@gmail.com                      # receive all alerts
 set alert mail@gmail.com  only on { timeout }  # receive just service-
 set httpd port 2812 and
     use address xx.xx.139.71  # only accept connection from localhost
     allow 172.xx.xx.25/255.255.255.0        # allow localhost to connect to the server and
     allow admin:monit      # require user 'admin' with password 'monit'
  check system localhost
    if loadavg (1min) > 4 then alert
    if loadavg (5min) > 2 then alert
    if memory usage > 75% then alert
    if cpu usage (user) > 70% then alert
    if cpu usage (system) > 30% then alert
    if cpu usage (wait) > 20% then alert
 check process apache with pidfile /usr/local/apache/logs/httpd.pid
    start program = "/etc/init.d/httpd start"
    stop program  = "/etc/init.d/httpd stop"
    if cpu > 60% for 2 cycles then alert
    if cpu > 80% for 5 cycles then restart
    if totalmem > 200.0 MB for 5 cycles then restart
    if children > 250 then restart
    if loadavg(5min) greater than 10 for 8 cycles then stop
    if failed host www.tildeslash.com port 80 protocol http
       and request "/monit/doc/next.php"
       then restart
    if failed port 443 type tcpssl protocol http
       with timeout 15 seconds
       then restart
    if 3 restarts within 5 cycles then timeout
#    depends on apache_bin
    group server

Open in new window

0
 

Author Comment

by:jaisonshereen
ID: 21875251

 set daemon  120
 set logfile syslog facility log_daemon
 set mailserver localhost port 25 with timeout 15 seconds  
  set mail-format { from: monit@alert.com }
 set alert jaisonshereen@gmail.com                       # receive all alerts
 set alert jaisonshereen@gmail.com  only on { timeout }  #
 set httpd port 2812 and
 use address 172.xx.xx.25
 allow 172.xx.xx.99/255.255.255.0        # allow localhost to connect to the server and
 allow admin:monit 
  check system 74.86.139.56
     if loadavg (1min) > 4 then alert
     if loadavg (5min) > 2 then alert
     if memory usage < 75% then alert
     if cpu usage (user) < 70% then alert
     if cpu usage (system) < 30% then alert
     if cpu usage (wait) < 20% then alert
check host Radartest01  with address 74.xx.xx.56
if failed port 80 protocol http then alert
if failed port 25 protocol smtp then alert
if failed port 21 protocol ftp then alert
if failed port 23 protocol ssh then alert
 
check host RadartestStaging  with address 74.xx.xx.91
if failed port 80 protocol http then alert
if failed port 25 protocol smtp then alert
if failed port 21 protocol ftp then alert
if failed port 23 protocol ssh then alert

Open in new window

0
 
LVL 14

Expert Comment

by:agriesser
ID: 21875369
The access lists are wrong.
The not working monit has use address set to 74.86.139.71 so it is bound to this IP only.I guess you're trying to access the website from a computer that's in the 172 network, right?
0
 

Author Comment

by:jaisonshereen
ID: 21882832
yes , i am trying to access the website from a computer that's in the 172 network
0
 

Author Comment

by:jaisonshereen
ID: 21882835
how i need to configure it ?
0
 
LVL 14

Expert Comment

by:agriesser
ID: 21882981
Change this line in monitrc from the computer that doesn't work at the moment:

     use address xx.xx.139.71

to

     use address XXX.XXX.XXX.XXX


where XXX.XXX.XXX.XXX is the ip address of this monit server in your network.
0
 

Author Comment

by:jaisonshereen
ID: 21883169
But this xx.xx.139.71 is my monit server..!! :-)
0
 
LVL 14

Expert Comment

by:agriesser
ID: 21883805
OK, then please tell me more about your network.
The working monit server seems to have the address 172.xx.xx.25 in your network. Therefore, it has been configured to use this address as the default monit webserver address:

use address 172.xx.xx.25

Furthermore, clients from within this network (172.xx.xx.0/255.255.255.0) are allowed to access this monit server, thus the following line in the configuration appears:

allow 172.xx.xx.99/255.255.255.0

It works, and that's absolutely fine.

_BUT_ (and that's the question) the second server does not seem to have an IP address in the same network (172.xx.xx.0), but it has an IP address in another network (xx.xx.137.71).
You told this monit server to listen on requests on this address, thus the following entry in the monitrc:

use address xx.xx.139.71

And then you allowed connections to this address only when they come from 172.xx.xx.0, see this line in monitrc:

allow 172.xx.xx.25/255.255.255.0

The problem with this is, that 172.xx.xx.25 and xx.xx.139.71 are not in the same network and therefore this won't work, because connections from the 172.xx.xx.0/24 network need to be routed to this monit server. Is this the case?

Are the two monit servers in the same network? I think the problem is that I don't understand how your network is configured (a simple paint like scheme would help me to understand your topology).
0
 

Author Comment

by:jaisonshereen
ID: 21883991
Ok...

Two Monit instances i need say Monit1 and Monit2

So Monit1 is running on 172.xx.xx.25 (linux)
and Monit2 is running on xx.xx.139.71(linux)

And monit1 and monit2 are not in same network.

Both monit (monit1 and monit2) need to accesible from a single machine.(172.xx.xx.99)(Windows)

As per ur suggetion i have changed 172.xx.xx.25/255.255.255.0 to 172.xx.xx.25/255.255.255.0 but stills its not working.

I am using Mozilla, a black white screen still appears in my screen.
0
 

Author Comment

by:jaisonshereen
ID: 21884005
Sorry !

As per ur suggetion i have changed 172.xx.xx.25/255.255.255.0 to 172.xx.xx.99/255.255.255.0 but stills its not working.
0
 
LVL 14

Expert Comment

by:agriesser
ID: 21884392
I did not suggest to change it from 172.xx.xx.25/255.255.255.0 to 172.xx.xx.99/255.255.255.0 because that doesn't make sense. In a network declartion of this kind (255.255.255.0) the last number (.25 resp. 99) doesn't get honoured at all, so it's esxactly the same if you write 172.xx.xx.0/255.255.255.0 or 172.xx.xx.199/255.255.255.0.

I/You do need to know if the 172.xx.xx.0 network gets routed (address stays the same) or translated (NAT, address changes) when trying to access the xx.xx.139.71 host.

Try to change the

allow 172.xx.xx.something

line for the not working monit system to

allow 0.0.0.0/0.0.0.0

that way, _ALL_ hosts are allowed to access this system.
This is definetly not what you want, but it should at least work for testing purposes.
0
 

Author Comment

by:jaisonshereen
ID: 21887762
i given as u said .. but still its not working!
0
 
LVL 14

Expert Comment

by:agriesser
ID: 21887954
OK, there's either something wrong or I do misunderstand you in an important thing.

Please have a look at the scheme attached and fill out the unknown variables.
monit-scheme.PNG
0
 

Author Comment

by:jaisonshereen
ID: 21889554
ok

172.168.34.25
172.168.34.99
0
 
LVL 14

Expert Comment

by:agriesser
ID: 21889590
What I asked for are the details of this topology, eg. is there a router and if so, what does it do?

What do the subnet masks on all participating machines look like?
0
 

Author Comment

by:jaisonshereen
ID: 21889600
ok

172.168.34.25
172.168.34.99
0
 

Author Comment

by:jaisonshereen
ID: 21889602
ok

172.168.34.25
172.168.34.99
0
 

Author Comment

by:jaisonshereen
ID: 21889629
What I asked for are the details of this topology, eg. is there a router and if so, what does it do?

Router is there , but i dont know how to check.this is my corporate network.

What do the subnet masks on all participating machines look like?

172.168.34.25 -------------> 255.255.255.0
172.168.34.99 -------------> 255.255.255.0
 74.86.139.71  -------------> 255.255.255.128

0
 
LVL 14

Accepted Solution

by:
agriesser earned 500 total points
ID: 21889658
Hmm... Just to be sure: Can you ping the not working monit server from your client machine and after applying the modifications to the monitrc, have you restarted the monit service for the changes to take effect?

Is it possible to try to connect to this server from within the same subnet (74.86.x.x)?
0
 

Author Comment

by:jaisonshereen
ID: 21889720
he he .. than QQQQQQQQQQQQ

i applied the command ...monit reload ...

and now its worked fine .. Thanks a ton!!
0
 

Author Closing Comment

by:jaisonshereen
ID: 31470798
Thanks a million ton!!
0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Foolproof security solutions has become one of the key necessities of every e-commerce or Internet banking website. If you too own an online shopping site then its vital for you to equip your web portal with customer security features that can allow…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
Use Wufoo, an online form creation tool, to make powerful forms. Learn how to choose which pages of your form are visible to your users based on their inputs. The page rules feature provides you with an opportunity to create if:then statements for y…

813 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now