[prev in list] [next in list] [prev in thread] [next in thread]
List: ganglia-general
Subject: Re: [Ganglia-general] why the python module can not be load into ganglia?
From: Vladimir Vuksan <vlists () veus ! hr>
Date: 2013-09-03 8:29:46
Message-ID: b848c09a-9a79-4d19-af60-68a8daaa5621 () email ! android ! com
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
Hi,
I see it says enabled = no in example.pyconf. Change that and see if it helps
ch huang <justlooks@gmail.com> wrote:
>hi,all:
>
>i do my test on my host,
>
># rpm -qa|grep ganglia
>libganglia-3.6.0-1.x86_64
>ganglia-gmond-modules-python-3.6.0-1.x86_64
>ganglia-gmond-3.6.0-1.x86_64
>
># cat /etc/ganglia/conf.d/modpython.conf
>/*
> params - path to the directory where mod_python
> should look for python metric modules
> the "pyconf" files in the include directory below
> will be scanned for configurations for those modules
>*/
>modules {
> module {
> name = "python_module"
> path = "modpython.so"
> params = "/usr/lib64/ganglia/python_modules"
> }
>}
>include ("/etc/ganglia/conf.d/*.pyconf")
>
>here is example for test
>
># cat /etc/ganglia/conf.d/example.pyconf
>modules {
> module {
> name = "example"
> language = "python"
> enabled = "no"
> param RandomMax {
> value = 600
> }
> param ConstantValue {
> value = 112
> }
> }
>}
>#/* Collection groups for the
># example python module */
>collection_group {
> collect_every = 10
> time_threshold = 50
> metric {
> name = "PyRandom_Numbers"
> value_threshold = 1.0
> }
>}
>collection_group {
> collect_once = yes
> time_threshold = 20
> metric {
> name = "PyConstant_Number"
> }
>}
>
>and put python script in
>
># ls /usr/lib64/ganglia/python_modules/example.py
>/usr/lib64/ganglia/python_modules/example.py
>
>and scrsipt test is ok
>
># python /usr/lib64/ganglia/python_modules/example.py
>[pyexample] Received the following parameters
>{'ConstantValue': '322', 'RandomMax': '500'}
>value for PyRandom_Numbers is 160
>value for PyConstant_Number is 322
>
>but i can not see example module loaded when i use gmond -m
>
># gmond -m |grep xample
>
>why? anyone can help?
>
>
>------------------------------------------------------------------------
>
>------------------------------------------------------------------------------
>Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
>Discover the easy way to master current and previous Microsoft
>technologies
>and advance your career. Get an incredible 1,500+ hours of step-by-step
>tutorial videos with LearnDevNow. Subscribe today and save!
>http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
>
>------------------------------------------------------------------------
>
>_______________________________________________
>Ganglia-general mailing list
>Ganglia-general@lists.sourceforge.net
>https://lists.sourceforge.net/lists/listinfo/ganglia-general
Vladimir
[Attachment #5 (text/html)]
<html><head></head><body>Hi, <br>
<br>
I see it says enabled = no in example.pyconf. Change that and see if it helps \
<br><br><div class="gmail_quote">ch huang <justlooks@gmail.com> \
wrote:<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: \
1px solid rgb(204, 204, 204); padding-left: 1ex;"> <div>hi,all:</div>
<div> </div>
<div>i do my test on my host,</div>
<div> </div>
<div># rpm -qa|grep ganglia<br />libganglia-3.6.0-1.x86_64<br \
/>ganglia-gmond-modules-python-3.6.0-1.x86_64<br />ganglia-gmond-3.6.0-1.x86_64</div> \
<div> </div> <div># cat /etc/ganglia/conf.d/modpython.conf<br />/*<br /> params - \
path to the directory where mod_python<br /> should look for \
python metric modules</div> <div> the "pyconf" files in the include \
directory below<br /> will be scanned for configurations for those modules<br \
/>*/<br />modules {<br /> module {<br /> name = "python_module"<br \
/> path = "modpython.so"<br />
params = "/usr/lib64/ganglia/python_modules"<br /> }<br />}</div>
<div>include ("/etc/ganglia/conf.d/*.pyconf")</div>
<div> </div>
<div>here is example for test</div>
<div> </div>
<div># cat /etc/ganglia/conf.d/example.pyconf<br />modules {<br /> module {<br /> \
name = "example"<br /> language = "python"<br /> \
enabled = "no"<br /> param RandomMax {<br /> value = \
600<br />
}<br /> param ConstantValue {<br /> value = 112<br /> \
}<br /> }<br />}</div> <div>#/* Collection groups for the<br /># example \
python module */<br />collection_group {<br /> collect_every = 10<br /> \
time_threshold = 50<br /> metric {<br /> name = \
"PyRandom_Numbers"<br /> value_threshold = 1.0<br /> }<br />}</div>
<div>collection_group {<br /> collect_once = yes<br /> time_threshold = 20<br /> \
metric {<br /> name = "PyConstant_Number"<br /> }<br />}<br /><br \
/>and put python script in </div> <div> </div>
<div># ls /usr/lib64/ganglia/python_modules/example.py<br \
/>/usr/lib64/ganglia/python_modules/example.py</div> <div> </div>
<div>and scrsipt test is ok</div>
<div> </div>
<div># python /usr/lib64/ganglia/python_modules/example.py<br />[pyexample] Received \
the following parameters<br />{'ConstantValue': '322', \
'RandomMax': '500'}<br />value for PyRandom_Numbers is 160<br /> \
value for PyConstant_Number is 322</div> <div> </div>
<div>but i can not see example module loaded when i use gmond -m</div>
<div> </div>
<div># gmond -m |grep xample</div>
<div> </div>
<div>why? anyone can help?</div>
<p style="margin-top: 2.5em; margin-bottom: 1em; border-bottom: 1px solid \
#000"></p><pre class="k9mail"><hr /><br />Learn the latest--Visual Studio 2012, \
SharePoint 2013, SQL 2012, more!<br />Discover the easy way to master current and \
previous Microsoft technologies<br />and advance your career. Get an incredible \
1,500+ hours of step-by-step<br />tutorial videos with LearnDevNow. Subscribe today \
and save!<br /><a href="http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu= \
/4140/ostg.clktrk">http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk</a></pre><p \
style="margin-top: 2.5em; margin-bottom: 1em; border-bottom: 1px solid #000"></p><pre \
class="k9mail"><hr /><br />Ganglia-general mailing list<br \
/>Ganglia-general@lists.sourceforge.net<br /><a \
href="https://lists.sourceforge.net/lists/listinfo/ganglia-general">https://lists.sourceforge.net/lists/listinfo/ganglia-general</a><br \
/></pre></blockquote></div><br> Vladimir</body></html>
------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
_______________________________________________
Ganglia-general mailing list
Ganglia-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ganglia-general
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic