[prev in list] [next in list] [prev in thread] [next in thread] 

List:       collectd
Subject:    [collectd] [Microsoft] Issues with Developing a Java Writer Plugin for Microsoft's Product
From:       Yoni Shalom <yonisha () microsoft ! com>
Date:       2015-04-13 11:21:51
Message-ID: ba68e057f806428faa62fd4d4dd52428 () DB4PR30MB013 ! 064d ! mgd ! msft ! net
[Download RAW message or body]

Hi,
I'm an engineer at Microsoft and my team would like to implement a Java wri=
ter plugin for our product.
I've tried to implement the simplest plugin but with no success. Didn't fin=
d any proper documentation for Java plugins development either.

Your prompt response will be highly appreciated as we're going to GA very s=
oon and this plugin will be highly valued for our customers.

I encounter the same error over and over again, that the class provided in =
the LoadPlugin element (collectd.config) was not found on the agent startup=
.
Here's what I've done:

1.       Installed collectd using: sudo apt-get install collectd.

2.       Downloaded collectd sources.

3.       Added a new (very simple) writer plugin under /bindings/java/org/c=
ollectd/java.

4.       Modified the /bindings/java/Makefile.am:

a.       Added the writer to the EXTRA_DIST list.

b.      Added the following line to the java-build-stamp task (to create a =
jar for the new writer):
jar cf .lib/simple.jar "com.microsoft.java"/*.class

c.       Added the following line to the install-exec-local task:
$(INSTALL) -m 644 .libs/simple.jar \ "$(DESTDIR)$(pkgdatadir)/java"

5.       Executed ./configure from the sources root directory.

6.       Executed sudo make all install  from the root directory and then a=
gain from bindings/java directory.

7.       Modified collectd.config:

a.       Enabled the Java plugin

b.      Enabled the new plugin by adding: "LoadPlugin "com.microsoft.java.S=
impleWriter" to the Java plugin section.

c.       Update the JVM class path argument to include the jar containing t=
he new plugin.

8.       Started collectd by executing: sudo /etc/init.d/collectd start

Worth mentioning that when I enabled the GenericJMX plugin it has been load=
ed successfully.

Thanks in advance.



[Attachment #3 (text/html)]

<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 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:0in;
	margin-bottom:.0001pt;
	font-size:11.0pt;
	font-family:"Calibri",sans-serif;}
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;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
	{mso-style-priority:34;
	margin-top:0in;
	margin-right:0in;
	margin-bottom:0in;
	margin-left:.5in;
	margin-bottom:.0001pt;
	font-size:11.0pt;
	font-family:"Calibri",sans-serif;}
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;}
@page WordSection1
	{size:8.5in 11.0in;
	margin:1.0in 1.25in 1.0in 1.25in;}
div.WordSection1
	{page:WordSection1;}
/* List Definitions */
@list l0
	{mso-list-id:551891666;
	mso-list-type:hybrid;
	mso-list-template-ids:1430170118 67698703 67698713 67698715 67698703 67698713 \
67698715 67698703 67698713 67698715;} @list l0:level1
	{mso-level-tab-stop:none;
	mso-level-number-position:left;
	text-indent:-.25in;}
@list l0:level2
	{mso-level-number-format:alpha-lower;
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	text-indent:-.25in;}
@list l0:level3
	{mso-level-number-format:roman-lower;
	mso-level-tab-stop:none;
	mso-level-number-position:right;
	text-indent:-9.0pt;}
@list l0:level4
	{mso-level-tab-stop:none;
	mso-level-number-position:left;
	text-indent:-.25in;}
@list l0:level5
	{mso-level-number-format:alpha-lower;
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	text-indent:-.25in;}
@list l0:level6
	{mso-level-number-format:roman-lower;
	mso-level-tab-stop:none;
	mso-level-number-position:right;
	text-indent:-9.0pt;}
@list l0:level7
	{mso-level-tab-stop:none;
	mso-level-number-position:left;
	text-indent:-.25in;}
@list l0:level8
	{mso-level-number-format:alpha-lower;
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	text-indent:-.25in;}
@list l0:level9
	{mso-level-number-format:roman-lower;
	mso-level-tab-stop:none;
	mso-level-number-position:right;
	text-indent:-9.0pt;}
ol
	{margin-bottom:0in;}
ul
	{margin-bottom:0in;}
