NotePage, Inc. Forum Index

Double Newlines from Solarwinds NPM

 
Post new topic   Reply to topic    NotePage, Inc. Forum Index -> Integration Related Questions
View previous topic :: View next topic  
Author Message
sweaver



Joined: 30 Jan 2014
Posts: 7

PostPosted: Thu Jul 10, 2014 11:41 pm    Post subject: Double Newlines from Solarwinds NPM Reply with quote

Hi All,

When sending an SMS notification from Orion two carriage returns+linefeeds are added to end of each line once the notification is submitted by solarwinds.

i.e. the message might be:

Code:
Server Name: ${Caption}
Server IP: ${IP_Address}


The message within the GetAscii Polling directory will be:

Code:
Server Name: servername

Server IP: 10.1.1.1


And the message as seen/sent by PageGate will be:

Code:
Server Name: servername<CR><LF><CR><LF>Server IP: 10.1.1.1


And the message as submitted will be:

Code:
Server Name: servername<13><10><13><10>Server IP: 10.1.1.1



Any ideas as to how to get rid of the redundant CRLF?

Thanks.

EDIT: Similarly, it appears that adding a backslash to a message stops things from working. a problem when sending a disk label i.e. "C:\ 01273021"

Any thoughts there?

Also, we're using an Intercel SAM3G+ modem.


Back to top
View user's profile
Tech Support



Joined: 25 Aug 2003
Posts: 3684

PostPosted: Fri Jul 11, 2014 8:11 am    Post subject: Reply with quote

Are you using PageGate or NotePager Pro to integrate with Solarwinds' software? Also, is the the program installed on the same system as the Solarwinds program?



_________________
Tech Support
support@notepage.com
http://www.notepage.net
Back to top
View user's profile
sweaver



Joined: 30 Jan 2014
Posts: 7

PostPosted: Fri Jul 11, 2014 11:41 am    Post subject: Reply with quote

PageGate and yes, the same server.


Back to top
View user's profile
Tech Support



Joined: 25 Aug 2003
Posts: 3684

PostPosted: Fri Jul 11, 2014 12:24 pm    Post subject: Reply with quote

Some cellular modems don't handle backslashes well as they represent command characters to some devices, so that may explain the \ issue. As far as the double-carriage return, you should be able to strip those out of the messages by going doing this:

1) Open the PG Admin.

2) Go to Carriers - <CarrierName> - Template.

3) In the Settings Template, type the following:

StripNonPrintable = True

4) Click on Apply.



_________________
Tech Support
support@notepage.com
http://www.notepage.net
Back to top
View user's profile
sweaver



Joined: 30 Jan 2014
Posts: 7

PostPosted: Wed Jul 30, 2014 8:39 pm    Post subject: Reply with quote

Is there any way to send a backslash then? I would assume there must be some way?

Is there a particular term used that I could look for for finding this sort of information?

The modem in question is an intercel SAM3G+


Back to top
View user's profile
sweaver



Joined: 30 Jan 2014
Posts: 7

PostPosted: Wed Jul 30, 2014 10:10 pm    Post subject: Reply with quote

I tried the "stripNonPrintable = true" options for both the carrier and the global template. It replaced all newlines with a space, which is not what I am after. As far as I can tell, there are two issues at play, the following describes the events that I am observing:

I proceed with the assumption that PageGate uses the Windows EOL convention

1. The alert trigger action within the Solarwinds advanced alert manager is correctly formed, copying and pasting from Notepad++ confirming the correct convention is observed. Each line has a CRLF at the end.

2. Issue 1: Solarwinds outputs a malformed .asc file, each line actually has 2 CRs and an LF i.e. CRCRLF. This is invisible to notepad, but obvious if you open the file in wordpad or notepad++

3. Issue 2: The file is processed, PageGate inserts multiple \013\010 entries for each CR and seems to ignore LF. For a single CRLF Pagegate sends 2 \013\010 to the modem.

I created 3 files which conform to the following EOL standards - Windows (CRLF), Unix (LF) and (Old) Mac (CR). I observed the following:

Unix was rejected.
The Mac and Windows formatted .asc files both sent with two CRLFs for each CR in the .asc file.

For reference the files were of the following format:

Code:
sweaver
sweaver
<EOL Type>:1
2

3


4


Where <EOL Type> is "Windows", "Mac" or "Unix" respectively.

I received

Code:
<EOL Type>

1

2



3





4

Note the extra newline at the end as well as the duplication of the newlines from the file to the message.

Obviously the first issue is something that I need to put to Solarwinds. The issue of PageGate's behaviour is somewhat more complicated - is there a setting or something that I am missing that can fix this behaviour?

EDIT: The additional newline at the end of the message appears to be a quirk of the modem - that happens when sending messages directly via AT commands and a serial terminal connection. So that one isn't PageGate's behaviour.


Back to top
View user's profile
Tech Support



Joined: 25 Aug 2003
Posts: 3684

PostPosted: Thu Jul 31, 2014 9:43 am    Post subject: Reply with quote

Ah, that's good information to have. What make and model of cellular modem are you using? Also, if you find a solution to the additional newline from the modem's manufacturer, please let us know so we can document it just in case another of our clients is using the same make and model of cellular modem.



_________________
Tech Support
support@notepage.com
http://www.notepage.net
Back to top
View user's profile
sweaver



Joined: 30 Jan 2014
Posts: 7

PostPosted: Thu Jul 31, 2014 9:06 pm    Post subject: Reply with quote

Hi , I think there's been some miscommunication - it certainly seems that pagegate is responsible for issue 2.

The additional new line that is sent by the modem is the final one.

i.e. at the end of the message there is an additional new line.

By simply copying and pasting the contents of a .asc file (less the recipient and from information) the modem sends the expected message (where the correct number of newlines is respected), but an additional newline is appended at the end (I presume with the Control+Z character).

So - messages sent directly from the modem using a serial terminal service and copying and pasting from a .asc file sends as expected. Messages sent via pagegate still have double newlines within the body.

So, to summarize:

1. Solarwinds produces malformed messages
2. PageGate sends two newlines for each CR
3. The modems appends a single, additional newline to the message (unfortunately the bbcode parser strips trailing newlines from codeblocks).

So, I am talking to solarwinds about 1, 3 is not really an issue.

2 remains a problem.

As I mentioned above the modem is an Intercel SAM3G Plus.


Back to top
View user's profile
OzCom



Joined: 22 Oct 2003
Posts: 1043
Location: US

PostPosted: Fri Aug 01, 2014 6:54 am    Post subject: Reply with quote

Under advanced settings, you can tell getASCII to treat <CR><CR> as a single <CR>


Back to top
View user's profile Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Tech Support



Joined: 25 Aug 2003
Posts: 3684

PostPosted: Fri Aug 01, 2014 8:00 am    Post subject: Reply with quote

Ah, I did misunderstand what you meant. To key off of what OzCom mentioned, though, you can have the program replace the double carriage returns with a single carriage return:

1) Open the PG Admin.

2) Go to Interfaces - GetAscii - Settings - Advanced Polling - Message.

3) Put a check in "use lookup table", if it isn't already checked.

4) Click on Add.

5) Set the following:
Data In: \013\013

Data Out: \013

5) Click on Apply.

6) Click on Apply again.



_________________
Tech Support
support@notepage.com
http://www.notepage.net
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    NotePage, Inc. Forum Index -> Integration Related Questions All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2002 phpBB Group
Theme created by Vjacheslav Trushkin