KS-Soft. Network Management Solutions
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister    ProfileProfile    Log inLog in 

%HMSystemName% variable question.

 
Post new topic   Reply to topic    KS-Soft Forum Index -> Configuration, Maintenance, Troubleshooting
View previous topic :: View next topic  
Author Message
Dubolomov



Joined: 01 Jun 2006
Posts: 214
Location: Russia

PostPosted: Mon Jun 29, 2009 6:08 am    Post subject: %HMSystemName% variable question. Reply with quote

Hi.
I would like to test two HM instances on two servers in different data centers, one is primary and one is backup. One of instance is always in active state and the other one always in waiting state (it's just checking primary instance and make other tests in "wait for master" state until primary instance is working). Now i'm trying too keep fully synchronized versions of application (it is the other question, may be i'm ask you after some tests later).
I have two database servers on two data centers for HM logging. Realy only one instance of HM store results in database server and both DB-servers always synchronized with each other. I required variable like %HMSystemName%. Now in HM log options i have sql query with this variable so i can see which test was executed from which server. But in database i see not value of this variable but the name of variable - "%HMSystemName%". Only one of 100-300 strings in log has value of this variable. It is like HM trying to send DNS request when execute every test. HM now perform about 90 tests per seconds.


Last edited by Dubolomov on Mon Jun 29, 2009 8:18 am; edited 1 time in total
Back to top
View user's profile Send private message
Dubolomov



Joined: 01 Jun 2006
Posts: 214
Location: Russia

PostPosted: Mon Jun 29, 2009 7:42 am    Post subject: Reply with quote

I'm wrong. In database log true value of "%HMSystemName%" variable has only "HM Monitor test" tests of the same server:
Code:
            servmon             |          testname           | status |          testmethod          |   statuschangedat   | prevstatusdur |      eventtime
--------------------------------+-----------------------------+--------+------------------------------+---------------------+---------------+---------------------
 SuperVision.my.domain.ru       | VR - SuperVision TestPerSec | Ok     | HM Monitor test (10.10.10.10)| 2009-06-29 11:28:16 |               | 2009-06-29 17:34:14




Others have the name of this variable:
Code:

            servmon             |                  testname                   |     status      |               testmethod                |   statuschangedat   |   prevstatusdur   |      eventtime
--------------------------------+---------------------------------------------+-----------------+-----------------------------------------+---------------------+-------------------+---------------------
 %HMSystemName%                 | Samara - ATM00154                           | Host is alive   | ping (timeout - 1000 ms)                | 2009-06-29 16:30:21 | 00:00:10          | 2009-06-29 17:34:01

Back to top
View user's profile Send private message
KS-Soft Europe



Joined: 16 May 2006
Posts: 2832

PostPosted: Mon Jun 29, 2009 7:51 am    Post subject: Reply with quote

Actually, everything is correct. According to the manual, %HMSystemName% variabla is only applicable for "HM Monitor" test only:
http://www.ks-soft.net/hostmon.eng/actions.htm#macro
=========================
The following variables applicable for "HM Monitor" test only, they provide information related to HostMonitor requested by the test item
%HMVersionText% - Version of HostMonitor, like HostMonitor v. 8.12
%HMVersionBin% - Binary version, like 0812
%HMSystemName% - Name of the system where HostMonitor is running
.....
=========================

Regards,
Max
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Dubolomov



Joined: 01 Jun 2006
Posts: 214
Location: Russia

PostPosted: Mon Jun 29, 2009 8:13 am    Post subject: Reply with quote

I miss this. Tnank you. No problem with this variable.
Ok. So it is unpossible to store log in database with some information which can identificate ip, servername or any other unique information of server where HM is running. Isn't?
Back to top
View user's profile Send private message
KS-Soft Europe



Joined: 16 May 2006
Posts: 2832

PostPosted: Mon Jun 29, 2009 8:27 am    Post subject: Reply with quote

Dubolomov wrote:
So it is unpossible to store log in database with some information which can identificate ip, servername or any other unique information of server where HM is running. Isn't?
I think, you may use "User defined macro variables" for such a purpose. http://www.ks-soft.net/hostmon.eng/mframe.htm#actions.htm#udvmacro

The only thing is that you have to manually enter necessary information for each machine, where HostMonitor is running.

Regards,
Max
Back to top
View user's profile Send private message Send e-mail Visit poster's website
KS-Soft Europe



Joined: 16 May 2006
Posts: 2832

PostPosted: Mon Jun 29, 2009 8:32 am    Post subject: Reply with quote

Ok, you can even automate it a bit. You may use built-in "Scheduler" to schedule an alert profile with "Execute HMS Script" action. "HMS script" action should execute the script with SetUserVariable and SaveUserVariables commands, e.g.
--------------------------------------------
SetUserVariable udv_hm_ip 192.168.1.100
SetUserVariable udv_hm_name HostMonitorServer
SaveUserVariables
--------------------------------------------

Please, read the following article for details: http://www.ks-soft.net/hostmon.eng/mframe.htm#actions.htm#actScript

Regards,
Max
Back to top
View user's profile Send private message Send e-mail Visit poster's website
KS-Soft



Joined: 03 Apr 2002
Posts: 12791
Location: USA

PostPosted: Mon Jun 29, 2009 10:53 am    Post subject: Reply with quote

Quote:
I would like to test two HM instances on two servers in different data centers, one is primary and one is backup.

Not sure I understand how exactly you setup this test.
Are you using HostMonitorA to check HostMonitorB using HM Monitor test method? and then HostMonitorB checks HostMonitorA using the same test method?
or may be you are using 3rd HostMonitorC that checks HostMonitorA and HostMonitorB?

Regards
Alex
Back to top
View user's profile Send private message Visit poster's website
Dubolomov



Joined: 01 Jun 2006
Posts: 214
Location: Russia

PostPosted: Tue Jun 30, 2009 7:52 am    Post subject: Reply with quote

KS-Soft wrote:
Quote:
I would like to test two HM instances on two servers in different data centers, one is primary and one is backup.

Not sure I understand how exactly you setup this test.
Are you using HostMonitorA to check HostMonitorB using HM Monitor test method? and then HostMonitorB checks HostMonitorA using the same test method?
or may be you are using 3rd HostMonitorC that checks HostMonitorA and HostMonitorB?

Regards
Alex

No. I think that primary HM-A working always. HM-B checks HM-A: if HM-A is working - all tests in HM-B in "Wait for master" test, if HM-A is not responding - HM-B checks all the same tests as in HM-A checklist. As soon as HM-A works fine HM-B makes all tests in "Wait for master" state again.

It's not easy to explain my solution in english but i'll try.

There are two servers in two datacenters: Server1, Server2.
HM is running on both servers.
I had own solution for checking another instance of HM until you implement WatchDog.
Both HMs must be fully synchronized for example by copying folder of HM from primary Server1 to secondary Server2 (i don't want to make same changes on both servers by hand). All tests depend from one "megamaster" test that checks instance of HM on primary Server1.
If HM with this megamaster test running on primary Server1 - all dependant tests work as usual. If HM with megamaster test running on secondary Server2 and HM on primary Server1 works fine - all tests are in the "Wait for master" state, but if HM on primary Server1 not responding - all tests are in usual state.
Megamaster test is just ping of localhost, but it's status depend at two other tests: checking hostmon process (t1) on primary Server1 (using Server1 ip-address) and trace (t2) to Server1 (also using Server1 address).
In properties of megamaster test i checked "Tread Unknown status as bad", "Tread Warning status as bad", "Use warning status if", "Use normal status if":
Code:
Use Warning status if: ('%::t1::SimpleStatus%'=='DOWN') or ('%::t2::SimpleStatus%'=='DOWN')
Use normal status if: ('%::t1::SimpleStatus%'=='DOWN') and ('%::t2::SimpleStatus%'=='DOWN')

Trace test (t2) checks for number of hops differ from 1.
So if HM is running on secondary Server2 - "t2" always is in the bad state (number of hops differ from 1), and if "t1" is not in a good state (HM on primary Server1 not responding) - status of megamaster test is in the "Normal" state and all dependant tests works as usual. If "t1" is in a good state (HM on primary Server1 works fine) - status of megamaster test is in the "Warning" state and all dependant tests are in the "Wait for master" state.
If HM is running on primary Server1 - "t2" always in the good state, so megamaster test will be in the good state and all dependant tests will works as usual.

Now i thinking about synchonizing properties of two HMs between each other. I don't know how to sync status of all tests immediate before HM on a primary server1 will be fault. I can for example sync them every day at 0:00am but if server1 will be down at 6:00am and HM on secondary server2 will start running i'll get double notification from HM2 for time period 0:00-6:00 because the same notifications i already get from HM1.

BTW. I have one enterprise license with 100 RMA + LifeTime updates. If my clustering solution will be fine i'll get one more enterprise license with LifeTime updates. I think i don't offend you for testing two HM's without additional license for testing period. Ok?
Back to top
View user's profile Send private message
KS-Soft



Joined: 03 Apr 2002
Posts: 12791
Location: USA

PostPosted: Tue Jun 30, 2009 4:45 pm    Post subject: Reply with quote

I think you may use "scheduled" action to save test list (including test statuses and statistics) every 10 minutes (for example). You may use HM Script action to save test list and copy the file to another server.
Then 2nd HostMonitor may load this list when "megamaster" test detects the problem.

Regards
Alex
Back to top
View user's profile Send private message Visit poster's website
Dubolomov



Joined: 01 Jun 2006
Posts: 214
Location: Russia

PostPosted: Mon Jul 13, 2009 10:48 pm    Post subject: Reply with quote

It's problem with saving testlist. I'm use HMS-script for export full testlist:
Code:
SaveTestList   C:\HostMonitor\TestList\TestList--%yyyy%%mm%%dd%-%hh%%nn%.hml
on the schedule.
After this script completed HM start using this file. But rights of all users makes at "No access to this HML list".
Back to top
View user's profile Send private message
KS-Soft



Joined: 03 Apr 2002
Posts: 12791
Location: USA

PostPosted: Mon Jul 13, 2009 11:08 pm    Post subject: Reply with quote

Quote from the manual
===================
HostMonitor uses GUID to identify HML files and a unique FolderID to identify a user's home folder. This means if you copy or rename the file, rename or move the home folder, HostMonitor still knows what home folder is assigned for each user. However, if you use menu "File"->"Save as", HostMonitor will assign new GUID to new HML file. In this case, it may be necessary to reassign the home folder for the operators except when they have access to all/root folder.
===================

So, if you really need to create new HML file every minute (why??), I think you may simply make a copy...

Regards
Alex
Back to top
View user's profile Send private message Visit poster's website
Dubolomov



Joined: 01 Jun 2006
Posts: 214
Location: Russia

PostPosted: Tue Jul 14, 2009 3:15 am    Post subject: Reply with quote

It can be several changes every day. And it's not very convenient to make this changes twice.
Most of all as i sad before i would like for synchronizing statuses of all test (if primary HM server will be fail statuses of some tests on secondary HM server will be not actual). It's impossible to have synchronization all the time but i would like to make it more closer.
I don't want simply copying existing hml-file because if at this time file will be opened for writing new file may be corrupted. In that reason secondary server first of all must copy to himself new hml-file from master server and check status of copying before import it (don't import new file if it hasn't been successfully copied).
I don't know how often it will be enough for creating new hml-file. May be it is 10 minutes, may be one hour...
Of course it's would be great if two HM instances could make connection all the time between each other. So anytime all settings and statuses would be identical. Have you any task in your "to do" list for clustering technology?
Back to top
View user's profile Send private message
KS-Soft



Joined: 03 Apr 2002
Posts: 12791
Location: USA

PostPosted: Tue Jul 14, 2009 4:51 pm    Post subject: Reply with quote

Quote:
I don't want simply copying existing hml-file because if at this time file will be opened for writing new file may be corrupted.

No, it will not be corrupted.
HostMonitor stores test list into temporary file closes the file then renames temp file using specified file name. So, we can say HML file is never opened by HostMonitor for writing.
While "reading" operation should not make any problems and it happens only when you start HostMonitor and load another test list.

Quote:
Have you any task in your "to do" list for clustering technology?

Yes, we have. May be in version 9.

Regards
Alex
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    KS-Soft Forum Index -> Configuration, Maintenance, Troubleshooting All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2005 phpBB Group

KS-Soft Forum Index