Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- production:
- ..
- observium:
- adapter: mysql2
- database: observium
- username: username
- password: password
- host: observium.domain.com
- port: 3306
- wait_timeout: 86400
- development:
- ..
- class ObserviumPort < ActiveRecord::Base
- establish_connection :observium
- self.table_name = 'ports'
- def self.get_port(circuit)
- result = ObserviumPort.find(
- :first,
- :conditions => ['port_descr_circuit = ?', circuit.id],
- :order => 'ifName ASC',
- :limit => 1
- )
- return result.port_id
- end
- Mysql2::Error (Can't connect to MySQL server on 'observium.domain.com' (4)):
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement