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

#496
From the capture it's seen that exchange successfully switches to TLS mode, but we don't see much beyond that due to encryption.
Please try sending email using curl from command line of machine where netxms is running:

curl -v --ssl-reqd  --url 'smtp://pro1.mail.ovh.net:587' --user '[email protected]:password' --mail-from '[email protected]' --mail-rcpt '[email protected]' --upload-file mail.txt
for that you need mail.txt file in the folder where you launch curl with content like this:

From: "User Name" <[email protected]>
To: "John Smith" <[email protected]>
Subject: This is a test

Hi John,
I'm sending this mail with curl thru my gmail account.
Bye!

Please adjust the command and mail.txt file with your actual addresses. curl should produce verbose output, pls share that.
#497
Please try to capture traffic on NetXMS using tcpdump:
tcpdump -s 0 -w smtp.pcap -i INTERFACE_NAME host pro1.mail.ovh.net and tcp and port 587
STARTTLS has unencrypted phase of communications in the beginning, so we might see some clue there. You can send capture file to me in a private message.
#498
Первый вопрос - на какой версии все это происходит, потому что print a; уже достаточно давно переделан в print(a);

t = AgentReadTable($node, "System.InstalledProducts");
for (row : t->rows)
{
  if (row->get(0) like "*Agent*")
  {
    s = "";
    for(cell : row->values)
    {
      s = s . cell . "-";
    }   
    println(s);
  }
}
#499
This error was fixed, fix will be included in patch release that should be out this week.
#500

In event processing policy you can use a filter script like this:
ifName = $dci->instance;
if (ifName == null or ifName == "") return false;

dciDescription = "Port Speed auf " . ifName;
portSpeed = GetDCIValueByDescription($node, dciDescription);

if (portSpeed->contains("HD")) return false;

return true;


$dci->instance will work if your DCIs are created by instance discovery, otherwise you might need to get the interface name by parsing description.

Alternative approach could be to use script threshold on your network error DCIs - that script could also get value of port speed DCI and generate threshold violation event only when both conditions are met. This way you would have less events (which also consume resources as they are stored in the DB).

Feel free to ask if you need more script examples.


#501
Please add
DebugLevel = 6
to agent config file and share full agent log since it's start till sessions run out. You can share the log in private message if needed.


#502
General Support / Re: Installed software version as dci
October 09, 2023, 10:17:21 AM
Make a script named getPackageVersion in script library:

packageName = $ARGS[1];
if (packageName == null) return "package name not provided to script";
for (s : $node->softwarePackages) {
  if (s->name == packageName) {
    return s->version;
  }
}

Then create a script DCI with metric e.g.:
getPackageVersion("curl")
The script is using information about packages collected during configuration poll, so it will provide a value even if the agent is not available at the moment.
#503
General Support / Re: Stacked switches in rack view
October 02, 2023, 04:41:11 PM
Hi,

We had a discussion with developers and formulated how this could be implemented somewhere in the future: https://track.radensolutions.com/issue/NX-2466

For the time being, you can create dummy nodes (specifying ip address 0.0.0.0), create one script DCI on each of these nodes with "Use this DCI for node status calculation" and use script to determine status (script should be returning 0...4 for Normal...Critical)
#504
Please try this way:

systemctl stop netxmsd
netxmsd -D 6

NetXMS server will start in foreyground mode and will put log messages onto the screen. Then try to log in from the client and observer what's happening in the terminal - will server continue to run or will it fail.
#505
General Support / Re: NetXMS 4.4.1 server failed
October 02, 2023, 11:24:38 AM
QuoteI have problem too. My enveropment:
Docker, Ubuntu 18.04, PG 12.5, NetXMS 4.4.2
Do you have netxms-server-dbg package installed on your system? If not, please install it and make the backtrace again.
#506
Please check server log - one possible issue is that server is crashing on client connection. Please check server log.

If this is the case, try stopping server via systemd:
systemctl stop netxmsd

and running it in foreground:
netxmsd -D 6

in this mode server will be running on debug level 6 and will output it's log to the terminal. Please share last log lines prior to the crash and repeat this 2 times.
#507
Я попробовал сделать скрипт, который автоматом берет скорость интерфейса и считает лимит отсечки в 120% от скорости. Строчки trace(0, ...  пишут отладочные сообщения в лог сервера, для нормальной работы их нужно убрать.

Скрипт годится только для тех DCI, которые создавались механизмом instance discovery - у них тогда заполнен атрибут instance. Скрипт ищет интерфейс под нодой, имя которого совпадает с instance, это будет работать для агентских метрик, для snmp instance будет индексом интерфейса и в 6-й строчке вместо i->name нужно использовать i->ifIndex

В целом получилось сложно, лучше наверное дождаться когда разработчики добавят эту обработку в код.

trace(0, $dci->name . ", $1: " . $1);
lastValue = GetDCIValue($node, $dci->id);
trace(0, "lastValue: " . lastValue);
speed = 0;
for (i: $node->interfaces) {
  if (i->name == $dci->instance) speed = i->speed;
}
trace(0, "speed: " . speed);
if (lastValue == null or speed == 0) return $1 * 8; // could not do much
upperLimit = int64(speed / 8L * 1.2); // in bytes
trace(0, "upperLimit: " . upperLimit);
if ($1 > upperLimit) return lastValue;
trace(0, "returning $1*8: " . $1 * 8);
return $1 * 8;

Если интерфейс продолжает существовать и счетчики трафика на нем не меняются, то скрипт должен корректно отдавать значение 0.
#508
Если это старая консоль, то там в десктопной версии был баг, после смены языка ее нужно полность закрыть и открыть снова. Возможно даже дважды.

В новой консоли локализация пока не сделана, так что она только английская
#509
Map improvements are currently in development, expected to be included to 5.0 in a few months.
#510
Проблема такого скрипта - не получится пропустить сбор значения - теоретически это можно сделать командой abort, но при этом не сохранится raw значение и вычисление дельты пойдет от последнего собранного raw значения.
Так что лучшее, что сейчас может делать такой скрипт - возвращать еще раз последнее собранное значение - если нужно, сделаю пример.

Отображение с Mbps работает в last values. В history его не сделали еще, в 5.0 наверное будет.