error sending through Multitech MTR

An open discussion forum for obtaining help with Nagios Core. Nagios Core users of all experience levels are welcome here. Subforum have been created for the discussion of Nagios Core and Nagios Plugin development.

NOTE: The SourceForge.net mailing lists have been deprecated in favor of this forum in order to expedite support and provide additional features not available on the old mailing list.

error sending through Multitech MTR

Postby scheived » Thu Aug 22, 2019 4:41 pm

Anyone know how to get a multitech MTR to work to send out sms messages? The Multitech MTR API integration documentation no longer works. In nagios I just get An error occurred sending the test SMS message.


Nagios XI 5.6.6 with MultiTech MTR Integration component 1.0.2
scheived
 
Posts: 6
Joined: Tue Jul 16, 2013 9:53 am

Re: error sending through Multitech MTR

Postby bheden » Fri Aug 23, 2019 9:30 am

When you say the documentation no longer works, do you mean that you can't follow those instructions? If so, I'm curious to know how/why/what changed.

This may seem like a silly question, but have you configured the MultiTech device to enable SMS?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Nagios Enterprises
Senior Developer
User avatar
bheden
Product Development Manager
 
Posts: 177
Joined: Thu Feb 13, 2014 9:50 am
Location: Nagios Enterprises

Re: error sending through Multitech MTR

Postby scheived » Fri Aug 23, 2019 10:20 am

I was able to follow the directions, enabled sms and created a user for Nagios to use. From the multitech device webpage I am able to sent an sms so I believe cellular sms is working. I'm wondering if there is something else that needs to be done out of the box to get it working, is there a log on Nagios might help? tcpdump doesn't help much since it uses https which is encrypted.
scheived
 
Posts: 6
Joined: Tue Jul 16, 2013 9:53 am

Re: error sending through Multitech MTR

Postby bheden » Fri Aug 23, 2019 11:15 am

I wonder if the data being sent is being malformed somehow.

Are you able to share a screenshot of what messages you're trying to send looks like?

Also, in tcpdump - you can see that it's making a connection to the device, correct?
Are there any logs on the multitech to see if it's hitting the proper endpoints?

A log for the mtr callbacks might exist in /usr/local/nagiosxi/var/event_handler.log and/or /usr/local/nagiosxi/var/eventman.log.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Nagios Enterprises
Senior Developer
User avatar
bheden
Product Development Manager
 
Posts: 177
Joined: Thu Feb 13, 2014 9:50 am
Location: Nagios Enterprises

Re: error sending through Multitech MTR

Postby scheived » Fri Aug 23, 2019 3:52 pm

Well it looks like multitech is too buggy to get working, what solution would one recommend for nagios out-of-band sending of notifications?
scheived
 
Posts: 6
Joined: Tue Jul 16, 2013 9:53 am

Re: error sending through Multitech MTR

Postby cdienger » Mon Aug 26, 2019 11:48 am

@bheden and anyone else troubleshooting a MTR, I've found /var/log/api.log on the MTR useful in troubleshooting. A successful test message is logged like:

Code: Select all
2019-08-26T18:11:25.578528+00:00 mtr API: [SESSION] Starting FCGI Request [46812]
2019-08-26T18:11:25.579702+00:00 mtr API: [SESSION] count 48 total 48 v_mStdIn.size 1
2019-08-26T18:11:25.580054+00:00 mtr API: [SESSION] Response Started
2019-08-26T18:11:26.220836+00:00 mtr API: pam_unix(api:session): session opened for user nagiosadmin by (uid=0)
2019-08-26T18:11:26.224692+00:00 mtr API: [SESSION] Authorized Agent [nagiosadmin] Permission [admin] IP [192.168.55.2] Port [34808] Token [53237CA5DC6969039A9ADDC79F985C1]
2019-08-26T18:11:26.225738+00:00 mtr API: [SESSION] Ending FCGI Request [46812] as [RESPONDER]
2019-08-26T18:11:26.229908+00:00 mtr lighttpd[732]: 192.168.55.2 192.168.0.99 - [26/Aug/2019:18:11:25 +0000] "POST /api/login HTTP/1.1" 200 340 "-" "-"
2019-08-26T18:11:26.314844+00:00 mtr API: [SESSION] Starting FCGI Request [46813]
2019-08-26T18:11:26.316138+00:00 mtr API: [SESSION] count 127 total 127 v_mStdIn.size 1
2019-08-26T18:11:26.316500+00:00 mtr API: [SESSION] Response Started
2019-08-26T18:11:26.318714+00:00 mtr API: [SESSION] Authorized Agent [nagiosadmin] Permission [admin] IP [192.168.55.2] Port [34808] Token [53237CA5DC6969039A9ADDC79F985C1]
2019-08-26T18:11:26.319373+00:00 mtr API: [ROUTER][ADD][sms/outbox]
2019-08-26T18:11:26.358696+00:00 mtr API: [SESSION] Ending FCGI Request [46813] as [RESPONDER]
2019-08-26T18:11:26.363615+00:00 mtr lighttpd[732]: 192.168.55.2 192.168.0.99 - [26/Aug/2019:18:11:26 +0000] "POST /api/sms/outbox HTTP/1.1" 200 56 "-" "-"
2019-08-26T18:11:26.480522+00:00 mtr API: [SESSION] Starting FCGI Request [46814]
2019-08-26T18:11:26.491755+00:00 mtr API: [SESSION] Response Started
2019-08-26T18:11:26.494275+00:00 mtr API: [SESSION] Logging out this user [nagiosadmin]!
2019-08-26T18:11:26.498707+00:00 mtr API: pam_unix(api:session): session closed for user nagiosadmin
2019-08-26T18:11:26.510705+00:00 mtr API: [SESSION] Ending FCGI Request [46814] as [RESPONDER]
2019-08-26T18:11:26.514116+00:00 mtr lighttpd[732]: 192.168.55.2 192.168.0.99 - [26/Aug/2019:18:11:26 +0000] "GET /api/logout?token=53237CA5DC6969039A9ADDC79F985C1 HTTP/1.1" 200 340 "-" "-"


I'd start with a quick check on the exchange - https://exchange.nagios.org/index.php?o ... chword=sms - to find alternatives.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
cdienger
Support Tech
 
Posts: 3514
Joined: Tue Feb 07, 2017 11:26 am

Re: error sending through Multitech MTR

Postby scheived » Mon Aug 26, 2019 2:25 pm

Thanks for that! I narrowed it down to authentication error, and it seems the multitech api doesn't always work with special characters in the password.

Now it seems to be working fine.
scheived
 
Posts: 6
Joined: Tue Jul 16, 2013 9:53 am

Re: error sending through Multitech MTR

Postby mbellerue » Mon Aug 26, 2019 2:43 pm

Excellent, glad you got it working! Closing thread.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
mbellerue
 
Posts: 385
Joined: Fri Jul 12, 2019 11:10 am


Return to Nagios Core

Who is online

Users browsing this forum: craigtho and 34 guests