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

Cannot find physical memory informations #994

Closed
maksoy74 opened this issue May 24, 2018 · 1 comment · Fixed by #1000
Closed

Cannot find physical memory informations #994

maksoy74 opened this issue May 24, 2018 · 1 comment · Fixed by #1000

Comments

@maksoy74
Copy link

maksoy74 commented May 24, 2018

https://github.com/centreon/centreon-plugins/blob/master/os/windows/snmp/mode/memory.pm#L148

The plugin is looking for string "Physical memory". Our servers return string "Physical RAM". icinga is unable to find the memory from the OID .1.3.6.1.2.1.25.2.3.1.3. Should we use "Physical RAM" instead? Does the edited part make sense programming wise?

$ snmpwalk -v2c -c servername .1.3.6.1.2.1.25.2.3.1.3
HOST-RESOURCES-MIB::hrStorageDescr.1 = STRING: Physical RAM
HOST-RESOURCES-MIB::hrStorageDescr.2 = STRING: Virtual Memory
HOST-RESOURCES-MIB::hrStorageDescr.3 = STRING: (A: ) Empty unit
HOST-RESOURCES-MIB::hrStorageDescr.4 = STRING: (C: ) SYSTEM
HOST-RESOURCES-MIB::hrStorageDescr.5 = STRING: (D: ) Empty unit
HOST-RESOURCES-MIB::hrStorageDescr.6 = STRING: (E: ) DATA
HOST-RESOURCES-MIB::hrStorageDescr.7 = STRING: (G: ) GG
HOST-RESOURCES-MIB::hrStorageDescr.8 = STRING: (X: ) New Volume

foreach my $key (keys %$result) {
    next if ($key !~ /\.([0-9]+)$/);
    my $oid = $1;
    #if ($result->{$key} =~ /^Physical memory$/i) {
    if (($result->{$key} =~ /^Physical memory$/i) or ($result->{$key} =~ /^Physical RAM$/i)) {
        $self->{physical_memory_id} = $oid;
    }
}

if (!defined($self->{physical_memory_id})) {
    $self->{output}->add_option_msg(short_msg => "Cannot find physical memory informations.");
    $self->{output}->option_exit();
}
@maksoy74 maksoy74 reopened this May 24, 2018
@maksoy74
Copy link
Author

Mistakenly closed it. So, re-opened it afterwards.

moix pushed a commit to moix/centreon-plugins that referenced this issue May 30, 2018
Sims24 added a commit to Sims24/centreon-plugins that referenced this issue Aug 16, 2018
* + perl 5.10 & el6 compatibility (centreon#949)

Fix centreon#945

* improve ntp mode empty ntp_hostname option (centreon#952)

* Sonicwall plugin (centreon#922)

* + add plugin for sonicwall

Ref centreon#914

* Correcting mode formerly named 'traffic' to 'interfaces' (centreon#895)

Closes centreon#895

* Enhance juniper ssg plugin (centreon#959)

Closes centreon#891

* enhance juniper ssg plugin
* fix key loop and hash init

* List storages (centreon#946)

* better response time & add posibility to know drive type

* fix f5 bigip failover warning thresholds (centreon#964)

Closes centreon#963

* add ssl opt harmonization (centreon#965)

- Closes centreon#961
- enhance el7 perl ssl compatibility
- add proxy option where missing

* fix f5 bigip trunks (centreon#966)

* add snmp_standard interfaces speed check (centreon#967)

* refactor riverbed steelhead (centreon#971)

* Closes centreon#970

* fix riverbed steelhead typo (centreon#972)

* fix riverbed steelhead typo

* prepare new release (centreon#973)

* enhance http lib to handle hidden basic authent (centreon#974)

* add basic option to mode using http lib (centreon#975)

* fix f5 bigip trunks div by 0 error (centreon#977)

Closes centreon#976

* enhance sonicwall plugin (centreon#978)

* fix hirschmann psu wrong oid (centreon#985)

* enhance quadstor vtltapeusage mode (centreon#987)

* enhance quadstor vtltapeusage mode

* init counter to 0

* [QOS] Cisco - Bug fix proposal (centreon#792)

* Fix: Calcul total And Child

* Fix: Put in 'variable' the name of the service-policy

* Fix: child detection

* prepare new release (centreon#998)

* Cannot find physical memory informations fix centreon#994 (centreon#1000)

* fix processcount perfdata output typos (centreon#1003)

* refacto netapp qtreeusage and add not-kbytes option (centreon#1029)

* fix qnap hardware thresholds overload (centreon#1028)

* add cloudfoundry plugin (wip) (centreon#1031)

* Filesystem Check (centreon#1036)

* enh linux local mountpoint mode (centreon#1043)

* enh selenium plugin (centreon#1039)

* add silverpeak plugin (centreon#1037)

* added silverpeak plugin and modes

* fix type, oid  name and timealarms

* fix cache file name

* starting peplink loadbalancer monitoring (centreon#1015)

* Create memory.pm

* Create cpu.pm

* Create plugin.pm

* fix peplink silverpeak plugins typos (centreon#1045)

* fix peplink plugin typos

* fix silverpeak plugin typos

* report idrac installed CPUs only (centreon#1017)

* Report installed CPUs only

using processorDeviceTable instead of processorDeviceStatusTable

* Report installed CPUs only, adapt var names

* add database-size mode (centreon#870)

* fix postgres databasesize mode (centreon#1046)

* fix postgres databasesize mode, missing empty selection (centreon#1047)

* fix arista memory output (centreon#1048)

* enh h3c hardware cache (centreon#1049)

* fix fortigate devicestatus help (centreon#1050)

* fix dell fastpath temperature (centreon#1051)

* fix hirschmann memory (centreon#1052)

* fix tomcat web sessions (centreon#1053)

* enh paloalto cluster output (centreon#1054)

* convert blocked processes counters (centreon#938)

* Convert database::mssql::mode::blockedprocesses to the counters library

* Using fetchrow_hashref instead of fetchall_arrayref according to @Sims24 recommendation

* Rationalizing a bit the output/long output/debug output

* enh mssql blockedprocesses (centreon#1055)

* adding new local plugin to os::hpux with two modes regarding disks (storage, inodes) (centreon#955)

* adding new 'inodes' mode to os::aix::local::plugin (centreon#956)

* enh aix local inodes (centreon#1056)

* enh aix local inodes, wrong parsing (centreon#1057)

* enh aix local storage inodes (centreon#1058)

* correct RADIUS help (centreon#1060)

* fix mssql blocked processes trim (centreon#1066)

* fix mssql transactions case (centreon#1067)

* adding Centos Upgrade Check (centreon#1034)

* enh linux local pending updates (centreon#1068)

* using a file a JSON source did not work (wrong file handler) (centreon#979)

* re-calculating virtual memory for windows machines (centreon#929)

* enh windows snmp swap (centreon#1069)

* fix kaspersky snmp deployment devision by zero (centreon#1070)

* enh windows snmp swap, help (centreon#1072)

* enh windows snmp swap, physical memory name (centreon#1073)

* fix netapp restapi volumeusage typo (centreon#1074)

* enh sql sqlstring for dual tables (centreon#1075)

* add slack plugin (centreon#1076)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant