News:

We really need your input in this questionnaire

Main Menu
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 - Guillaume

#1
General Support / Re: On Call Schedule
June 10, 2015, 11:54:46 PM
Hello!

First of all thanks for the lightning-fast response. I was aware of the scripting language specific to NetXMS, but did not know I could use it to bypass the mail and sms sending mechanisms.

I did a brief research through the forums and the Wiki but did not find precise documentation on how exactly to fire an email and/or an sms with NXSL scripting. Could you give me some pointers on that specific subject?

Also, is there a way to "read" a file from NXSL where I could put a schedule to use as an indicator of who's on guard duty?
#2
General Support / On Call Schedule
June 10, 2015, 10:02:38 PM
Hello everyone!

I am continuing NetXMS's implementation in our network and I am now facing a big question:

How can I set up On-call alerts, just like Nagios did?

What I want to achieve is:
-Globally setup a user (target e-mail and SMS phone number) that will receive every alert for a given period of time
-Switch between 2 users (the 2 SysAdmins) within a bi-weekly schedule
-Make the email and sms alerts "repeatable" until acknowledged (I could not find the option "repeat event" in the events configuration...)

What I have read that would be possible to do so far with NetXMS:
-Setup 2 DCI's for every DCI that I have so far with a schedule for each user, so only the DCI's associated with a given user's schedule will fire events to send an email
-Make a script that will receive every alert (SMS and e-mail) and dispatch them to the concerned user

Is there some other solution that I am missing? Because the first one is kind of not efficient and the second one is basically creating an external tool to maintain...

Thanks for any input/suggestions
#3
General Support / Re: LDAP synchronisation
May 14, 2015, 11:11:40 PM
They indeed were wrong!

I am sorry, I should have checked everything before posting  ::)...

I used ldapsearch in order to get my answers:
ldapsearch -x -b "dc=myCompany,dc=ca" "(objectclass=*)"

The previous command gave me plenty of information about everything in the database, including "quite" explicitely the objectClass for everything....

Is it possible to specify more than one class per object in order to be more specific?

For example, I have not been able to add the groups yet in NetXMS but I can see that they belong to the "posixGroup" object class as well as the "top" class. The same goes for the accounts that belong to the "account", "posixAccount" and "top" class.
#4
General Support / Re: LDAP synchronisation
May 14, 2015, 10:13:08 PM
No, we are using an OpenLDAP server
#5
General Support / Re: LDAP synchronisation
May 14, 2015, 05:59:42 PM
Thank you for that tip! Unfortunately, when I attach to the server and use the ldapsync command, nothing happens... I have indeed set the debug level to 4 before typing it in, but after pressing enter the cursor just stands there without a prompt, until I give up and try again...
#6
General Support / [SOLVED] LDAP synchronisation
May 14, 2015, 05:48:53 PM
Hello!

I'm trying to integrate NetXMS with my LDAP environment and things are looking a little ugly so far...

My first issue is with the debugging. I started my netxms server in a screen session with the command "/usr/local/bin/netxmsd" in order to get access to the console. I am then presented with a prompt in which I can type some commands. Since I want to debug the ldap synchronization mechanism, I type "ldapsync"as instructed in the manual (HERE). After the console is done presenting me with various errors (discussed further down this post) I am no longer presented with a command prompt. I have to kill the server instance and restart it in the same fashion in order to get one more try at debugging, which is very annoying.

First question: Is this a bug? How can I attach/re-attach to the console and get a prompt without killing the server instance and then starting it locally?

In the various debug messages produced by the ldapsync command, I noticed a problem in my NetXMS's ldap syncronisation parameters. The exact error is:
[14-May-2015 10:18:18.750] [DEBUG] Found dn: cn=wildfly,ou=groups,dc=myCompany,dc=ca
[14-May-2015 10:18:18.750] [DEBUG] LDAPConnection::fillLists(): cn=wildfly,ou=groups,dc=myCompany,dc=ca is not a user nor a group
[14-May-2015 10:20:51.965] [DEBUG] LDAPConnection::fillLists(): Found dn: cn=steeve,ou=users,dc=myCompany,dc=ca
[14-May-2015 10:20:51.965] [DEBUG] LDAPConnection::fillLists(): cn=steeve,ou=users,dc=myCompany,dc=ca is not a user nor a group


