Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[plugin] [raisecom] Add plugin to check raisecom switchs #435

Closed
Sims24 opened this issue Jun 27, 2016 · 28 comments
Closed

[plugin] [raisecom] Add plugin to check raisecom switchs #435

Sims24 opened this issue Jun 27, 2016 · 28 comments
Assignees
Labels
enhancement Enhance existing plugin

Comments

@Sims24
Copy link
Contributor

Sims24 commented Jun 27, 2016

As a side note from Maksimatev, would be nice to have a plugin for raisecom. First basic things like :

  • cpu
  • memory
  • traffic

Thx

@Sims24 Sims24 added enhancement Enhance existing plugin labels Jun 27, 2016
@maksimatveev
Copy link

@Sims24 Hi. I've already written a plugin for the CPU, traffic checking via the standard mode. RAM almost completed the check, there was a problem with the proper size determination. if there is an opportunity to help with its finalization I will be glad.

@maksimatveev
Copy link

maksimatveev commented Jul 6, 2016

@Sims24 Current status can be viewed here

@maksimatveev
Copy link

@garnier-quentin garnier-quentin self-assigned this Jul 9, 2016
@garnier-quentin
Copy link
Contributor

Can we give us full snmpwalk ? The following table should be interesting also:
raisecomCPUUtilizationTable

There is also: raisecomTemperature and raisecomVoltTable.

@maksimatveev
Copy link

maksimatveev commented Jul 10, 2016

@garnier-quentin Hello, Quentin!
All necessary information (output snmpwalk and MIBs) in the archive.
raisecom-centreon.zip

@Sims24
Copy link
Contributor Author

Sims24 commented Jul 11, 2016

@maksimatveev , Quentin will do the job.

After looking to the memory mode on your fork, think that you need to multiply value by 1024 before passing it to change _bytes routine. After this you should find the intended result ;)

Thx

@maksimatveev
Copy link

@Sims24 Thank you, Simon, for the hint.
Be sure to correct your remark =)

@maksimatveev
Copy link

@Sims24 It turned out, not so much as you have written. But the sense I understand =)
./centreon_plugins.pl --plugin=network::raisecom::snmp::plugin --mode=memory --hostname=172.27.252.5 --snmp-community=public --snmp-version=2
OK: Memory Total: 53.19 MB Used: 22.02 MB (41.40%) Free: 31.17 MB (58.60%) | 'used'=23087624B;;;0;55769168

@maksimatveev
Copy link

@Sims24 Changed OIDs, now taken from raisecomCPUUtilizationTable:
my $oid_raisecomCPUUtilization1sec = '.1.3.6.1.4.1.8886.1.1.1.5.1.1.1.3.1';
#CPU busy percentage in the last 1 second period.
my $oid_raisecomCPUUtilization1min = '.1.3.6.1.4.1.8886.1.1.1.5.1.1.1.3.3';
#CPU busy percentage in the last 1 minute period.
my $oid_raisecomCPUUtilization10min = '.1.3.6.1.4.1.8886.1.1.1.5.1.1.1.3.4';
#CPU busy percentage in the last 10 minute period.

./centreon_plugins.pl --plugin=network::raisecom::snmp::plugin --mode=cpu --hostname=172.27.252.5 --snmp-community=public --snmp-version=2 --warning=10,10,10 --critical=15,15,15
CRITICAL: CPU Usage: 29.00% (1sec), 28.00% (1min), 30.00% (10min) | 'cpu_1s'=29%;0:10;0:15;0;100 'cpu_1m'=28%;0:10;0:15;0;100 'cpu_10m'=30%;0:10;0:15;0;100

@Sims24
Copy link
Contributor Author

Sims24 commented Jul 21, 2016

Hi @maksimatveev,

I'll have an hour to look this tomorrow, we'll probably end up with this dev and I'll let you do the PR to Quentin. I'll send you an email with potential change.

;)

@Sims24 Sims24 assigned Sims24 and unassigned Sims24 Jul 21, 2016
@Sims24
Copy link
Contributor Author

Sims24 commented Jul 22, 2016

Hi @maksimatveev ,

Could you provide a walk resulting from this command please

snmpwalk -Cc -v2c -c SNMPCOMMUNITY -ObentU X.X.X.X .1 > raisecom.snmpwalk

