error sending through Multitech MTR

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
scheived
Posts: 16
Joined: Tue Jul 16, 2013 9:53 am

error sending through Multitech MTR

Post by scheived »

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
bheden
Product Development Manager
Posts: 179
Joined: Thu Feb 13, 2014 9:50 am
Location: Nagios Enterprises

Re: error sending through Multitech MTR

Post by bheden »

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
scheived
Posts: 16
Joined: Tue Jul 16, 2013 9:53 am

Re: error sending through Multitech MTR

Post by scheived »

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.
bheden
Product Development Manager
Posts: 179
Joined: Thu Feb 13, 2014 9:50 am
Location: Nagios Enterprises

Re: error sending through Multitech MTR

Post by bheden »

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
scheived
Posts: 16
Joined: Tue Jul 16, 2013 9:53 am

Re: error sending through Multitech MTR

Post by scheived »

Well it looks like multitech is too buggy to get working, what solution would one recommend for nagios out-of-band sending of notifications?
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: error sending through Multitech MTR

Post by cdienger »

@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.
scheived
Posts: 16
Joined: Tue Jul 16, 2013 9:53 am

Re: error sending through Multitech MTR

Post by scheived »

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.
User avatar
mbellerue
Posts: 1403
Joined: Fri Jul 12, 2019 11:10 am

Re: error sending through Multitech MTR

Post by mbellerue »

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!
Locked