Which means that the various parameters I entered in my LDAP config are wrong. What I can gather from the logs and the various documentation we have internally is that a group is identified by "ou=groups" and a user is identified by "ou=users", whereas an object name is "cn=objectName".

Here is what I have so far in the config:
LdapConnectionString:   ldap://olserver1.myCompany.priv:389
LdapGroupClass:   groups
LdapMappingDescription:   description
LdapMappingFullName:   full name
LdapMappingName:   cn
LdapPageSize:   1000
LdapSearchBase:   dc=myCompany,dc=ca
LdapSearchFilter:   (objectClass=*)
LdapSyncInterval:   5
LdapSyncUser:   cn=admin,dc=myCompany,dc=ca
LdapSyncUserPassword:   myPaSsWoRd
LdapUserClass:   users
LdapUserDeleteAction:   0

I am not "that" familiar with the LDAP syntax, and even less with NetXMS's so I would like to know if anyone could help with those 2 issues:
1) The console prompt disappearing after invoking "ldapsync"
2) The configuration mismatch

Thank you all for your dedication to this project, I am sure that we can make it great by poking around issues like this one!
#7
General Support / Re: Nagios integration
May 13, 2015, 11:47:45 PM
Thank you again, Victor and Alex!

My issue is "resolved", now I have to craft a solution to extract the values I want. On to other challenges!! (Like LDAP integration....)
#8
General Support / Re: Nagios integration
May 13, 2015, 05:50:24 PM
Thank you!  ;D

I managed to get most of the commands working! I will continue tweaking until I get the result I want.

A few questions still stand though:

When I try to add a Nagios DCI directly on the target node (Those commands are on the netxms server so I have to define it as proxy) I do not get any parameter listing. When I create those DCI's in a template though, I can apply this template to any node and the DCI is working and can be modified. Is this an interface bug, or am I missing something in my configuration (like a port in the firewall)?
EDIT: I can add the DCI "manually", but the popup produced by the Parameter's "Select..." button shows nothing.

How can I properly split the resulting string of my command in order to get a convincing output? Can I do it directly in netxms or would it be better to make an external script to pre-format the command's result before passing it to netxms? I looked through https://wiki.netxms.org/wiki/UM:NetXMS_Scripting_Language_(NXSL) for something similar to a split function but to no avail.
#9
General Support / Re: Nagios integration
May 12, 2015, 04:25:55 PM
Good morning!

I "successfully" added an External parameter on my monitoring server and I can add it in the Data Collection Configuration section of my netxms server node. The exact line I added, for future reference, is this one:
ExternalParameter=Nagios(*):/etc/netxms/plugins/$1 -H $2 -c $3 -a $4 / >/dev/null 2>&1 ; echo $$?

After adding it in netxms server's DCI page, I have a first question:
How can I get the "full" return of the command? (I know that I can then extract the part I need with the scripting part of the DCI)

What I mean is, the command
/etc/netxms/plugins/check_nrpe -H webserver -c check_disk_custom -a 20 10 /
returns something like:
DISK OK - free space: / 961 MB (50% inode=84%);| /=951MB;1995;2005;0;2015
In the Last Value page of the node though, I only have numeric value even though I defined the DCI return as "String". What am I missing?

Second question:
On my "target" node, I tried defining a new DCI with my netxms server as the proxy in order to have access to my custom "Nagios(*)" command. Unfortunately, I am unable to access any parameter... Am I missing some key configuration part here, or do I need to open some specific port in my firewalls so my target node can receive the parameters list from the server node?

Thank you again for your great support! You truly are a "Hero Member"
#10
General Support / Re: Nagios integration
May 11, 2015, 09:25:46 PM
Hello!