You should replace SNMPCOMMUNITY by your community string and X.X.X.X by the raisecom ip address and then send me the raisecom.snmpwalk file.

This will be easier for us to simulate a raisecom switch ;)

Thanks,

I send you info by the end of the day

@maksimatveev
Copy link

@Sims24 Simon, sent you an email.

@Sims24
Copy link
Contributor Author

Sims24 commented Jul 24, 2016

@maksimatveev , thanks for the walk.

Just pushed cpu and memory mode here : https://github.com/Sims24/centreon-plugins/tree/raisecom

but concerning hardware (volt, temp, and fan), looks like value doesn't exist, are you aware of such components on your switch actually ?

@maksimatveev
Copy link

maksimatveev commented Jul 25, 2016

@Sims24 temperature and voltage precisely is in the output snmpwalk. and about the fans - can not be set to the switch model.
Raisecom#show fan-monitor information
fan current speed level: 0
fan due speed: 0(+/-10%)
FanNum Current speed


@maksimatveev
Copy link

We managed to find a model with the necessary parameters:
Fans

  1. CLI:
Raisecom#show fan-monitor information 
Fan Number: 4
Current Monitor Mode: auto
Enforce Fan Speed Level: 4 
SpdLevelIndex   FanDueSpeed(r/min)  TemperScale         
--------------------------------------------------------
1               0                   0                   
2               7620                35                  
3               8810                45                  
4               8830                55
  1. snmpwalk:
RAISECOM-FANMONITOR-MIB::raisecomFanMonitorMode.0 = INTEGER: auto(2)
RAISECOM-FANMONITOR-MIB::raisecomFanMonitorSpdLevel.0 = Gauge32: 4
RAISECOM-FANMONITOR-MIB::raisecomFanMonitorNumber.0 = Gauge32: 4
RAISECOM-FANMONITOR-MIB::raisecomFanMonitorLevlNumber.0 = Gauge32: 4
RAISECOM-FANMONITOR-MIB::raisecomFanCardState.0 = INTEGER: all-up(2)
RAISECOM-FANMONITOR-MIB::raisecomFanCardSerialNumber.0 = ""
RAISECOM-FANMONITOR-MIB::raisecomFanMonitorTrapSendEnable.0 = INTEGER: disable(0)
RAISECOM-FANMONITOR-MIB::raisecomFanSpeedValue.1 = Gauge32: 0
RAISECOM-FANMONITOR-MIB::raisecomFanSpeedValue.2 = Gauge32: 0
RAISECOM-FANMONITOR-MIB::raisecomFanSpeedValue.3 = Gauge32: 0
RAISECOM-FANMONITOR-MIB::raisecomFanSpeedValue.4 = Gauge32: 0
RAISECOM-FANMONITOR-MIB::raisecomFanWorkState.1 = INTEGER: normal(1)
RAISECOM-FANMONITOR-MIB::raisecomFanWorkState.2 = INTEGER: normal(1)
RAISECOM-FANMONITOR-MIB::raisecomFanWorkState.3 = INTEGER: normal(1)
RAISECOM-FANMONITOR-MIB::raisecomFanWorkState.4 = INTEGER: normal(1)
RAISECOM-FANMONITOR-MIB::raisecomFanSpeedDueValue.1 = Gauge32: 0
RAISECOM-FANMONITOR-MIB::raisecomFanSpeedDueValue.2 = Gauge32: 7620
RAISECOM-FANMONITOR-MIB::raisecomFanSpeedDueValue.3 = Gauge32: 8810
RAISECOM-FANMONITOR-MIB::raisecomFanSpeedDueValue.4 = Gauge32: 8830
RAISECOM-FANMONITOR-MIB::raisecomFanSpeedTemperatureScale.1 = Gauge32: 0
RAISECOM-FANMONITOR-MIB::raisecomFanSpeedTemperatureScale.2 = Gauge32: 35
RAISECOM-FANMONITOR-MIB::raisecomFanSpeedTemperatureScale.3 = Gauge32: 45
RAISECOM-FANMONITOR-MIB::raisecomFanSpeedTemperatureScale.4 = Gauge32: 55

Temperature and Volts

  1. CLI:
Raisecom#show environment 
Temperature:
    High alarm times:       0
    Low  alarm times:       0
    Units        Celsius    Fahrenheit
    -----------------------------------
    Current       31        87
    Min           24        75
    Max           36        96
