Ganglia
Architecture and Module Development
Ganglia
monitoring suite consists of three main parts: gmond, gmetad and
ganglia-web.
monitoring suite consists of three main parts: gmond, gmetad and
ganglia-web.
gmond | The ganglia monitoring daemon (gmond) is a lightweight service that is installed on every machine you'd like to monitor. This daemon uses a simple listen/announce protocol via XDR to collect monitoring state and then shares this information via XML over TCP. Gmond is portable and collects dozens of system metrics: CPU, memory, disk, network and process data. |
gmetad | The ganglia meta daemon (gmetad) is a service that collects data from other gmetad and gmond sources and stores their state to disk in indexed round-robin databases. Gmetad provides a simple query mechanism for collecting specific information about groups of machines. Gmetad supports hierarchical delegation for creating manageable monitoring domains. |
gmetric | The ganglia metric tool is a commandline application that you can use to inject custom made metrics about hosts that are being monitored by ganglia. It has the ability to spoof messages as coming from a different host in case you want to capture and report metrics from a device where you don't have gmond running (like a network or other embedded device). |
gstat | The ganglia stat tool is a commandline application that you can use to query a gmond for metric information directly. |
gweb | The ganglia web frontend expresses the data stored by gmetad in a graphical web interface using PHP. |
Fig. Ganglia
Architecture in Cluster Mode
Ganglia-web Extension
All
of the "graph handlers"
are stored in the ../ganglia/graph.d
directory, where "ganglia"
is the top-level directory used by the webserver to publish the
various Ganglia webpages. Ganglia ships with one
general handler for metrics,
five basic reports,
and one heavily commented sample
report.
of the "graph handlers"
are stored in the ../ganglia/graph.d
directory, where "ganglia"
is the top-level directory used by the webserver to publish the
various Ganglia webpages. Ganglia ships with one
general handler for metrics,
five basic reports,
and one heavily commented sample
report.
- The
default layout of ganglia-web and default view of graphs can be
modified according our need. For that we just need to modify some
PHP code. - Uses
presentation templates so that the web site “look
and feel” can be easily customized.
modify ../ganglia/templates/defaults/*.tpl
- Adding Custom Reports
It is possible to add new custom reports, without making any changes to the “Official” Ganglai PHP code. Adding new report is a four step process.
1. All reports should be contained in a single PHP file with the name "reportName_report.php" in the
graph.d/ directory. Obviously, replace "reportName" with something suitable.
2. The *_report function should return an associative array that contains a number of specifically named
variables example:$series,$title,$vertical_label etc.
3. Within this file, you must have a PHP function called "reportName_report" that takes a single array argument that is passed by reference (not by value!). The function definition for this will look something like this: function temperature_report ( &$rrdtool_graph ) { $rrdtool_graph['vertical_label'] = 'Temperature (C)'; $rrdtool_graph['title'] = 'CPU Temeratures'; $rrdtool_graph['series'] = "... very long set of RRD tool RPN commands..."; }
4. Edit the $optional_graphs variable in the conf.php file to include the base name of your new report.
Thus, if the function name is reportName_report, and the PHP file is "reportName_report.php", include
only "reportName" in the $optional_graphs array.
$optional_graphs = array('packets', 'reportName');
Sample report to view cpu user
<?php
<?php
function graph_demo_report ( &$rrdtool_graph ) {
global $cpu_user_color,
$rrd_dir;
$rrdtool_graph['title'] ='==Demo Report==';
$rrdtool_graph['vertical-label'] = '==Demo Report==';
$series ="DEF:'cpu_user'='${rrd_dir}/cpu_user.rrd':'sum':AVERAGE "
. "AREA:'cpu_user'#$cpu_user_color:'==CPU User==' ";
$rrdtool_graph['series'] = $series;
return $rrdtool_graph;
}
?>
Gmond Matrix Gathering Agent Extension
- Gmetric – Out-of-process utility capable of invoking command line based metric gathering scripts
- Loadable modules capable of gathering multiple metrics or using advanced metric gathering APIs
Gmond Pluggable Metric Modules Development
- Using C
- Using Python
Using Python
- Extends the available metrics that can be gathered by Gmond
- Provided as dynamically loadable modules
- Configured through the gmond.conf
- Scheduled through Gmond rather than an external scheduler
- Module development is similar to an Apache module
- Able to produce multiple metrics from a single module
Each module must contain three mandatory functions
metric_init()
- Called once at module initialization time
- Must return a metric description dictionary or list of dictionaries
- Any other module initialization can also take place here
metric_handler() –
- may have multiple handlers
- Metric gathering handler
- Must return a single data value of the same type as specified in the metric_init() function
metric_cleanup()
- Called once at module termination time
- Does
not return a valueExample
Module:
Curve_Max = 15
v = int(1)
inc = int(1)
count = 0
def metric_init(params):
global Curve_Max
if ‘CurveMax’ in params:
Curve_Max = int(params[‘CurveMax’])
d = {‘name’: ‘Curve_Metric’,
‘call_back’: curve_handler,
‘time_max': int(60),
‘value_type’: ‘uint’,
‘units’: ‘Seconds’,
‘slope’: ‘both’,
‘format’: ‘%u’,
‘description’:
‘Shows a uniform curve’}
return d
def curve_handler(name):
global v,count,inc,Curve_Max
v += inc
count += 1
if count > Curve_Max:
count = 0
inc = -inc
return int(v)
def metric_cleanup():
pass
Gmond Python Module Deployment
- Copy the .py file to python directory specified in gmond.conf file put in gmond.conf
modules {
module {
name = "python_module"
path = "/usr/lib/ganglia/modpython.so"
params = "/usr/lib/ganglia/python_modules"
}
}
- Define the metric to collection group for this module
- Restart gmond
24 comments
This information which you provided is very much useful for us.It was very interesting and useful for Hadoop training Persons.We also providing ccna ccnp online training institute in worldwide.
https://bayanlarsitesi.com/
Manisa
Denizli
Malatya
Çankırı
İYU
yozgat
tunceli
hakkari
zonguldak
adıyaman
O8O
düzce
sakarya
tunceli
van
bayburt
HRJB
https://titandijital.com.tr/
çorum parça eşya taşıma
niğde parça eşya taşıma
kastamonu parça eşya taşıma
istanbul parça eşya taşıma
R6RGO
ankara evden eve nakliyat
malatya evden eve nakliyat
antep evden eve nakliyat
giresun evden eve nakliyat
kayseri evden eve nakliyat
OEL
adana evden eve nakliyat
bolu evden eve nakliyat
diyarbakır evden eve nakliyat
sinop evden eve nakliyat
kilis evden eve nakliyat
RM7PSE
kayseri evden eve nakliyat
antalya evden eve nakliyat
izmir evden eve nakliyat
nevşehir evden eve nakliyat
kayseri evden eve nakliyat
SS3Z
2790F
Sivas Evden Eve Nakliyat
Siirt Lojistik
Ünye Oto Boya
Ünye Çatı Ustası
Siirt Şehir İçi Nakliyat
Kırıkkale Evden Eve Nakliyat
Ünye Parke Ustası
Iğdır Şehir İçi Nakliyat
Aksaray Parça Eşya Taşıma
281ED
buy clenbuterol
Bitlis Evden Eve Nakliyat
Şırnak Evden Eve Nakliyat
Antep Evden Eve Nakliyat
testosterone propionat
buy winstrol stanozolol
Tunceli Evden Eve Nakliyat
Çorum Evden Eve Nakliyat
Eskişehir Evden Eve Nakliyat
F3514
Çorum Evden Eve Nakliyat
Düzce Evden Eve Nakliyat
Pancakeswap Güvenilir mi
Gümüşhane Şehir İçi Nakliyat
Ünye Oto Elektrik
Niğde Lojistik
Amasya Şehirler Arası Nakliyat
Mersin Lojistik
Muş Şehirler Arası Nakliyat
C3318
Diyarbakır Parça Eşya Taşıma
Çerkezköy Çekici
Nevşehir Parça Eşya Taşıma
Bursa Parça Eşya Taşıma
Kütahya Parça Eşya Taşıma
Sweat Coin Hangi Borsada
Eskişehir Evden Eve Nakliyat
Rize Şehir İçi Nakliyat
Muğla Şehirler Arası Nakliyat
DFFD4
%20 indirim kodu
D4859
sakarya sohbet muhabbet
kırklareli sesli sohbet siteleri
Sivas Kadınlarla Görüntülü Sohbet
Trabzon Canli Goruntulu Sohbet Siteleri
malatya rastgele görüntülü sohbet ücretsiz
en iyi görüntülü sohbet uygulaması
Tokat Yabancı Görüntülü Sohbet
kırşehir bedava görüntülü sohbet sitesi
kars bedava sohbet
4F697
Pinterest Takipçi Hilesi
Periscope Beğeni Hilesi
Threads İzlenme Satın Al
Binance Nasıl Oynanır
Soundcloud Dinlenme Hilesi
Kripto Para Nasıl Kazılır
Trovo Takipçi Hilesi
Kripto Para Nedir
Chat Gpt Coin Hangi Borsada
B9B31
Kripto Para Nasıl Alınır
Discord Sunucu Üyesi Hilesi
Btcst Coin Hangi Borsada
Referans Kimliği Nedir
Coin Nasıl Kazılır
Instagram Beğeni Satın Al
Sohbet
Linkedin Beğeni Satın Al
Twitter Trend Topic Satın Al
AB572
aave
dextools
ledger live
metamask
avax
dcent
shiba
ledger desktop
trust wallet
6DA7C
phantom
raydium
onekey
ledger desktop
poocoin
looksrare
poocoin
ellipal
satoshi
RFHGBFTHBNGNJH
شركة تنظيف بالاحساء
شركة تسليك مجاري بالدمام SuAZMij8hm
تسليك مجاري بالهفوف 0wRd7dpoWr
شركة تنظيف خزانات NJhhDh7828
شركة تسليك مجاري بالاحساء 7PjeQEMJcB
شركة رش حشرات بالاحساء q7QXujMd6L