Memory Usage per plug-in
Thomas Stocking
tstocking at groundworkopensource.com
Thu Apr 26 22:45:49 CEST 2007
Adi,
We have found that the answer to this question is dependent upon
multiple factors. Total number of service checks is of course one
factor, and Nagios 2.5 (the last version we tested) will fail to start
at around 24,000 service and host objects combined. We have also found
that with typical settings, the top end limit of Nagios running active
service checks on a 2 CPU system with 2GB RAM is around 500/minute.
Beyond this, we observed a tipping point, where latency crept up to more
than 300 seconds and stayed there. This of course depends on the running
time of the plugins used, the number of failed checks, and hence the
number of retires, the service timeout, etc.
Suffice to say that there is not an easy formula that covers all
situations. To baseline, you will need to hold many factors constant.
Our "typical" settings will not work for more than 5% of the readers of
this list, if that, and I have seen some systems running as many as 800
checks/minute in an optimized state, with low latency.
Another limitation to watch out for is the number of host state changes
per minute. With event handlers and/or notifications enabled, we have
seen Nagios handle 300 or so state changes per minute before latency
again becomes a problem. Of course, this depends on the number and speed
of the event handlers, and the speed and type of the host check, which
we optimize. In Nagios 3.x the host checks will be parallelized, but in
2.x so far, they block all service checks, and so are a major
contributor to latency.
A way around many of these limits is to use passive checks for Nagios.
We have found that on a 100% passive system with typical settings
(typical for US, remember), that around 3000 service checks can reliably
be processed per minute. This number goes up significantly when a
ramdisk is used to house the command pipe, and when NSCAfe is used
instead of NSCA to receive and process the checks.
If you are interested in commentary on your nagios plugin-writing
project, please contact us directly. We often write and enhance plugins
for this project, and would be happy to share what we know.
Thomas
Alessandro del Gallo wrote:
> adi yesaya wrote:
>> Hi Nagiosers,
>>
>> I'm just starting my school project in writing plug-ins for Nagios,
>> it's my first time with Nagios and im also learning more about Linux.
>> In this project i installed Nagios on a Linux box and run several
>> plug-ins.
>> My question is:
>> Is there any way that we can know how much memory and cpu percentage
>> do we need
>> when running 1 plug-in?
>> I need to make an estimation how much memory and cpu it will take to run
>> around 300 to 900 plug-ins.
>>
>> Could you share with me how much memory and cpu does your Nagios
>> plug-in requires when they run?
>>
>> Thank you,
>> Adi Yesaya
>>
>> ------------------------------------------------------------------------
>>
>> -------------------------------------------------------------------------
>> This SF.net email is sponsored by DB2 Express
>> Download DB2 Express C - the FREE version of DB2 express and take
>> control of your XML. No limits. Just data. Click to get it now.
>> http://sourceforge.net/powerbar/db2/
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> Nagios-users mailing list
>> Nagios-users at lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/nagios-users
>> ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.
>> ::: Messages without supporting info will risk being sent to /dev/null
> Hello, I am a Nagios user,
> I can give you my statistics.
> Nagios is currently monitoring:
> 256 hosts (0 down) (the coincidence with 2^8 is only a coincidence )
> 2212 services
> 2203 OK
> 3 Warn.
> 1 Unkn.
> 5 Criticals.
>
> I give you the `ps` output.
>
> [root at nagios01 plugins]# ps auxwww|grep nagios
> nagios 28426 0.0 0.0 5708 664 ? S Apr04 0:00
> /usr/lib/nagios/plugins//check_snmp -H **.*6.198.208 -t 60 -P 3 -L
> authPriv -a MD5 -A -U nagios -X -o laErrorFlag.2 laErrMessage.2
> laLoad.2 -c 0:0
> nagios 28430 0.0 0.1 6448 1376 ? S Apr04 0:00
> /usr/bin/snmpget -t 60 -r 5 -m ALL -v 3 -l authPriv -a MD5 -u
> -A -x DES -X **.*6.198.208:161 laErrorFlag.2
> laErrMessage.2 laLoad.2
> nagios 29198 0.0 0.0 7420 664 ? S Apr04 0:00
> /usr/lib/nagios/plugins//check_snmp -H **.*6.198.208 -e 1 -t 120 -P 3
> -L authPriv -a MD5 -A -U nagios -X -w 0:0 -c 0:1 -o
> .1.3.6.1.4.1.2021.95.100.1 .1.3.6.1.4.1.2021.95.101.1
> nagios 29199 0.0 0.1 6324 1376 ? S Apr04 0:00
> /usr/bin/snmpget -t 120 -r 1 -m ALL -v 3 -l authPriv -a MD5 -u
> -A -x DES -X **.*6.198.208:161
> .1.3.6.1.4.1.2021.95.100.1 .1.3.6.1.4.1.2021.95.101.1
> nagios 30092 0.0 0.0 6100 664 ? S Apr04 0:00
> /usr/lib/nagios/plugins//check_snmp -H **.*6.198.208 -e 1 -t 120 -P 3
> -L authPriv -a MD5 -A -U nagios -X -w 0:0 -c 0:1 -o
> .1.3.6.1.4.1.2021.107.100.1 .1.3.6.1.4.1.2021.107.101.1
> nagios 30093 0.0 0.1 5984 1376 ? S Apr04 0:00
> /usr/bin/snmpget -t 120 -r 1 -m ALL -v 3 -l authPriv -a MD5 -u
> -A -x DES -X **.*6.198.208:161
> .1.3.6.1.4.1.2021.107.100.1 .1.3.6.1.4.1.2021.107.101.1
> nagios 30153 0.0 0.0 6584 664 ? S Apr04 0:00
> /usr/lib/nagios/plugins//check_snmp -H **.*6.198.208 -e 1 -t 120 -P 3
> -L authPriv -a MD5 -A -U nagios -X -w 0:0 -c 0:1 -o
> .1.3.6.1.4.1.2021.76.100.1 .1.3.6.1.4.1.2021.76.101.1
> nagios 30154 0.0 0.1 6252 1376 ? S Apr04 0:00
> /usr/bin/snmpget -t 120 -r 1 -m ALL -v 3 -l authPriv -a MD5 -u
> -A -x DES -X **.*6.198.208:161
> .1.3.6.1.4.1.2021.76.100.1 .1.3.6.1.4.1.2021.76.101.1
> nagios 27018 0.0 0.0 5792 792 ? S Apr04 0:00
> /usr/lib/nagios/plugins//check_snmp -H **.*6.198.208 -e 1 -t 120 -P 3
> -L authPriv -a MD5 -A -U nagios -X -w 0:0 -c 0:1 -o
> .1.3.6.1.4.1.2021.110.100.1 .1.3.6.1.4.1.2021.110.101.1
> nagios 27019 0.0 0.1 4612 2020 ? S Apr04 0:00
> /usr/bin/snmpget -t 120 -r 1 -m ALL -v 3 -l authPriv -a MD5 -u
> -A -x DES -X **.*6.198.208:161
> .1.3.6.1.4.1.2021.110.100.1 .1.3.6.1.4.1.2021.110.101.1
> nagios 27425 0.9 1.0 37400 11184 ? Ssl 10:43 1:24
> /usr/bin/nagios -d /etc/nagios/nagios.cfg
> nagios 8307 0.0 0.9 37404 9436 ? S 13:04 0:00
> /usr/bin/nagios -d /etc/nagios/nagios.cfg
> nagios 8308 0.0 0.0 5592 792 ? S 13:04 0:00
> /usr/lib/nagios/plugins//check_snmp -H **.*6.197.92 -e 1 -t 120 -P 3
> -L authPriv -a MD5 -A -U nagios -X -w 0:0 -c 0:1 -o
> .1.3.6.1.4.1.2021.95.100.1 .1.3.6.1.4.1.2021.95.101.1
> nagios 8309 0.5 0.1 6264 1932 ? S 13:04 0:00
> /usr/bin/snmpget -t 120 -r 1 -m ALL -v 3 -l authPriv -a MD5 -u
> -A -x DES -X **.*6.197.92:161
> .1.3.6.1.4.1.2021.95.100.1 .1.3.6.1.4.1.2021.95.101.1
> nagios 8379 0.0 0.9 37404 9436 ? S 13:04 0:00
> /usr/bin/nagios -d /etc/nagios/nagios.cfg
> nagios 8381 0.0 0.0 6236 788 ? S 13:04 0:00
> /usr/lib/nagios/plugins//check_snmp -H **.*6.196.3 -e 1 -t 120 -P 3 -L
> authPriv -a MD5 -A -U nagios -X -w 0:0 -c 0:1 -o
> .1.3.6.1.4.1.2021.50.100.1 .1.3.6.1.4.1.2021.50.101.1
> nagios 8385 2.0 0.1 5608 2020 ? S 13:04 0:00
> /usr/bin/snmpget -t 120 -r 1 -m ALL -v 3 -l authPriv -a MD5 -u
> -A -x DES -X **.*6.196.3:161
> .1.3.6.1.4.1.2021.50.100.1 .1.3.6.1.4.1.2021.50.101.1
> nagios 8415 0.0 0.9 37404 9436 ? S 13:04 0:00
> /usr/bin/nagios -d /etc/nagios/nagios.cfg
> nagios 8416 0.0 0.0 6128 792 ? S 13:04 0:00
> /usr/lib/nagios/plugins//check_snmp -H **.*6.197.23 -e 1 -t 120 -P 3
> -L authPriv -a MD5 -A -U nagios -X -w 0:0 -c 0:1 -o
> .1.3.6.1.4.1.2021.50.100.1 .1.3.6.1.4.1.2021.50.101.1
> nagios 8417 8.0 0.1 6220 2020 ? S 13:04 0:00
> /usr/bin/snmpget -t 120 -r 1 -m ALL -v 3 -l authPriv -a MD5 -u
> -A -x DES -X **.*6.197.23:161
> .1.3.6.1.4.1.2021.50.100.1 .1.3.6.1.4.1.2021.50.101.1
> root 8423 0.0 0.0 3760 664 pts/0 S+ 13:04 0:00 grep nagios
>
>
> I hope this is useful for you.
> bye
> ------------------------------------------------------------------------
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> ------------------------------------------------------------------------
>
> _______________________________________________
> Nagios-users mailing list
> Nagios-users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagios-users
> ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.
> ::: Messages without supporting info will risk being sent to /dev/null
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.
::: Messages without supporting info will risk being sent to /dev/null
More information about the Users
mailing list