Using Upstart+???? to monitor interfaces
OK, one more question....
As I stated in my previous question, I am doing a testbed, minimal LFS build to test a few things out.
One thing I would love to figure out is if I can monitor interface connectivity and restart an interface, or use a failover interface from Upstart instead of having to have an external monitoring application? Or, could I let Upstart start the interfaces, and use external "emit" messages to have Upstart bring interfaces up and down? Or, is Upstart not ready for this, and I should use ifupdown?
Synopsis:
A router with three interfaces eth0, eth1, and eth2.
eth0 => Internal Interface
eth1 => Primary Wan Interface
eth2 => Backup Wan Interface
on boot eth{0,1} is brought up, but not eth2. some type of test is being performed against eth1 on a regular basis (a ping to a public webserver every 10 seconds for example). When some type of condition indicates that the interface is down, I want eth2 to be fired up... but once eth1 starts responding again, eth2 will be brought back down.
What I am trying to simulate:
I have a remote office, that has an unreliable iDSL connection, but they need to stay online. So we have some other type of expensive (pay per use) connection like cellular or satilite. If the VPN to the corporate office goes down, using the cheaper connection, use the expensive one, but only as long as possible.
Solution 1:
eth{0,1} are started on bootup. eth2 is started on failed eth1. eth2 is stopped on successful startup of eth1. Interfaces are actually brought up and down using ifupdown.
Solution 2:
Upstart does not bring up any interface, but the normal ifupdown does that via /etc/interfaces. A monitoring app is brought up via upstart (so I can use a respawn) that issues the ifupdown commands to enforce the business rule.
Solution 3:
Upstart has no role here, or those features are not yet available
Personally, I think Solution 1 should be possible, and should create one heck of a stable system.
Any idea?
Kevin Fries
Senior Linux/R&D Engineer
Question information
- Language:
- English Edit question
- Status:
- Answered
- For:
- upstart Edit question
- Assignee:
- No assignee Edit question
- Last query:
- Last reply:
Can you help with this problem?
Provide an answer of your own, or ask Kevin Fries for more information if necessary.