I've spent most of the day developing a new tool for measuring "how fast" is our pandora database, and of course, in a way we can use it for monitoring inside pandora.
I've added to /pandora_server/util a new tool called pandora_database_check.pl
Usage will be following (for debugging/interactive):
/usr/share/pandora_server/util/pandora_database_check.pl /etc/pandora/pandora_server.conf -v
Data access time: 0.0506000518798828 (seconds)
Event process time: 0.303145170211792 (seconds)
Get group stats: 0.161117076873779 (seconds)
Pandora agent processing: 0.135824918746948 (seconds)
Total time: 0.650687217712402 (seconds)
Using without -v just give the single value (for using in a pandora module):
Inside this code there are a few checks, using different combinations of sequential select (picking randomly a module, and drawing latest 24hr of data), choosing randomly events from database, creating some random events, updating them and deleting. Script also get a complete group stats from database (massive stats from all agents, all module status), and ends by creating 10 agents with one module, and deleting all the data created.
My idea is to keep a public record of some kind of "stats" where we can put the hardware used, and the size of the pandora, just to check if we're under or over the average, useful to detect across the time passes, if our system is degrading, or just to check if our optimizations in configuration, databases, etc are useful or not.
By the way my Pandora's Speedindex are:
Firefly: 4GB, Real hardware i5@..., Pandora 4.0.2 with 35 agents, 330 modules is 0.660
Beholder, 1.5GB, Virtualized, Xeon 2.4Ghz, Pandora 4.0.1 with 22 agents, 212 modules is 0.612
In some systems (probably coming from a migration of previous versions) seems to give an error:
Use of uninitialized value in string ne at /usr/lib/perl5/PandoraFMS/Core.pm line 934.
¿? I'm trying to solve this, in the meantime (help appreciated!), you can execute suppressing error output:
/usr/share/pandora_servetabase_check.pl /etc/pandora/pandora_server.conf 2> /dev/null