Generating Smokeping probes and targets with PHP and MySQL

Well, the concept is so simple, that of course there is no limit in language and database. You should modify paths and other credentials in code. This is just basic example how you could achieve such thing.

PHP file that will generete part of our smokeping config with Probes and Targets on server with database:

Script to download configuration and restart smokeping if something changes:

CRON to periodically call smokepingUpdate.sh:

In smokeping/etc/config you should remove section „Targets“ and „Probes“, because they are generated by script and add this line at the end of file to start loading our config:

I use this to start Smokeping:

That’s all! Just one more tip – For those who need (just as I) to show graphs in remote system and you can’t (or just simply want) generate all graphs static (Smokeping can do that for you, possible SSD killer)… Generate graphs by calling something like this before showing them:

Share Button

2 comments

    1. Hello,

      that file will be generated from output of ProbeTargets.php.

      It will looks like sample config files for probes that are shipped with Smokeping. That generated file is not available for download, but you can generate your own with scripts from this post.

Leave a comment

Vaše emailová adresa nebude zveřejněna. Vyžadované informace jsou označeny *