Is it possible to have a syslog or snmp event trigger puppet to log into a network device and execute a config change?

case in point, if I have a nexus switch with two paths for default gateways and one goes down. Can I have some sort of event sent to puppet in order to trigger it to automatically log into the switch and change the default gateway?