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 - Alex Kirhenshtein

#526
You can try to use netsvc subagent instead (which is libcurl based) and set http_proxy variable before starting agent. It's a bit ugly, but should work.
Details on netsvc: https://www.netxms.org/forum/configuration/servicecheck-http-2780/msg12143/#msg12143
A bit details on libcurl proxy support: http://curl.haxx.se/libcurl/c/CURLOPT_PROXY.html

Another option is to use configure external parameter using curl / wget:ExternalParameter=CheckHTTPWithProxy:curl -o /dev/null -s -x http://proxyhost:3128 $1; echo $?

Then use it like this:nxget localhost 'CheckHTTPWithProxy(https://www.google.com/)'
#527
1) Event log ("event_log" table) have it's own retention time and it's completely independent from DCI history.
Retention time is controlled by server parameter "EventLogRetentionTime". Default value is 90 days.

2) Two options: create object tool with type "Download" pointing to server's log (enabled "follow changed", if desired), or enabled filemgr subagent on the agent and use file manager functionality for that.

http://netxms.readthedocs.org/projects/admin/en/latest/object-management.html#download-file
http://netxms.readthedocs.org/projects/admin/en/latest/remote-file-management.html
#528
Feature Requests / Re: The Dude Exporter
December 08, 2015, 10:05:40 AM
Can you share some sample database? It will be quite easy to change your code into migration tool, but I need some data to test is on.
#529
General Support / Re: Database Issues
December 08, 2015, 09:57:19 AM
This issue is already fixed in trunk.
#530
General Support / Re: No route to host
December 08, 2015, 09:55:42 AM
Looks like network configuration issue. Check that server is reachable (4701/TCP) from your workstation.
#531
General Support / Re: IP/Mac Address lookup
December 03, 2015, 09:48:02 AM
Try attached script.
#532
General Support / Re: IP/Mac Address lookup
December 01, 2015, 10:20:44 AM
Yes, it's possible to do with nxshell. Some examples:

find by mac:
import sys
mac = sys.argv[1].upper()

for node in [o for o in s.getAllObjects() if isinstance(o, objects.Node)]:
    interfaces = node.getAllChilds(objects.GenericObject.OBJECT_INTERFACE)
    for interface in interfaces:
        if mac in interface.getMacAddress().toString().upper():
            print "%s(%d) - %s - %s" % (node.getObjectName(),
                                        node.getObjectId(),
                                        interface.getMacAddress(),
                                        interface.getIpAddressListAsString())


find by ip:
import sys
ip = sys.argv[1]

for node in [o for o in s.getAllObjects() if isinstance(o, objects.Node)]:
    interfaces = node.getAllChilds(objects.GenericObject.OBJECT_INTERFACE)
    for interface in interfaces:
        for interface_ip in interface.getIpAddressList():
            if ip in interface_ip.toString():
                print "%s(%d) - %s - %s" % (node.getObjectName(),
                                            node.getObjectId(),
                                            interface.getMacAddress(),
                                            interface.getIpAddressListAsString())


Sample session:
~/Development/netxms/src/java/nxshell/target (develop|...)% java -Dnetxms.server=127.0.0.1 -Dnetxms.login=admin -Dnetxms.password=netxms -jar nxshell-2.0-RC2.jar find_by_mac.py B2:00:1C:15:BC:E0
AirAlk.local(100) - B2:00:1C:15:BC:E0 - 0.0.0.0/0
~/Development/netxms/src/java/nxshell/target (develop|...)% java -Dnetxms.server=127.0.0.1 -Dnetxms.login=admin -Dnetxms.password=netxms -jar nxshell-2.0-RC2.jar find_by_ip.py 127
AirAlk.local(100) - 00:00:00:00:00:00 - 127.0.0.1/8
#533
General Support / Re: MIB Import bug
November 20, 2015, 11:46:45 PM
Works for me.
Make sure that you updating correct file – we've changed filesytem layout a bit, now it's in $prefix/var/lib/netxms.
Start server with debug level 1 or higher and search for this line in log:
[20-Nov-2015 23:45:12.379] [DEBUG] Data directory set to /opt/netxms/var/lib/netxms
#534
General Support / Re: MIB Import bug
November 20, 2015, 11:30:36 PM
Please attach mib file
#535
General Support / Re: Rediscovering my discovery
November 20, 2015, 10:30:50 PM
flags==3 is DFF_ALLOW_AGENT + DFF_ALLOW_SNMP – automatically generated filter, which will accept any node with agent or with active snmp.
bResult==0 means "false", this filter was no matched (0 - false, anything else - true).
#536
Общие вопросы / Re: NXAgent & OpenWRT
October 30, 2015, 03:44:53 AM
Вынес в внешний feed – https://github.com/netxms/openwrt-feed, там же инструкция
#537
General Support / Re: One table is growing very fast
October 23, 2015, 11:16:25 AM
Hello

This table hold rows for table DCI (with large result set). Check DCI settings – how often it's collected and retention time.
1178 in table name is DCI id, you can either find it in user interface by looking at ID column in last values, or query database directly:

select op.name,d.name from dc_tables d join object_properties op on op.object_id=d.node_id where d.item_id=1178
#538
Общие вопросы / Re: Slack Intergration
October 21, 2015, 01:24:15 PM
Нашел проблему – была только в сборке без unicode.
Фикс: http://git.netxms.org/public/netxms.git/commitdiff/b010a63c51a151d121bef28ab5056a2de5e7c1f8
#539
Общие вопросы / Re: Slack Intergration
October 21, 2015, 04:24:29 AM
В message text случаем не прописан канал вместо текста сообщения?
Я просмотрел код и проверил на нашем сервере, название канала не должно дублироваться.
#540
Общие вопросы / Re: Slack Intergration
October 20, 2015, 07:09:23 PM
В коде нет дебага для самого сообщения, к сожалению.
Сделайте пожалуйста так:

запустите netcat: nc -l 12345
потом  попробуйте что-то отослать с такой конфигурацией:

SMSDrvConfig: url=http://localhost:12345/

в netcat должен быть виден полный запрос.