<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Balloon Text Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";}
span.BalloonTextChar
        {mso-style-name:"Balloon Text Char";
        mso-style-priority:99;
        mso-style-link:"Balloon Text";
        font-family:"Tahoma","sans-serif";}
span.EmailStyle19
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.EmailStyle20
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.25in 1.0in 1.25in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link=blue vlink=purple><div class=WordSection1><p class=MsoNormal>Hi All,<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal> Well, per Michael’s response on JIRA, I’m moving this discussion to the mailing list. <o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal> Here’s the thing – almost anyone who’s built a large scale Asterisk platform had used either<br>Nagios or Icinga (or other) to monitor it. Normally, what you would to monitor Asterisk would <br>be to either use the shell to issue ‘asterisk –rx’ commands and parse the output. Or connect<br>to the manager, issue a similar command and parse the output again. <o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal> Now, while regular expressions do the job right – I believe that adding the ability to format<br>the CLI output to a specific format can really be helpful. For example, on JIRA I’ve submitted<br>a small patch that would enable to reformat the output from “sip show peers” only XML or <br>JSON. This can now be easily be parsed from the outside using built-in scripting languages, <br>such as PHP, Python, etc – thus, providing a new means of integrating with the Asterisk CLI<br>at ease. <o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal> Initially, I’m thinking of adding this ability for the “summary” lines of various CLI commands.<br>But later on, enabling it for each of the CLI commands – that produces some operational <br>output. For example, imagine outputting the “core show channels concise” output into a JSON<br>array – man, that would really be something. <o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal> Michael claims that the CLI is the wrong place to put it – I don’t disagree with that. Question<br>be, what would be the right place to put this kind of functionality? <o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><span style='font-family:"Courier New";color:#1F497D'>Kind Regards,</span><o:p></o:p></p><p class=MsoNormal><span style='font-family:"Courier New";color:#1F497D'> Nir Simionovich</span><o:p></o:p></p><p class=MsoNormal><span style='font-family:"Courier New";color:#1F497D'> GreenfieldTech</span><span style='font-family:"Arial","sans-serif"'><o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Courier New";color:#1F497D'> (w) <a href="http://www.greenfieldtech.net/">http://www.greenfieldtech.net</a> </span><span lang=HE dir=RTL><o:p></o:p></span></p><p class=MsoNormal><span dir=LTR></span><span style='font-family:"Courier New";color:#1F497D'><span dir=LTR></span> (p) +972-73-2557799 (MSN): <a href="mailto:nirs@greenfieldtech.net">nirs@greenfieldtech.net</a></span><o:p></o:p></p><p class=MsoNormal><span style='font-family:"Courier New";color:#1F497D'> (m) +972-54-6982826 (GTALK): <a href="mailto:nir.simionovich@gmail.com">nir.simionovich@gmail.com</a></span><o:p></o:p></p><p class=MsoNormal><span style='font-family:"Courier New";color:#1F497D'> (f) +972-73-2557202 (SKYPE): greenfieldtech.nir</span><o:p></o:p></p><p class=MsoNormal><span style='font-family:"Courier New";color:#1F497D'> (<a href="http://tungle.me/">tungle.me</a>): </span><span style='font-family:"Courier New";color:black'><a href="http://tungle.me/nirsimionovich">http://tungle.me/nirsimionovich</a></span><span style='font-family:"Courier New";color:#1F497D'> </span><o:p></o:p></p><p class=MsoNormal style='margin-top:7.5pt;line-height:0%'><span style='color:#1F497D'><img border=0 width=296 height=79 id="_x0000_i1025" src="cid:image001.jpg@01CDBE16.0E211720" alt=logo2> <img border=0 width=224 height=69 id="Picture_x0020_1" src="cid:image002.jpg@01CDBE16.0E211720" alt="cid:image001.jpg@01CA5976.61329B80"> </span><o:p></o:p></p><table class=MsoNormalTable border=0 cellspacing=3 cellpadding=0><tr><td style='background:white;padding:.75pt .75pt .75pt .75pt'><p class=MsoNormal><b><span style='font-family:"Courier New";color:#1F497D'>Disclaimer:</span></b><span style='font-family:"Courier New";color:#1F497D'><br>This e-mail is intended solely for the person to whom it is addressed and may contain confidential or legally privileged information. Access to this e-mail by anyone else is unauthorized. If an addressing or transmission error has misdirected this e-mail, please notify the author by replying to this e-mail and destroy this e-mail and any attachments. <br>E-mail may be susceptible to data corruption, interception, unauthorized amendment, viruses and delays or the consequences thereof. If you are not the intended recipient, be advised that you have received this email in error and that any use, dissemination, forwarding, printing or copying of this email is strictly prohibited.</span><span style='font-size:12.0pt'><o:p></o:p></span></p></td></tr></table><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><o:p> </o:p></p></div></body></html>