Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - Victor Kirhenshtein

#6406
General Support / Re: Thershold not sending email
July 16, 2010, 04:16:02 PM
Hi!

Did you configure SMTP server settings in NetXMS correctly? You have to set server's configuration variable SMTPServer to your SMTP server's IP address. Setting SMTPFromAddr to some correct value also recommended.

Best regards,
Victor
#6407
General Support / Re: Stuck file Agent
July 15, 2010, 02:18:47 AM
Hi!

Yo can use File.Count parameter. Full syntax is following:

File.Count(path, pattern, recursive, size, age)

where


pathpath to directory or file to check
patternpattern for file name matching
recursiverecursion flag; if set to 1 or true, agent will scan subdirectories
sizesize filter (bytes); if < 0, only files with size less than abs(value) will match; if > 0, only files with size greater than value will match; if 0, all files will match
ageage filter (seconds); if < 0, only files created after now - abs(value) will match; if > 0, only files created before now - value will match; if 0, all files will match

path argument is mandatory, all other are optional.

So, to count number of .txt files older than 15 minutes in c:\tmp, you can use

File.Count('C:\tmp', '*.txt', 0, 0, 900)

And after that you just need to set threshold for this parameter to >0, generate appropriate event, and process it as usual.

Best regards,
Victor
#6408
Общие вопросы / Re: Syslog
July 14, 2010, 04:26:49 PM
Несколько вопросов:
Событие с кодом 100004 существует?
Можно ли как-то увидеть оригинальное syslog сообщение?
Есть ли какие-нибудь ошибки в логе NetXMS сервера?

sys в поле hostname - это баг, исправил.

#6409
Hi!

You can use filter scripts to do advanced filtering. Event SYS_SERVICE_DOWN contains 3 parameters:
1: service name;
2: service object id;
3: service type.
So, for example, if you wish to execute action only for service named "httpd", you can use the following script:


$1 == "httpd"


or, in full form


sub main()
{
   return $1 == "httpd";
}


Best regards,
Victor
#6410
Версия 1.0.3 или старее?
#6411
Microsoft promises that frequency should not change between reboots :) (http://msdn.microsoft.com/en-us/library/ms644905%28VS.85%29.aspx). I choose to use performance counter because timeGetTime has much bigger call cost - but I'm not sure that this really matters in our case. I could also build libnetxms.dll with timeGetTime variant to compare. Interestin also is that on my Windows 7 machine event GetSystemTimeAsFileTime, which was used before, gives 1ms accuracy.

Best regards,
Victor

P.S. New libnetxms.dll included in 1.0.3 build, so if you upgrade agent, you will not need to download libnetxms.dll from here.
#6412
Announcements / NetXMS 1.0.3 released
July 08, 2010, 12:01:09 AM
Hi all!

NetXMS version 1.0.3 is out. Changes since 1.0.2:

- Windows console:
        - DCI thresholds, average, and trendlines can be shown on graphs
        - Fixed history graph performance issue
        - Fixed GDI resource leak
- HP-UX platform subagent improved
- New agent parameters for Linux: System.Memory.Physical.Available and System.Memory.Physical.AvailablePerc
- Agent parameters Disk.* renamed to FileSystem.* (old names still recognized by agent for backward compatibility)
- Fixed various inconsistencies in parameters between different systems
- Fixed issues: #300, #302

Best regards,
Victor
#6413
Hi!

The most generic way is the following:

1. Stop netxmsd on old server
2. Export database using nxdbmgr:


nxdbmgr export export_file


3. Install same version of NetXMS on new server
4. Create and initialize new database as usual
5. Import data using nxdbmgr:


nxdbmgr import export_file


6. Run netxmsd on new server

If you will use different IP address on new server, you must add it as master server in agent configuration files.

If you are using external database which will not be migrated, you can just install NetXMS on new server and copy netxmsd.conf from old server - it should start working with same database without problems (don't forget to stop netxmsd on old server first).

Also, if you are migrating to same database engine, using database migration tool from database engine could be more effective.

Best regards,
Victor
#6414
General Support / Re: Netxms Agent Traps
July 03, 2010, 01:34:14 PM
Hi!

Agent cannot send SNMP traps. It is capable of sending NetXMS events to server, but it's an internal mechanism, available only as API to subagents. You can also use nxevent command line tool to send events from remote system to the server.

Best regards,
Victor
#6415
It takes a bit more time :) Updated libnetxms.dll can be downloaded from here: https://www.netxms.org/download/patches/006/libnetxms.dll. It now uses QueryPerformanceCounter for time interval measurement. You can replace existing libnetxms.dll with new one and test agent.

Best regards,
Victor
#6416
We cannot change GetCurrentTimeMs in that way, because it is supposed to return current time since epoch in milliseconds, and timeGetTime returns time since system start. We need to replace call to GetCurrentTimeMs with timeGetTime or QueryPerformanceCounter inside IcmpPing function. I'll create patched libnetxms.dll this evening and post it for testing.

Best regards,
Victor
#6417
General Support / Re: Send SMS Text Alerts
June 29, 2010, 01:18:53 PM
Hi!

How do you connect your modem? Directly to the NetXMS server or to remote node? In first case, you have to load generic.sms driver on server (by setting SMSDriver server configuration parameter) and specify COM port in SMSDrvConfig server configuration parameter. If you connect modem to remote node with agent, you should load sms.nsm subagent on this node, and use nxagent.sms instead of generic.sms on the server. In that case you should set SMSDrvConfig parameter to remote node IP address.

Also, there are known problem with Huawei E220 modem - it doesn't sent messages with backslash in text. I don't know how E226 differs from E220, so maybe E226 also affected.

Best regards,
Victor
#6418
A chto pishet esli sdelat' Poll->Configuration iz konsoli?
#6419
Hi!

You code was correct, it's very strange that it was not working. Adding an empty string should not change result. I suspect bug in NXSL interpreter, but I was unable to reproduce this on my test system - both

server_name = "" . plaza . ".se";

and

server_name = plaza . ".se";

gives the same correct result in my test script.

Best regards,
Victor
#6420
Hi!

You use variable plaza in your code, but how you initialize it? If you wish to use something based on DCI's node, the only way to access node's attributes is via $node variable. So, for example, if you wish to add "-server" suffix to current node's name and find that node, you should use code like this:


server = FindNodeObject($node, $node->name . "-server");


Best regards,
Victor