 |
SoftTree Technologies
Technical Support Forums
|
|
Author |
Message |
liangzhu
Joined: 30 Nov 2011 Posts: 42 Country: Singapore |
|
monitoring 24x7 itself |
|
Hi, i wonder if i can get 24x7 to alert on exit? or failing that, how would i monitor it? either locally or remotely?
i got a few thoughts, i wonder how feasible are they, which is better...
1. poll with net use and see the process list to find 24x7, can be done locally or remotely
2. or turn on 24x7 server mode and poll port 1096 to see if there's anything there, can be done locally or remotely
or
3. use a batch file to start /wait 24x7.exe and then email via blat or something. local only. or perhaps psexec can do the same remotely
4. look for instancedeletion event in wmi and find 24x7, which i don't know how it can be done remotely
are there better ways to do this?
|
|
Tue May 22, 2012 9:15 am |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7948
|
|
|
|
I suggest using the second method 2. It's resource light and easy.
By the way, are you aware of the Fail-over mode? In this mode 2 instances Master and Standby work in tandem. The Standby instance is idle and remotely monitoring the Master instance on port 1096. If the Master goes down, job processing fails over to the Standby instance.
|
|
Tue May 22, 2012 9:50 am |
|
 |
liangzhu
Joined: 30 Nov 2011 Posts: 42 Country: Singapore |
|
Thanks! |
|
um, actually we just want to be alerted when its not up..so not really looking for failover...
however, i turned the distributed server mode on, chose to use winsock, and put in 1096/24x7_Master in the port/service field, and telnetted from another machine..
and i got a blank page that , if i type stuff in it, i get a blinking cursor...
in the 'standby' pane of the log viewer i see:
DPB01 Connection(03BE5400): ConnectToServer : application(1096/24x7_Master), location(LocalHost), driver(WinSock). ... (00000000)
SMI02 Connection(03BE55A8): ERROR OCCURRED: The server '1096/24x7_Master' could not be located. It is probably not started. (00000002)
DPB01 Connection(03BE5400): ConnectToServer : application(1096/24x7_Master), location(LocalHost), driver(WinSock). FAILED (80042005)
in debug.log i have
5/23/2012 10:14:35.487 0 0 0 DEBUG [THREAD 4408] Connecting to master scheduler
5/23/2012 10:14:36.502 0 0 0 DEBUG [THREAD 4408] Connection failed
5/23/2012 10:14:36.502 0 0 0 DEBUG [THREAD 4408] Master scheduler not found. Starting network listener and switching to distributed server mode.
5/23/2012 10:14:37.159 0 0 0 DEBUG [THREAD 4408] Starting DDE service...
does it all mean that its listening on 1096?
however, how do i then go about monitoring this? er, is there some sort of command(parameters?) that i can send to it that will get me some expected response? or can i set up a 2nd instance of 24x7 on another machine to use as the fail over client, but instead of running jobs, just alerts that the master/server is down?
|
|
Tue May 22, 2012 10:16 pm |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7948
|
|
|
|
Yes, it does. You can easily verify it using DOS "netstat -a" command on the box.
The only way to send a command is to use one of the documented APIs, basically have a 24x7 client periodically connect to the server and disconnect. If that connection fails, wait a few seconds and try again, if the second attempt to connect fails too, treat it as an error.
|
|
Wed May 23, 2012 10:54 am |
|
 |
liangzhu
Joined: 30 Nov 2011 Posts: 42 Country: Singapore |
|
sorry. clarification... |
|
can 24x7, in GUI mode, send an alert when it is closing?
how can we make 24x7 do that?
|
|
Thu May 31, 2012 10:49 pm |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7948
|
|
|
|
There are basically 3 ways for a process to end
1. Normal shutdown - the closing is initiated and handled by the process.
2. Process crash - typically in this case the process aborts abnormally, no code/processing can be executed in this event.
3. Process forced termination - the process gets killed by operation system or other process - no code/processing can be executed in this event.
Only in 1st case 24x7 can run a process or something else during the closing and that it mostly its internal stuff for terminating running jobs, closing resources, flushing file buffers, etc...
So the only way to watch for all 3 ways of process closing is to do it outside of the process, for example, use a batch file to start 24x7.exe and use it to start the scheduler, something like
 |
 |
echo off
echo Running 24x7 Scheduler...
start /WAIT 24x7.exe
echo 24x7 Scheduler terminated. Attempting to alert staff
start /WAIT 24x7.exe /JOB "My Shutdown Alert Job"
echo Alert job processed
echo Process Terminated
|
|
|
Thu Jul 05, 2012 9:20 am |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|