Carriage Returns in JSend NSCA v2.0.1 Message

38 views
Skip to first unread message

Raj Patel

unread,
Nov 20, 2012, 5:22:56 PM11/20/12
to jsend...@googlegroups.com


---------- Forwarded message ----------
From: Rajneesh Patel <rajnee...@gmail.com>
Date: 20 November 2012 20:17
Subject: Re: Carriage Returns in JSend NSCA v2.0.1 Message
To: Mark Symons <mark....@weareact.com>


Hi Mark

Have the developers tried putting \n for newline in the message as I guess that might work

If so but you are not getting them in the email body, try \r\n e.g (carriage return line feed). SMTP uses this as the line separator in the body so that may work

Will update email link on web page to something that works. 

Let me know how you get on as curious if this works
 

Raj Patel
07957446909

Sent from my Commodore 64

On 19 Nov 2012, at 06:03 PM, Mark Symons <mark....@weareact.com> wrote:

Raj,

 

I’m sending this email direct to you as mail to I got a bounce attempting to email 'jsend...@googlegroups.com' (as suggested by the jsendnsca page).

 

Thanks for creating JSEND NSCA.

 

We are using it to report on the status of a FTPS client that runs unattended…  stuff such as:

 

                Unable to load P12 key store

 

Or:

 

                Failed to change working directory: 550 CWD failed. "/No-Such-Directory": directory not found.

 

etc.

 

As you can see from my sig, I am a tester and not a developer.    I also only get to “see” Nagios based on the emails that it sends me.  So, I hope that you won’t mind me asking this question…

 

Can JSend NSCA MessagePayload support carriage returns / line feed?

 

I’ve been told that it cannot…  but if it could then it sure would help with the formatting of the resulting emails from Nagios.

 

Thanks

 

Mark


Mark Symons – Senior Test Engineer  

 +44 (0) 1249 751207  

mark....@weareACT.com

www.weareACT.com


<image001.jpg>

 


 Applied Card Technologies Ltd
 Langley Gate  

 
Kington Langley
 Chippenham
 Wiltshire SN15 5SE

 United Kingdom

 Registered in England : 04476799


The information contained in or attached to this email is intended only for the use of the individual or entity to which it is addressed. If you are not the intended recipient, or a person responsible for delivering it to the intended recipient, you are not authorised to and must not disclose, copy, distribute, or retain this message or any part of it. It may contain information which is confidential and/or covered by legal professional or other privilege (or other rules or laws with similar effect in jurisdictions outside Northern Ireland, England and Wales).

The views expressed in this email are not necessarily the views of Applied Card Technologies Ltd. The company, its directors, officers or employees make no representation or accept any liability for its accuracy or completeness unless expressly stated to the contrary.

<image002.gif>Please consider the environment before printing this email.


 




--
Raj Patel
Mobile: 07957 446908
Home: 0208 346 3248

Lance Nehring

unread,
Oct 12, 2014, 4:36:03 PM10/12/14
to jsend...@googlegroups.com
Newlines work fine for me using the sequence "\\n".    Note the Nagios plugin API doc to make sure you're getting information to Nagios how you want it.
For example, if I want 3 lines of status text without optional performance data, my message string will be:

"line one|\\nline two\\nline three\\n"

If I'd wanted to send the (single line) optional performance data, it would go between the pipe character and the first escaped newline.   Yes, it's a bizarro format, but it works.    Probably don't need the trailing "\\n", but it doesn't hurt either.   This works for me talking to a Nagios 3.5.1 service.
Reply all
Reply to author
Forward
0 new messages