--></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="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal">Hi,<o:p></o:p></p>
<p class="MsoNormal">I&#8217;m an engineer at Microsoft and my team would like to \
implement a Java writer plugin for our product.<o:p></o:p></p> <p \
class="MsoNormal">I&#8217;ve tried to implement the simplest plugin but with no \
success. Didn&#8217;t find any proper documentation for Java plugins development \
either.<o:p></o:p></p> <p class="MsoNormal"><b><o:p>&nbsp;</o:p></b></p>
<p class="MsoNormal"><b>Your prompt response will be highly appreciated as \
we&#8217;re going to GA very soon and this plugin will be highly valued for our \
customers.<o:p></o:p></b></p> <p class="MsoNormal"><br>
I encounter the same error over and over again, that the class provided in the \
LoadPlugin element (collectd.config) was not found on the agent \
startup.<o:p></o:p></p> <p class="MsoNormal">Here&#8217;s what I&#8217;ve \
done:<o:p></o:p></p> <p class="MsoListParagraph" \
style="text-indent:-.25in;mso-list:l0 level1 lfo1"><![if !supportLists]><span \
style="mso-list:Ignore">1.<span style="font:7.0pt &quot;Times New \
Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><![endif]><span \
dir="LTR"></span>Installed collectd using: <i>sudo apt-get install \
collectd.</i><o:p></o:p></p> <p class="MsoListParagraph" \
style="text-indent:-.25in;mso-list:l0 level1 lfo1"><![if !supportLists]><span \
style="mso-list:Ignore">2.<span style="font:7.0pt &quot;Times New \
Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><![endif]><span \
dir="LTR"></span>Downloaded collectd sources.<o:p></o:p></p> <p \
class="MsoListParagraph" style="text-indent:-.25in;mso-list:l0 level1 lfo1"><![if \
!supportLists]><span style="mso-list:Ignore">3.<span style="font:7.0pt &quot;Times \
New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><![endif]><span \
dir="LTR"></span>Added a new (very simple) writer plugin under \
/bindings/java/org/collectd/java.<o:p></o:p></p> <p class="MsoListParagraph" \
style="text-indent:-.25in;mso-list:l0 level1 lfo1"><![if !supportLists]><span \
style="mso-list:Ignore">4.<span style="font:7.0pt &quot;Times New \
Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><![endif]><span \
dir="LTR"></span>Modified the /bindings/java/Makefile.am:<o:p></o:p></p> <p \
class="MsoListParagraph" style="margin-left:1.0in;text-indent:-.25in;mso-list:l0 \
level2 lfo1"> <![if !supportLists]><span style="mso-list:Ignore">a.<span \
style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
</span></span><![endif]><span dir="LTR"></span>Added the writer to the EXTRA_DIST \
list.<o:p></o:p></p> <p class="MsoListParagraph" \
style="margin-left:1.0in;text-indent:-.25in;mso-list:l0 level2 lfo1"> <![if \
!supportLists]><span style="mso-list:Ignore">b.<span style="font:7.0pt &quot;Times \
New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><![endif]><span \
dir="LTR"></span>Added the following line to the <b> java-build-stamp </b>task (to \
create a jar for the new writer):<br> <i>jar cf .lib/simple.jar \
&#8220;com.microsoft.java&#8221;/*.class</i><o:p></o:p></p> <p \
class="MsoListParagraph" style="margin-left:1.0in;text-indent:-.25in;mso-list:l0 \
level2 lfo1"> <![if !supportLists]><span style="mso-list:Ignore">c.<span \
style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
</span></span><![endif]><span dir="LTR"></span>Added the following line to the <b> \
install-exec-local</b> task:<br> <i>$(INSTALL) &#8211;m 644 .libs/simple.jar \ \
&#8220;$(DESTDIR)$(pkgdatadir)/java&#8221;</i><o:p></o:p></p> <p \
class="MsoListParagraph" style="text-indent:-.25in;mso-list:l0 level1 lfo1"><![if \
!supportLists]><span style="mso-list:Ignore">5.<span style="font:7.0pt &quot;Times \
New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><![endif]><span \
dir="LTR"></span>Executed <b>./configure</b> from the sources root \
directory.<o:p></o:p></p> <p class="MsoListParagraph" \
style="text-indent:-.25in;mso-list:l0 level1 lfo1"><![if !supportLists]><span \
style="mso-list:Ignore">6.<span style="font:7.0pt &quot;Times New \
Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><![endif]><span \
dir="LTR"></span>Executed <b>sudo make all install &nbsp;</b>from the root directory \
and then again from <b>bindings/java </b>directory.<o:p></o:p></p>
<p class="MsoListParagraph" style="text-indent:-.25in;mso-list:l0 level1 lfo1"><![if \
!supportLists]><span style="mso-list:Ignore">7.<span style="font:7.0pt &quot;Times \
New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><![endif]><span \
dir="LTR"></span>Modified <b>collectd.config</b>:<o:p></o:p></p> <p \
class="MsoListParagraph" style="margin-left:1.0in;text-indent:-.25in;mso-list:l0 \
level2 lfo1"> <![if !supportLists]><span style="mso-list:Ignore">a.<span \
style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
</span></span><![endif]><span dir="LTR"></span>Enabled the Java plugin<o:p></o:p></p> \
<p class="MsoListParagraph" style="margin-left:1.0in;text-indent:-.25in;mso-list:l0 \
level2 lfo1"> <![if !supportLists]><span style="mso-list:Ignore">b.<span \
style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
</span></span><![endif]><span dir="LTR"></span>Enabled the new plugin by adding: \
&#8220;LoadPlugin &#8220;com.microsoft.java.SimpleWriter&#8221; to the Java plugin \
section.<o:p></o:p></p> <p class="MsoListParagraph" \
style="margin-left:1.0in;text-indent:-.25in;mso-list:l0 level2 lfo1"> <![if \
!supportLists]><span style="mso-list:Ignore">c.<span style="font:7.0pt &quot;Times \
New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><![endif]><span \
dir="LTR"></span>Update the JVM class path argument to include the jar containing the \
new plugin.<o:p></o:p></p> <p class="MsoListParagraph" \
style="text-indent:-.25in;mso-list:l0 level1 lfo1"><![if !supportLists]><span \
style="mso-list:Ignore">8.<span style="font:7.0pt &quot;Times New \
Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><![endif]><span \
dir="LTR"></span>Started collectd by executing: <b> sudo /etc/init.d/collectd \
start</b><o:p></o:p></p> <p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal">Worth mentioning that when I enabled the GenericJMX plugin it \
has been loaded successfully.<o:p></o:p></p> <p \
class="MsoNormal"><o:p>&nbsp;</o:p></p> <p class="MsoNormal">Thanks in \
advance.<o:p></o:p></p> <p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
</body>
</html>



_______________________________________________
collectd mailing list
collectd@verplant.org
http://mailman.verplant.org/listinfo/collectd

--===============1702487612==--


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic