Question about reformatting output

Christian Canal <[email protected]> Fri, 26 Jan 2018 09:55:58 +0000
Newsgroups gmane.network.nagios.plugins
Message-ID <7B7FA2FFA4035641B4565A58486962124E4F72DC__7812.6237066046$1516961037$gmane$org@mail.ras.bz.it>
--_000_7B7FA2FFA4035641B4565A58486962124E4F72DCmailrasbzit_
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Dear Monitoring Plugins Development Team,

I use your check_snmp (v2.2) Plugin a lot with W=FCrthPhonenix Neteye 4 (ba=
sed on Icinga2).


I often have devices which respond with multistate integers [0 1 2 3 4]. Th=
e values have different meanings like:

0 =3D 10 Mbit/s HD; 1 =3D 10 Mbit/s FD; 2 =3D 100 Mbit/s HD; 3 =3D 100 Mbit=
/s FD; 4 =3D 1 GBit/s

These values trigger no alarm but are very useful to have.

[Other examples are OS Type ecc.]


When requesting this OID with check_snmp and uning the -l Argument -l 'Port=
 Speed:' I get following output:

SNMP OK - Port Speed: 4

Is there any possibility to convert the numeric output "4" to "1 GBit/s" wi=
th ad additional argument?


I read that there is the -m argument, but do not precisely know how to use =
it.


Many thanks and best regards!


Christian Canal
Informatik
Informatica

RAS
Fernsehen und Radio f=FCr S=FCdtirol
Televisione e radio per l'Alto Adige
Televijion y radio per l S=FCdtirol

Europaallee Viale Europa 164/A
39100 Bozen, Bolzano, Italy
Tel +39 0471 546 627
Fax +39 0471 200378
Mobile +39 328 655 0392
www.ras.bz.it<http://www.ras.bz.it/>



--_000_7B7FA2FFA4035641B4565A58486962124E4F72DCmailrasbzit_
Content-Type: text/html; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<html xmlns:v=3D"urn:schemas-microsoft-com:vml" xmlns:o=3D"urn:schemas-micr=
osoft-com:office:office" xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml" xmlns=3D"http:=
//www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Diso-8859-=
1">
<meta name=3D"Generator" content=3D"Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
	{font-family:"Cambria Math";
	panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
	{font-family:Calibri;
	panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0cm;
	margin-bottom:.0001pt;
	font-size:11.0pt;
	font-family:"Calibri",sans-serif;
	mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
	{mso-style-priority:99;
	color:#0563C1;
	text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
	{mso-style-priority:99;
	color:#954F72;
	text-decoration:underline;}
span.EmailStyle17
	{mso-style-type:personal-compose;
	font-family:"Calibri",sans-serif;
	color:windowtext;}
.MsoChpDefault
	{mso-style-type:export-only;
	font-family:"Calibri",sans-serif;
	mso-fareast-language:EN-US;}
@page WordSection1
	{size:612.0pt 792.0pt;
	margin:70.85pt 70.85pt 2.0cm 70.85pt;}
div.WordSection1
	{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext=3D"edit" spidmax=3D"1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext=3D"edit">
<o:idmap v:ext=3D"edit" data=3D"1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang=3D"DE" link=3D"#0563C1" vlink=3D"#954F72">
<div class=3D"WordSection1">
<p class=3D"MsoNormal"><span lang=3D"EN-US">Dear Monitoring Plugins Develop=
ment Team,<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US"><o:p>&nbsp;</o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US">I use your check_snmp (v2.2) Pl=
ugin a lot with W=FCrthPhonenix Neteye 4 (based on Icinga2).<o:p></o:p></sp=
an></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US"><o:p>&nbsp;</o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US"><o:p>&nbsp;</o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US">I often have devices which resp=
ond with multistate integers [0 1 2 3 4]. The values have different meaning=
s like:<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US"><o:p>&nbsp;</o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US">0 =3D 10 Mbit/s HD; 1 =3D 10 Mb=
it/s FD; 2 =3D 100 Mbit/s HD; 3 =3D 100 Mbit/s FD; 4 =3D 1 GBit/s<o:p></o:p=
></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US"><o:p>&nbsp;</o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US">These values trigger no alarm b=
ut are very useful to have.<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US"><o:p>&nbsp;</o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US">[Other examples are OS Type ecc=
.]<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US"><o:p>&nbsp;</o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US"><o:p>&nbsp;</o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US">When requesting this OID with c=
heck_snmp and uning the -l Argument -l 'Port Speed:' I get following output=
:<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US"><o:p>&nbsp;</o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US">SNMP OK - Port Speed: 4<o:p></o=
:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US"><o:p>&nbsp;</o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US">Is there any possibility to con=
vert the numeric output &quot;4&quot; to &quot;1 GBit/s&quot; with ad addit=
ional argument?<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US"><o:p>&nbsp;</o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US"><o:p>&nbsp;</o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US">I read that there is the -m arg=
ument, but do not precisely know how to use it.<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US"><o:p>&nbsp;</o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US"><o:p>&nbsp;</o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US">Many thanks and best regards!<o=
:p></o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US"><o:p>&nbsp;</o:p></span></p>
<p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
<p class=3D"MsoNormal"><span lang=3D"IT" style=3D"font-size:10.0pt;font-fam=
ily:&quot;Arial&quot;,sans-serif;color:black;mso-fareast-language:DE">Chris=
tian Canal<o:p></o:p></span></p>
<div>
<div>
<p class=3D"MsoNormal"><span lang=3D"IT" style=3D"font-size:10.0pt;font-fam=
ily:&quot;Arial&quot;,sans-serif;color:#59595C;mso-fareast-language:DE">Inf=
ormatik<o:p></o:p></span></p>
</div>
<div>
<p class=3D"MsoNormal"><span lang=3D"IT" style=3D"font-size:10.0pt;font-fam=
ily:&quot;Arial&quot;,sans-serif;color:#59595C;mso-fareast-language:DE">Inf=
ormatica<o:p></o:p></span></p>
</div>
</div>
<div>
<p class=3D"MsoNormal"><span lang=3D"IT" style=3D"font-size:10.0pt;font-fam=
ily:&quot;Arial&quot;,sans-serif;color:#F05522;mso-fareast-language:DE"><br=
>
<b>RAS</b><br>
Fernsehen und Radio f=FCr S=FCdtirol<br>
Televisione e radio per l'Alto Adige<br>
Televijion y radio per l S=FCdtirol<o:p></o:p></span></p>
</div>
<p class=3D"MsoNormal"><span lang=3D"IT" style=3D"font-size:10.0pt;font-fam=
ily:&quot;Arial&quot;,sans-serif;color:#59595C;mso-fareast-language:DE"><br=
>
Europaallee Viale Europa 164/A<br>
39100 Bozen, Bolzano, Italy<br>
Tel &#43;39 0471 546 627<br>
Fax &#43;39 0471 200378<br>
Mobile &#43;39 328 655 0392<br>
</span><span style=3D"font-size:10.0pt;font-family:&quot;Arial&quot;,sans-s=
erif;color:#59595C;mso-fareast-language:DE"><a href=3D"http://www.ras.bz.it=
/"><span lang=3D"IT" style=3D"color:blue">www.ras.bz.it</span></a></span><s=
pan lang=3D"IT"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"IT"><o:p>&nbsp;</o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"IT"><o:p>&nbsp;</o:p></span></p>
</div>
</body>
</html>

--_000_7B7FA2FFA4035641B4565A58486962124E4F72DCmailrasbzit_--