Voltage:
Reference    Current   Min      Max     High Alarms    Low Alarms
--------------------------------------------------------------------
3300mV       3300      3300     3317      0              0
2500mV       2487      2487     2487      0              0
1200mV       1172      1172     1172      0              0
1000mV       1013      1013     1013      0              0
  1. snmpwalk:
RAISECOM-SYSTEM-MIB::raisecomTemperatureValue.0 = INTEGER: 31 Celsius 
RAISECOM-SYSTEM-MIB::raisecomTemperatureMin.0 = INTEGER: 24 Celsius 
RAISECOM-SYSTEM-MIB::raisecomTemperatureMax.0 = INTEGER: 36 Celsius 
RAISECOM-SYSTEM-MIB::raisecomTemperatureTrapEnable.0 = INTEGER: enable(1)
RAISECOM-SYSTEM-MIB::raisecomTemperatureThresholdLow.0 = INTEGER: 20 Celsius 
RAISECOM-SYSTEM-MIB::raisecomTemperatureThresholdHigh.0 = INTEGER: 60 Celsius 
RAISECOM-SYSTEM-MIB::raisecomTemperatureTrapTimes.0 = INTEGER: 0
RAISECOM-SYSTEM-MIB::raisecomTemperatureHighTimes.0 = INTEGER: 0
RAISECOM-SYSTEM-MIB::raisecomTemperatureLowTimes.0 = INTEGER: 0
RAISECOM-SYSTEM-MIB::raisecomVoltIndex.1 = INTEGER: 1
RAISECOM-SYSTEM-MIB::raisecomVoltIndex.2 = INTEGER: 2
RAISECOM-SYSTEM-MIB::raisecomVoltIndex.3 = INTEGER: 3
RAISECOM-SYSTEM-MIB::raisecomVoltIndex.4 = INTEGER: 4
RAISECOM-SYSTEM-MIB::raisecomVoltReference.1 = INTEGER: 3300 mV
RAISECOM-SYSTEM-MIB::raisecomVoltReference.2 = INTEGER: 2500 mV
RAISECOM-SYSTEM-MIB::raisecomVoltReference.3 = INTEGER: 1200 mV
RAISECOM-SYSTEM-MIB::raisecomVoltReference.4 = INTEGER: 1000 mV
RAISECOM-SYSTEM-MIB::raisecomVoltValue.1 = INTEGER: 3300 mV
RAISECOM-SYSTEM-MIB::raisecomVoltValue.2 = INTEGER: 2487 mV
RAISECOM-SYSTEM-MIB::raisecomVoltValue.3 = INTEGER: 1172 mV
RAISECOM-SYSTEM-MIB::raisecomVoltValue.4 = INTEGER: 1013 mV
RAISECOM-SYSTEM-MIB::raisecomVoltMin.1 = INTEGER: 3300 mV
RAISECOM-SYSTEM-MIB::raisecomVoltMin.2 = INTEGER: 2487 mV
RAISECOM-SYSTEM-MIB::raisecomVoltMin.3 = INTEGER: 1172 mV
RAISECOM-SYSTEM-MIB::raisecomVoltMin.4 = INTEGER: 1013 mV
RAISECOM-SYSTEM-MIB::raisecomVoltMax.1 = INTEGER: 3317 mV
RAISECOM-SYSTEM-MIB::raisecomVoltMax.2 = INTEGER: 2487 mV
RAISECOM-SYSTEM-MIB::raisecomVoltMax.3 = INTEGER: 1172 mV
RAISECOM-SYSTEM-MIB::raisecomVoltMax.4 = INTEGER: 1013 mV
RAISECOM-SYSTEM-MIB::raisecomVoltTrapEnable.1 = INTEGER: enable(1)
RAISECOM-SYSTEM-MIB::raisecomVoltTrapEnable.2 = INTEGER: enable(1)
RAISECOM-SYSTEM-MIB::raisecomVoltTrapEnable.3 = INTEGER: enable(1)
RAISECOM-SYSTEM-MIB::raisecomVoltTrapEnable.4 = INTEGER: enable(1)
RAISECOM-SYSTEM-MIB::raisecomVoltThresholdLow.1 = INTEGER: 3150 mV
RAISECOM-SYSTEM-MIB::raisecomVoltThresholdLow.2 = INTEGER: 0 mV
RAISECOM-SYSTEM-MIB::raisecomVoltThresholdLow.3 = INTEGER: 0 mV
RAISECOM-SYSTEM-MIB::raisecomVoltThresholdLow.4 = INTEGER: 0 mV
RAISECOM-SYSTEM-MIB::raisecomVoltThresholdHigh.1 = INTEGER: 3450 mV
RAISECOM-SYSTEM-MIB::raisecomVoltThresholdHigh.2 = INTEGER: 0 mV
RAISECOM-SYSTEM-MIB::raisecomVoltThresholdHigh.3 = INTEGER: 0 mV
RAISECOM-SYSTEM-MIB::raisecomVoltThresholdHigh.4 = INTEGER: 0 mV
RAISECOM-SYSTEM-MIB::raisecomVoltTrapTimes.1 = INTEGER: 0
RAISECOM-SYSTEM-MIB::raisecomVoltTrapTimes.2 = INTEGER: 0
RAISECOM-SYSTEM-MIB::raisecomVoltTrapTimes.3 = INTEGER: 0
RAISECOM-SYSTEM-MIB::raisecomVoltTrapTimes.4 = INTEGER: 0
RAISECOM-SYSTEM-MIB::raisecomVoltHighTimes.1 = INTEGER: 0
RAISECOM-SYSTEM-MIB::raisecomVoltHighTimes.2 = INTEGER: 0
RAISECOM-SYSTEM-MIB::raisecomVoltHighTimes.3 = INTEGER: 0
RAISECOM-SYSTEM-MIB::raisecomVoltHighTimes.4 = INTEGER: 0
RAISECOM-SYSTEM-MIB::raisecomVoltLowTimes.1 = INTEGER: 0
RAISECOM-SYSTEM-MIB::raisecomVoltLowTimes.2 = INTEGER: 0
RAISECOM-SYSTEM-MIB::raisecomVoltLowTimes.3 = INTEGER: 0
RAISECOM-SYSTEM-MIB::raisecomVoltLowTimes.4 = INTEGER: 0

@Sims24
Copy link
Contributor Author

Sims24 commented Dec 19, 2016

Hi @maksimatveev

Sorry for the delay.
Thanks for all informations, could you provide the snmpwalk of theses tables by mail on the equipment above with following options to snmpwalk please :

snmpwalk -Cc -v2c -c SNMPCOMMUNITY -ObentU X.X.X.X

Regards,
Simon

@maksimatveev
Copy link

@Sims24 okay, I send it as soon as possible. Thank you.

@maksimatveev
Copy link

@Sims24 For several of the most popular models of switches:
Raisecom_ISCOM2008.txt
Raisecom_ISCOM2110A-MA.txt
Raisecom_ISCOM2924GF.txt

@maksimatveev
Copy link

@maksimatveev
Copy link

@garnier-quentin Thanks Quentin, can I check?

@garnier-quentin
Copy link
Contributor

Yes. Check it of course ;)

@maksimatveev
Copy link

@garnier-quentin First of all, thank you for the job well done by you! I'm just learning how to write plugins and you inspire me =)
Can I ask you to make a few edits?
OK: CPU Usage 1 seconde : 3.00 %, 1 minute : 3.00 %, 10 minutes : 3.00 %
There probably should be "1 second".

Can be reduced output to this:
OK: CPU Usage 1 sec : 3.00 %, 1 min : 3.00 %, 10 min : 3.00 % - The shorter output of the command is more accurate and laconic.

@maksimatveev
Copy link

Can be unified as in other plug-ins, example Cisco CPU Load:
OK: CPU '1': 24.00% (5sec), 24.00% (1min), 24.00% (5min)

garnier-quentin pushed a commit that referenced this issue Aug 21, 2017
@garnier-quentin
Copy link
Contributor

Could you test it ? I have done the change.

@maksimatveev
Copy link

@garnier-quentin Thank you, Quentin! All right!

@maksimatveev
Copy link

@garnier-quentin
Copy link
Contributor

There are all :)

@maksimatveev
Copy link

@garnier-quentin sorry, did not notice =)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Enhance existing plugin
Projects
None yet
Development

No branches or pull requests

3 participants