At some point in the last few weeks, I repeatedly had to recreate my Nagios config for currently six filers. After doing that a few times, I ended up (like sooo often) writing a short Bash script, that’ll do this for me – without any fuss.
The only thing the script needs, is that the filers and the filers are registered in DNS … Here’s an example:
fas3240a IN A 172.31.76.150
fas3240a-sp IN A 172.31.74.150
fas3240b IN A 172.31.76.151
fas3240b-sp IN A 172.31.74.151
With that done, the script will create the necessary Nagios config for those filers.