Monit webpage showing white screen

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!

 
jaisonshereenAsked:
Who is Participating?
 
agriesserCommented:
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
 
agriesserCommented:
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
 
jaisonshereenAuthor Commented:
yes i did it ...but still the problem persists
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

 
agriesserCommented:
What about the monitrc files of both machines?
0
 
jaisonshereenAuthor Commented:
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
 
jaisonshereenAuthor Commented:

 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
 
agriesserCommented:
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
 
jaisonshereenAuthor Commented:
yes , i am trying to access the website from a computer that's in the 172 network
0
 
jaisonshereenAuthor Commented:
how i need to configure it ?
0
 
agriesserCommented:
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
 
jaisonshereenAuthor Commented:
But this xx.xx.139.71 is my monit server..!! :-)
0
 
agriesserCommented:
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
 
jaisonshereenAuthor Commented:
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
 
jaisonshereenAuthor Commented:
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
 
agriesserCommented:
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
 
jaisonshereenAuthor Commented:
i given as u said .. but still its not working!
0
 
agriesserCommented:
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
 
jaisonshereenAuthor Commented:
ok

172.168.34.25
172.168.34.99
0
 
agriesserCommented:
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
 
jaisonshereenAuthor Commented:
ok

172.168.34.25
172.168.34.99
0
 
jaisonshereenAuthor Commented:
ok

172.168.34.25
172.168.34.99
0
 
jaisonshereenAuthor Commented:
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
 
jaisonshereenAuthor Commented:
he he .. than QQQQQQQQQQQQ

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

and now its worked fine .. Thanks a ton!!
0
 
jaisonshereenAuthor Commented:
Thanks a million ton!!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.