I have accumulated a few scripts during my time as SysAdmin
Here they are.
I started using Zabbix instead of Nagios/Shinken because of the auto-registration capability plus the fact that communication stream can go from client ( or proxy ) to servers. I find that stream more useful in lots of cases.
In Zabbix repository are :
A configuration file containing all informations to connect to the Zabbix server.
User must be Zabbix Super Admin
A python script used to authentice against the Zabbix server using informations in zabbixapi.conf
Add already existing Zabbix host to already existing Zabbix template based on names
Create a graph using various one or more items, each one can be attached to left or right Y-axis.
Create a user belonging to a default group ( for permissions ).
If using LDAP authentication ( like me ), you have to set a password anyway but it won't be used.
Remove a host from Zabbix
Since I'm using Puppet to configure nodes, it can be useful to map Zabbix templates to Puppet classes.
This script is doing just that by mapping Zabbix templates ( identified by names ) to Puppet classes extracted from a yaml file containing all classes and nodes.
You just have to update the equivalence
dictionnary at the beginning of the file to match your needs.
Simple scripts to communicate with Gandi. Those scripts prerequire that you have gandi cli configured on your station.
Update an IP
Delete an entry
I happened to have several dedicated servers running libvirt to administer. Here are some useful scripts in that case.
To execute those, your station needs to have ssh access without password to the hypervisors.
Migrate a domain from a libvirt hypervisor to another
Update memory and cpu count of a libvirt domain. May need a reboot of that domain.
Doesn't need to specify the hypervisor name since it uses clush to poll all hypervisors to find the proper one. All your hypervisor needs to be in a group called hypvlibv
Name speaks for itself :D