~ubuntu-branches/debian/stretch/jffnms/stretch

« back to all changes in this revision

Viewing changes to engine/pollers/brocade_fcport_phystate.php

  • Committer: Package Import Robot
  • Author(s): Craig Small
  • Date: 2012-05-27 17:25:29 UTC
  • mfrom: (1.1.9)
  • Revision ID: package-import@ubuntu.com-20120527172529-w0bkk0qo3jz8vkhx
Tags: 0.9.3-1
* New upstream release
* Adjusted configurations for new apache standard Closes: #669853
* Removed orphan files Closes: #672385
* Generate valid DB config
* Fixup default config files Closes: #655654

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
 * This program is licensed under the GNU GPL, full terms in the LICENSE file
5
5
 */
6
6
 
7
 
define(swFCPortPhyState,  '1.3.6.1.4.1.1588.2.1.1.1.6.2.1.3');
8
 
    function poller_brocade_fcport_phystate ($options) {
 
7
function poller_brocade_fcport_phystate ($options) {
 
8
    $swFCPortPhyState = '1.3.6.1.4.1.1588.2.1.1.1.6.2.1.3';
9
9
 
10
10
        $community = $options['ro_community'];
11
11
        $ip = $options['host_ip'];
12
12
        $inst = $options['poller_parameters'];
13
13
 
14
14
        if ($ip && $community && $inst) {
15
 
                $snmp_value = snmp_get($ip, $community, swFCPortPhyState.".$inst");
 
15
                $snmp_value = snmp_get($ip, $community, $swFCPortPhyState.".$inst");
16
16
                switch ($snmp_value) {
17
17
                        case 1:
18
18
                                return 'down|No card present';