Thanks for the really quick reply, it's super appreciated. I am not really clear on where to put such external parameter...

Is it in the agent configuration of the NetXMS server? If so, I tried adding a test line in nxagentd.conf file but after that I am unsure of where to use it in the web console...

Is it in the target server's agent configuration? Since I am trying to avoid installing the agent on every server so it's not really an option...

Thanks for any clarification
#11
General Support / [SOLVED] Nagios integration
May 11, 2015, 05:25:57 PM
Hello everyone!

I am trying to make the switch from Nagios to NetXMS and things have not been easy. Since the network service part of NetXMS is kind of on and off, I was wondering if it would be possible to use NetXMS's scripting interface to interact with the already-installed nrpe plugin on every server?

The command to interact with such a plugin is quite simple, something like:

/usr/lib64/nagios/plugins/check_nrpe -H webserver -c check_disk_custom -a 20 10 /

Where the syntax is
-H: target host
-c: the custom command to run on the remote server
-a: a list of arguments

In my example, the plugin checks for free disk space on "webserver" on the disk "/" with a 20% and a 10% threshold.

Would such a scripted solution be acceptable and, if so, where/how can I code it?

Thank you!
#12
Ok!

Thanks a bunch for your efforts on this awesome product!
#13
Hello again netxms community!

After my first problem, I thought that I had fixed everything and that I was able to monitor network services.

I was wrong.

My previously working services are now showing with a value of "4" in the last value panel and a nice red "x" is showing next to the services name... Needless to say, I am able to access the web page and get the needed information from the monitoring server:
prompt$ curl -Is http://host.com/testDB.php | head  -n 1
HTTP/1.1 200 OK



The only difference between the state of my setup now versus what it was at the time of my first topic is the software version change. I am now using the M4 version of netxms.

Here is the relevant part of the nxagentd.log file, where we can see that a connection is made between localhost and the agent. Then the log shows the proper shared secret and the proper request to send:
[05-May-2015 13:35:26.207] [DEBUG] [session:1] Session with 192.168.108.22 closed
[05-May-2015 13:35:26.207] [DEBUG] Incoming connection from 192.168.108.22
[05-May-2015 13:35:26.207] [DEBUG] Connection from 192.168.108.22 accepted
[05-May-2015 13:35:26.207] [DEBUG] [session:1] Message dump:
  ** 00B60020000000100000000000000000
  ** code=0x00B6 (CMD_GET_NXCP_CAPS) flags=0x0020 id=0 size=16 numFields=0

[05-May-2015 13:35:26.207] [DEBUG] [session:1] Received control message CMD_GET_NXCP_CAPS
[05-May-2015 13:35:26.207] [DEBUG] [session:1] Sending message CMD_NXCP_CAPS (size 16)
[05-May-2015 13:35:26.207] [DEBUG] [session:1] Message dump:
  ** 00400000000000400000000100000002
  ** 00000010030000010000001101000000
  ** 000000180053005E0064006700370044
  ** 00430073006F004C0069004500000000
  ** code=0x0040 (CMD_AUTHENTICATE) flags=0x0000 id=1 size=64 numFields=2
  ** [    16] INT16    1
  ** [    17] STRING   "secret^secret"

[05-May-2015 13:35:26.207] [DEBUG] [session:1] Received message CMD_AUTHENTICATE
[05-May-2015 13:35:26.207] [DEBUG] [session:1] Sending message CMD_REQUEST_COMPLETED (size 32)
[05-May-2015 13:35:26.207] [DEBUG] [session:1] Message dump:
  ** 01340000000000180000000200000001
  ** 0000009703010001
  ** code=0x0134 (CMD_ENABLE_IPV6) flags=0x0000 id=2 size=24 numFields=1
  ** [   151] INT16    1

[05-May-2015 13:35:26.207] [DEBUG] [session:1] Received message CMD_ENABLE_IPV6
[05-May-2015 13:35:26.207] [DEBUG] [session:1] Sending message CMD_REQUEST_COMPLETED (size 32)
[05-May-2015 13:35:26.207] [DEBUG] [session:1] Message dump:
  ** 00730000000000D80000000300000006
  ** 00000008060000000000000000000000
  ** 00000000000000000020000000000000
  ** 00000082030000050000008403000050
  ** 00000083030000060000008501000000
  ** 000000400069006E007400720061006E
  ** 00650074002E007300610076006F0075
  ** 00720061002E0063006F006D003A002F
  ** 007400650073007400440042002E0070
  ** 00680070000000000000008601000000
  ** 0000002E005E0048005400540050002F
  ** 0031005C002E005B00300031005D0020
  ** 003200300030002E002A004F004B002E
  ** 002A000000000000
  ** code=0x0073 (CMD_CHECK_NETWORK_SERVICE) flags=0x0000 id=3 size=216 numFields=6
  ** [     8] INETADDR 0.0.0.0
  ** [   130] INT16    5
  ** [   132] INT16    80
  ** [   131] INT16    6
  ** [   133] STRING   "host.com:/testDB.php"
  ** [   134] STRING   "^HTTP/1\.[01] 200.*OK.*"

[05-May-2015 13:35:26.207] [DEBUG] [session:1] Received message CMD_CHECK_NETWORK_SERVICE
[05-May-2015 13:35:26.207] [DEBUG] [session:1] Sending message CMD_REQUEST_COMPLETED (size 64)
[05-May-2015 13:35:26.207] [DEBUG] [session:1] Session with 192.168.108.22 closed


Is there anything that I could check/provide to get the monitoring of web services up and running once and for all?

Thanks for any input!

**I have replaced the real secret and hostname of the target web service for confidentiality reasons
#14
It took a while to update (~5 mins) but now I see that the status of both services is "0", which is "Normal" (https://wiki.netxms.org/wiki/UM:Event_Processing#Macros_for_Event_Processing).

It seems that either the removal of the authentication or the modification of the shared secret in all the configs worked.

I would like to thank everyone who contributed to this thread! You are a very helpful community!

(P.S.: I will update the first post to show how I solved my problem)
#15
Hello!

First of all, thank you very much for the support. I really appreciate it.

As for the authentication, I double-checked in the agent's configuration and RequireAuthentication is set to no. [SNIP](I realized that I had to deactivate authentication on the local server's agent)

I modified the localhost's node authentication method with the agent, since the only agent I have is on the monitoring server. I now have some interesting stuff going on:
[17-Apr-2015 14:33:02.778] [DEBUG] Incoming connection from 192.168.108.22
[17-Apr-2015 14:33:02.778] [DEBUG] Connection from 192.168.108.22 accepted
[17-Apr-2015 14:33:02.780] [DEBUG] [session:1] Message dump:
  ** 00B60020000000100000000000000000
  ** code=0x00B6 (CMD_GET_NXCP_CAPS) flags=0x0020 id=0 size=16 numFields=0

[17-Apr-2015 14:33:02.780] [DEBUG] [session:1] Received control message CMD_GET_NXCP_CAPS
[17-Apr-2015 14:33:02.780] [DEBUG] [session:1] Sending message CMD_NXCP_CAPS (size 16)
[17-Apr-2015 14:33:02.780] [DEBUG] [session:1] Message dump:
  ** 00030000000000100000000100000000
  ** code=0x0003 (CMD_KEEPALIVE) flags=0x0000 id=1 size=16 numFields=0

[17-Apr-2015 14:33:02.780] [DEBUG] [session:1] Received message CMD_KEEPALIVE
[17-Apr-2015 14:33:02.781] [DEBUG] [session:1] Sending message CMD_REQUEST_COMPLETED (size 32)
[17-Apr-2015 14:33:02.781] [DEBUG] [session:1] Message dump:
  ** 00730000000000C80000000200000006
  ** 0000000800000000C0A8791B00000000
  ** 00000082030000050000008403000050
  ** 00000083030000060000008501000000
  ** 0000003E0063006C00690065006E0074
  ** 002E006D0074006900630061006E0061
  ** 00640061002E00630061003A002F0074
  ** 00650073007400440042002E00700068
  ** 00700000000000000000008601000000
  ** 0000002E005E0048005400540050002F
  ** 0031005C002E005B00300031005D0020
  ** 003200300030002E002A004F004B002E
  ** 002A000000000000
  ** code=0x0073 (CMD_CHECK_NETWORK_SERVICE) flags=0x0000 id=2 size=200 numFields=6
  ** [     8] INT32  -1062700773
  ** [   130] INT16  5
  ** [   132] INT16  80
  ** [   131] INT16  6
  ** [   133] STRING "client.mticanada.ca:/testDB.php"
  ** [   134] STRING "^HTTP/1\.[01] 200.*OK.*"

[17-Apr-2015 14:33:02.781] [DEBUG] [session:1] Received message CMD_CHECK_NETWORK_SERVICE
[17-Apr-2015 14:33:02.800] [DEBUG] [session:1] Sending message CMD_REQUEST_COMPLETED (size 64)
[17-Apr-2015 14:33:02.800] [DEBUG] [session:1] Session with 192.168.108.22 closed
[17-Apr-2015 14:33:02.800] [DEBUG] Incoming connection from 192.168.108.22
[17-Apr-2015 14:33:02.800] [DEBUG] Connection from 192.168.108.22 accepted
[17-Apr-2015 14:33:02.800] [DEBUG] [session:1] Message dump:
  ** 00B60020000000100000000000000000
  ** code=0x00B6 (CMD_GET_NXCP_CAPS) flags=0x0020 id=0 size=16 numFields=0

[17-Apr-2015 14:33:02.800] [DEBUG] [session:1] Received control message CMD_GET_NXCP_CAPS
[17-Apr-2015 14:33:02.800] [DEBUG] [session:1] Sending message CMD_NXCP_CAPS (size 16)
[17-Apr-2015 14:33:02.800] [DEBUG] [session:1] Message dump:
  ** 00030000000000100000000100000000
  ** code=0x0003 (CMD_KEEPALIVE) flags=0x0000 id=1 size=16 numFields=0

[17-Apr-2015 14:33:02.800] [DEBUG] [session:1] Received message CMD_KEEPALIVE
[17-Apr-2015 14:33:02.800] [DEBUG] [session:1] Sending message CMD_REQUEST_COMPLETED (size 32)
[17-Apr-2015 14:33:02.800] [DEBUG] [session:1] Message dump:
  ** 00730000000000C80000000200000006
  ** 0000000800000000C0A8791B00000000
  ** 00000082030000000000008403000050
  ** 00000083030000060000008501000000
  ** 000000400069006E007400720061006E
  ** 00650074002E007300610076006F0075
  ** 00720061002E0063006F006D003A002F
  ** 007400650073007400440042002E0070
  ** 00680070000000000000008601000000
  ** 0000002E005E0048005400540050002F
  ** 0031005C002E005B00300031005D0020
  ** 003200300030002E002A004F004B002E
  ** 002A000000000000
  ** code=0x0073 (CMD_CHECK_NETWORK_SERVICE) flags=0x0000 id=2 size=200 numFields=6
  ** [     8] INT32  -1062700773
  ** [   130] INT16  0
  ** [   132] INT16  80
  ** [   131] INT16  6
  ** [   133] STRING "intranet.savoura.com:/testDB.php"
  ** [   134] STRING "^HTTP/1\.[01] 200.*OK.*"

[17-Apr-2015 14:33:02.800] [DEBUG] [session:1] Received message CMD_CHECK_NETWORK_SERVICE
[17-Apr-2015 14:33:02.801] [DEBUG] [session:1] Sending message CMD_REQUEST_COMPLETED (size 64)
[17-Apr-2015 14:33:02.801] [DEBUG] [session:1] Session with 192.168.108.22 closed


Once again I attached the full log from startup with the modifications to "now". Unfortunately, the last value of both (because I configured 2 network services) is still 5.