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 - Filipp Sudanov

#646
Node status depends on three things
- Status of interfaces
- Severity of alarms present on the node
- Value of DCIs that have "Use this DCI for node status calculation" checkbox set.

By default most severe status is taken as status of the node.

So first of all you need to figure out, is it coming from an alarm or an interface
#647
General Support / Re: Dashboard gauge configuration
December 29, 2022, 08:04:59 PM
Can you show screenshot of your gauge configuration and also the value of the DCI from last values?
#648
I'd suggest investigating business service approach. If it does not fit for some reason we can look at the other options again.

A business service has concept of "checks". These are visible in "Object details" as a tab. There can be one or several checks - these could be DCIs (status of the check depends whether a threshold on the DCI is triggered or not) - and there are object status checks and script checks.
Also, business services can be nested - a business service can contain a number of child business services. Status of child business services will be propagated to the parent business service, so it could also be built that way.
#649
Hi!

This should have been already fixed in 4.2.461, pls upgrade your system.
#650
Hmmm, I could not replicate this. What version are you using? Can you show screenshot with custom attribute tab from node's properties?

If you do this again for a new node and new template, does it repeat?
#651
Let me list what are the options:

- On the nodes you can have script DCI that polls needed OIDs (or takes their values from another DCIs) and takes some numeric value. Then
  - on map you can use "DCI image" element, which will show specific image for specific value
  - or on that scipt DCI you can check "Use this DCI for node status calculation" (it's in properties on Other Options tab) - and value of that DCI will affect the status of the node (value should be between 0 and 4 for normal ... critical)
You can have this DCI in a template, it will be applied automatically.



- You can use business service functionality - it was reworked in 4.0. The idea is that business service object checks status of other things (nodes, DCIs or script) and changes it's status (and also calculates time that it was "up" or "down").
Creation of business services can be automated - there are "business service prototypes" and auto-bind scripts that will pick up DCIs or nodes that you need.



- Third option is to create nodes with IP address 0.0.0.0 - such node will not be polled. You can have a DCI on that node with "Use this DCI for node status calculation" enabled and status of that node will depend on value of that DCI.


Pls update which option looks good for you and if you need any additional information on it.

#652
General Support / Re: Generic HTTP Notification Channel
December 15, 2022, 05:07:59 PM
There is "Shell" notification channel which just calls a shell command on the NetXMS server. You can use it to call curl with appropriate parameters.


https://www.netxms.org/documentation/adminguide/event-processing.html#drivers
#653
Если запустить скрипт на ноде, то:

transport = $node->createSNMPTransport(); 
if (transport == null) exit;
value = transport->get(".1.3.6.1.2.1.25.3.5.1.2.1");
if (value == null) exit;
bytestream = value->getValueAsByteStream();
bytestream->seek(0);
println(bytestream->readByte());

bytestream->seek(xxx) позволяет указать, с какого байта мы хотим читать. При создании byte stream будет стоять на 0, так что bytestream->seek(0); делать и не нужно.

Тут мы прочитали один байт. Можно прочитать и сразу два:
println(bytestream->readUInt32B());
или
println(bytestream->readUInt32L());
смотря как они там идут - как Little Endian или Big Endian.

Ну и стоит проверить, что bytestream->size достаточной длины, чтоб в нем два байта поместилось.

Судя по описанию там каждый бит сообщает о каком-то состоянии. Нужен ли пример разбора по битам?



------

В документации bytestream не описан, будем потихоньку добавлять. Но информацию об NXSL классах можно добыть прямо в скрипте, это может помочь разобраться:

transport = $node->createSNMPTransport(); 
if (transport == null) exit;

value = transport->get(".1.3.6.1.2.1.25.3.5.1.2.1");
if (value == null) exit;

println("=========================================================");
println("Class: " . classof(value));
println("=== Attributes ===");
for(a : value->__class->attributes)
  println(a . " = " . value->__get(a));
println("=== Methods ===");
for(a : value->__class->methods)
  println(a);

bytestream = value->getValueAsByteStream();

println("=========================================================");
println("Class: " . classof(bytestream));
println("=== Attributes ===");
for(a : bytestream->__class->attributes)
  println(a . " = " . bytestream->__get(a));
println("=== Methods ===");
for(a : bytestream->__class->methods)
  println(a);

 
#654

Если они все живут непосредственно под этим контейнером (а не в подконтейнераз), то сделать в script library такой скрипт:

container = FindObject(1234);  // 1234 - ID контейнера

status_to_count = $ARGS[1];
count = 0;
for (c : container->children) {
  if (classof(c) == "Node") {
    if (status_to_count == -1 or c->status == status_to_count) count++;
  }
}
return count;





В качестве параметра скрипту подается число

0Normal
1Warning
2Minor
3Major
4Critical

или -1 - считать все ноды.

Ну и дальше на какой-нибудь ноде (для этих целей можно создать фиктивную ноду с адресом 0.0.0.0) сделать скриптовые DCI которые вызвают этот скрипт из библиотеки.
#655
General Support / Re: Agent Tables
December 14, 2022, 06:47:33 PM
Can you show your external table configuration in agent configuration file?
#656
Hi!

Actually, Condition objects are planned for removal in a future version, as there are now other options to do things.
Can you illustrate your use case, what exactly these conditions do and where they take the data?
#657
General Support / Re: NXMC database best practices
December 14, 2022, 06:43:27 PM
I'm not an expert in MariaDB, but here's a post that has a query, which should give some information from the DB about used and allocated disk space.
#658
What changes have you performed prior for this to happen? Did you upgrade NetXMS? From what version to what version (exactly)?
#659
General Support / Re: NXMC database best practices
December 12, 2022, 11:56:27 PM
First of all, it's a question of your retention times for DCIs and event, alarm, etc log retention times (search for "Retention" in Configuration->Server configuration). At some older version there was also a bug that some of these log tables were not cleared, so make sure that you are on the newest version.

Also, could it be that during the life of your system a lot of new nodes or new DCIs were added - that would also add up to the DB size.

According to retention settings housekeeper should delete records from the db. (It's also worth to check server log for any SQL errors - and there are events generated for such cases - make sure you've configured notifications for these events).

Then it's a question to the database engine that you are using - how effective it is in performing vacuum operation to reclaim space. Normally the database should keep at some size and not grow much. What DB engine are you using?
#660
In 4.2 support for TCP proxying was added into agent and desktop management client (and was not yet documented)

Agent should have EnableTCPProxy=yes in it's config

In management client it's done via Object Tools, there's "Setup TCP tunnel..." checkbox.
There are two macros - ${local-address} and ${local-port} which are replaced by actual local IP and port

So Local Command object tool with command
mstsc /v:${local-address}:${local-port}
should work for RDP