<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 12 (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: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;}
pre
{mso-style-priority:99;
mso-style-link:"HTML Preformatted Char";
margin:0in;
margin-bottom:.0001pt;
font-size:10.0pt;
font-family:"Courier New";}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Calibri","sans-serif";
color:windowtext;}
span.HTMLPreformattedChar
{mso-style-name:"HTML Preformatted Char";
mso-style-priority:99;
mso-style-link:"HTML Preformatted";
font-family:"Courier New";}
.MsoChpDefault
{mso-style-type:export-only;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
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">My installation is an old Hobbit 4.2.0 one, but in case the graphing is still similar to the way Xymon does things nowadays, I thought I’d ask here.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I am familiar with custom graphs, using NCV, and have implemented many. I am looking to try something a little different from that.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I have a network appliance (not a “server”) that cannot have the Hobbit client installed on it, but I can gather CPU load info from it like this “ssh user@appliance status cpu”. This generates a response like this example:
<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">0.18 0.14 0.10 3/74 29150<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">Command Result : 0 (Success)<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I currently use the above collected data to create a “status” message that I then use the “bb” command to send to Hobbit. Works as expected, with the data showing up in the “cpu” column for this appliance I am monitoring:<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span style="font-family:"Courier New";color:red">/usr/local/bin/bb<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New";color:red">192.168.0.1<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New";color:red">status qcosvhsm1.cpu green Tue Apr 2 15:55:16 2013<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New";color:red">CPU load<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New";color:red">========<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New";color:red"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New";color:red">&green 5 minute average CPU load is 0.10, which is <= warning level of 3<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New";color:red"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New";color:red">load average: 0.10, 0.10, 0.09<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New";color:red"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New";color:red">Raw data (command = 'status cpu'):<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New";color:red"> 0.10 0.10 0.09 3/74 7177<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New";color:red"> Command Result : 0 (Success)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New";color:red"><o:p> </o:p></span></p>
<p class="MsoNormal">(I have other custom stuff that turns text like “&green” into a link to the green light icon Hobbit normally uses, but that’s irrelevant to my questions here.)<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><b>What I would like to do is use the built-in RRD and “CPU Load” graph definitions to display a graph on the Hobbit webpage.</b> I realize I can make my own custom ones, and I know how to do that already (but not showing up on the default
“cpu” column, I’d have to make a different “cpu_load” column using a different name than just “cpu”), but I wanted to try sending my data into Hobbit to force it to use the built-in definitions rather than my own custom defs. You can see in the above bb message
I formatted a part of the text as “load average: 0.10, 0.10, 0.09” so that would mimic what Hobbit normally sees in the data typically collected with “top” (which I believe is how it collects data on CPU load – but I’m not sure of Hobbits internals in this
case – possibly it uses some other command, maybe “uptime”).<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Do I need to send an additional “data” message along with the “status” message above to trigger the graphing? What format would that data message require? Typically for a custom graph you add onto the TEST2RRD line with “column_name=ncv”
but I can see as part of the original TEST2RRD line that there already is a part that says “cpu=la”. As I understand TEST2RRD (and I don’t understand it all that well), I think this means that incoming “status” and “data” messages for “cpu” are directed to
some internal “la” module. I am working on the assumption that all’s I need to do to invoke the built-in graphing defs for “CPU Load” is to format my custom status message so that the “la” module can parse out the load data it needs for graphing. Am I even
close to being correct in this assumption?<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Any tips on how I should proceed? This is as much a mental gymnastics exercise as anything. It is going into a production system and I know how to skin this cat another way. I was just hoping to learn how to skin this cat using the already
built-in “CPU Load” graphing definitions.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Thanks in advance!<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</body>
</html>