Пример #1
0
 /**
  * The Construct - as it stands, this class handles ONE monitoring server (hence, 'first()'). This
  * will need to be modified when working with multiple monitoring servers.
  */
 public function __construct()
 {
     $this->monitoring_server_ip = AdminSetting::first()->monitoring_server_ip;
     $this->monitoring_api_port = AdminSetting::first()->monitoring_api_port;
     $this->monitoring_api_username = AdminSetting::first()->monitoring_api_username;
     $this->monitoring_api_password = AdminSetting::first()->monitoring_api_password;
     $this->client = new Client();
     $this->clientAuthenticationCredentials = ['auth' => [$this->monitoring_api_username, $this->monitoring_api_password], 'verify' => false];
     $this->icingaUrl = 'https://' . $this->monitoring_server_ip . ':' . $this->monitoring_api_port . '/v1/';
 }
Пример #2
0
 /**
  * Get the default ONT password
  *
  * @return string
  */
 protected function getOntPassword()
 {
     return AdminSetting::first()->default_ont_password;
 }
Пример #3
0
 /**
  * Get the default snmp community string
  *
  * @return string
  */
 protected function getSnmpCommunity()
 {
     return AdminSetting::first()->default_snmp_community;
 }
Пример #4
0
 /**
  * Index
  */
 public function index()
 {
     $monitoringUrl = AdminSetting::first()->monitoring_server_ip . '/icingaweb2';
     return view('monitoring.index')->with('monitoringUrl', $monitoringUrl);
 }
 /**
  * Index
  */
 public function index()
 {
     return AdminSetting::first();
 }