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

#1516
If you check running processes on netxms server, is netxmsd present in the list of processes on the moment it hangs? I mean, does it actually creash and terminate, or it hangs?
#1517
General Support / Re: Netxms 3.1.261 and device discovery
December 26, 2019, 02:43:01 PM
Here's an example of such script, that will change community string for all nodes, that have SNMP polling enabled
newAuthName = 'public2'
for node in [o for o in session.getAllObjects() if isinstance(o, objects.Node)]: # filter all objects for objects.Node
    if (node.getFlags() & Node.NF_DISABLE_SNMP) = 0: # SNMP polling is not disabled
        if (node.getSnmpAuthName() != newAuthName):
            print('Processing node %s: changing community string from %s to %s' % (node.objectName, node.getSnmpAuthName(), newAuthName))
            md = NXCObjectModificationData(node.objectId)
            md.setSnmpAuthName(newAuthName)
            session.modifyObject(md)


The script is launched like this:
java -jar nxshell-3.1.241.jar script_name.py


There are some examples of Jython scripts in netxms sources in src/client/nxshell/samples/
Some examples are also here: https://wiki.netxms.org/wiki/Using_nxshell_to_automate_bulk_operations
Documentation of API calls is here: https://www.netxms.org/documentation/javadoc/latest/overview-summary.html

#1518
3.1 packags for raspbian buster have been released. Installation by installing https://packages.netxms.org/netxms-release-latest.deb in not working yet, so it's necessary to manually add
deb http://packages.netxms.org/raspbian/ buster main
into sources.list
#1520
Hi!

Let me describe the whole configuration process for DS18x20 sensors on RPi in case if someone needs this later.
1) A pull-up resistor of 2..10KOhm should be connected between DQ pin of the sensor and +3.3v. GPIO2 and GPIO3 have built-in 1.8KOhm pull-up resistors (at least on RPi 3), so if you don't need I2C, you can connect the sensor to one of these pins.
2) A kernel module is used to communicate with the sensor. It is activated ty adding dtoverlay=w1-gpio to the end of /boot/config.txt file.
By default the DQ pin of the sensor should be connected to GPIO4, to use another GPIO the following format could be used: dtoverlay=w1-gpio,gpiopin=3. Reboot RPi when finished editing the file.
Since kernel version 4.9.28 it's also possible to use dynamic overlay loading: sudo dtoverlay w1-gpio gpiopin=5, in this way it's possible to have sensors on several GPIO pins.
3) After restart (of after dynamic overlay loading) the sensors should get detected:
root@raspberrypi:~# ls  /sys/bus/w1/devices/
28-6cb0611f64ff  w1_bus_master1

here we have one sensor connected, it has name 28-6cb0611f64ff
4) And we should be able to read the temperature:
root@raspberrypi:~# cat /sys/bus/w1/devices/28-6cb0611f64ff/w1_slave
78 01 55 00 7f ff 0c 10 57 : crc=57 YES
78 01 55 00 7f ff 0c 10 57 t=23500

which in this case is 23,5 degrees C.
5) To configure NetXMS agent we add the following lines to /etc/nxagentd.conf
SubAgent=ds18x20.nsm

[DS18X20]
Sensor = Test:28-6cb0611f64ff

6) After agent restart systemctl restart nxagentd our parameter "Test" should return the temperature.
user@netxms-server:~$ nxget raspberrypi.lan 'Sensor.Temperature(Test)'
23.312



Your configuration looks exactly the same. The thing is that the error message in agent log "Unable to add sensor from configuration file. Original configuration record:" looks to be a bug, i am also getting it (as of v. 3.1.274). But the parameter works. Most probably on your system Sensor.Temperature(Test) will also give the result.
#1521
General Support / Re: how to enable capabilities
December 23, 2019, 07:27:19 PM
Which capabilities do you expect to be in "Yes" state? In may cases it's just enough to have isAgent Yes. Netxms agent provides a lot of monitoring options.
#1522
General Support / Re: how to enable capabilities
December 22, 2019, 12:21:32 PM
isSNMP will get enabled on full configuration poll, it your node supports SNMP. All the rest flags are similar and auto-detected, e.g. isPrinter gets enabled, if NetXMS detects, that the node is a printer and so on. It's not possible to change these flags manually.
#1523
Current approach to templates in NetXMS has the idea, that all nodes, belonging to one template are absolutely the same.

You could create a separate template for your exclusion cases and set up template autoapply scripts that would set correct template for a particular node.

The other way could be to use the following syntax in threshold field %{custom_attribute_name:100} in template. In this case threshold value will be taken from a custom attribute, specified on a node and if such attribute is not present on a node, a default value of 100 will be used.
#1524
General Support / Re: how to enable capabilities
December 22, 2019, 02:20:30 AM
Capabilities get updated when Full Configuration Poll is performed. If node responds to attempt to connect to netxms agent, isAgent capability will be set to Yes and so on.
#1525
Try to undeploy and deploy the war. Also try to clean /var/cache/tomcat/work/Catalina/localhost folder.

The most recent mac console will be released in the next few days, currently you can use previous one, the differences are minor: https://netxms.org/download/releases/3.1/nxmc-3.1.241.war
#1526
Имеется в виду SNMP community string? В каком имено месте - в свойствах ноды или в Configuration -> SNMP credentials?

Какая точно версия сервера? Какая база данных, ее версия? Какая консоль, под какой ОС?
#1527
I've tried on my system with Postgres 10 and NetXMS 3.1.261 on Ubuntu 18.04 - the reconnect actually occurs. Can you increase debugging for DB operations, e.g. by running this from command line:
nxadm -c "debug db.* 8"
and show the log during the moment when database stops/restarts.
#1528
General Support / Re: Netxms 3.1.261 and device discovery
December 17, 2019, 06:35:39 PM
Currently community strings are not sorted / prioritized. The value specified in node properties ('public' by default) is tried first, then server tries community strings from settings (in order in which the database returned the list).

There is no way to change community string from NXSL.
The only possible way for now is to use a Jython script launched by nxshell.
#1529
Дело тут вот в этой строчке:
[26.11.2019 11:21:04]    Upstream interface GigabitEthernet1/0/32 on node SW29xx-9-2 (servernaya, stoyka 3) is down

В netxms есть механизм корелляции, который при потере связи с нодой проверяет, не потеряна ли связь также со свичами/рутерами, через которые подключена нода. Сейчас этот механизм работает так, что переход порта на свиче в DOWN тоже тоже кореллируется и мы бы говорим, что нода недоступна (unreachable) потому что вот этот порт на свиче в дауне (эту логику планируется поменять).
Однако помимо unreachable нода должна была стать и critical, то что это не произошло, это не правильно.
Я так понимаю, что это происходило на 3.0. Планируете апгрейдиться на 3.1?
#1530
As for the first problem with executing an agent´s action via EPP, it was fixed and should work in version 3.1.261 that was released yesterday. Could you please confirm that it works for you?

There is currently no way to pass script arguments that have spaces from GUI's Server Console (and also from nxadm -c). Possible workarounds:
- use some special character, e.g. _ and replace it in the script
- you can use nxscript command line utility, but it can not run scripts from server script library, the script should be in a file.
nxscript 1.nxs "1" "2 3"