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

Windows 2003 Server - Traffic Global - "UNKNOWN: Can't construct cache..." #533

Closed
pierrick-openIT opened this issue Nov 7, 2016 · 7 comments
Labels

Comments

@pierrick-openIT
Copy link

Hy,
there is a bug when i try to monitore network trafic on a windows2003 server.

Centreon plugin check command:
/usr/lib/nagios/plugins/centreon_plugins.pl --plugin=os::windows::snmp::plugin --mode=interfaces --hostname=XXX.XXX.XXX.XXX --snmp-version='2c' --snmp-community='CENTREON' --interface='.*' --name --add-status --add-traffic --critical-status='' --warning-in-traffic='80' --critical-in-traffic='90' --warning-out-traffic='80' --critical-out-traffic='90' --verbose

Output is :
UNKNOWN: Can't construct cache...

When i make a snmpwalk directly on it, it,s work :
snmpwalk -v 2c -c CENTREON XXX.XXX.XXX.XXX ifDescr

Others checks works well (CPU,Disk,Memory,Swap....)

Thanks

@Sims24 Sims24 added the question label Nov 7, 2016
@Sims24
Copy link
Contributor

Sims24 commented Nov 7, 2016

Hello @pierrick-openIT

Please use --oid-filter option e.g --oid-filter ifDesc --oid-display ifDesc . That should do the tricks.

Regards

@pierrick-openIT
Copy link
Author

pierrick-openIT commented Nov 7, 2016

hello @Sims24 ,
same result with this option.

`/usr/lib/nagios/plugins/centreon_plugins.pl --plugin=os::windows::snmp::plugin --mode=interfaces --hostname=XXX.XXX.XXX.XXX --snmp-version='2c' --snmp-community='CENTREON' --interface='.*' --name --add-status --add-traffic --critical-status='' --warning-in-traffic='80' --critical-in-traffic='90' --warning-out-traffic='80' --critical-out-traffic='90' --verbose --oid-display ifDesc

UNKNOWN: Can't construct cache...
`

Thanks for your help.

@Sims24
Copy link
Contributor

Sims24 commented Nov 7, 2016

Hello @pierrick-openIT

Try
/usr/lib/nagios/plugins/centreon_plugins.pl --plugin=os::windows::snmp::plugin --mode=interfaces --hostname=162.23.223.14 --snmp-version='2c' --snmp-community='CENTREON' --interface='.*' --name --add-status --add-traffic --critical-status='' --warning-in-traffic='80' --critical-in-traffic='90' --warning-out-traffic='80' --critical-out-traffic='90' --verbose --oid-display ifDesc --oid-filter ifDesc

Is it better ?

@pierrick-openIT
Copy link
Author

pierrick-openIT commented Nov 7, 2016

Yes, is it :

./centreon_plugins.pl --plugin=os::windows::snmp::plugin --mode=interfaces --hostname=162.23.223.14 --snmp-version='2c' --snmp-community='CENTREON' --interface='.*' --name --add-status --add-traffic --critical-status='' --warning-in-traffic='80' --critical-in-traffic='90' --warning-out-traffic='80' --critical-out-traffic='90' --verbose --oid-display ifDesc --oid-filter ifDesc

OK: All interfaces are ok | 'traffic_in_vmxnet3 Ethernet Adapter'=25941.33b/s;0:1128052326;0:1269058867;0;1410065408 'traffic_out_vmxnet3 Ethernet Adapter'=21765.33b/s;0:1128052326;0:1269058867;0;1410065408 'traffic_in_vmxnet3 Ethernet Adapter #2'=10760.00b/s;0:1128052326;0:1269058867;0;1410065408
Interface 'MS TCP Loopback interface' Status : up (admin: up), Traffic In : skipped, Traffic Out : skipped
Interface 'vmxnet3 Ethernet Adapter' Status : up (admin: up), Traffic In : 25.94Kb/s (0.00%), Traffic Out : 21.77Kb/s (0.00%)
Interface 'vmxnet3 Ethernet Adapter #2' Status : up (admin: up), Traffic In : 10.76Kb/s (0.00%), Traffic Out : skipped

It's a bug or something else ?

@Sims24
Copy link
Contributor

Sims24 commented Nov 7, 2016

No it's not.

Depending on hardware/seller, some will fill ifName, ifDesc and ifAlias oids. Some will fill only some as Windows does.

Default on the plugin is ifName, as it's not available on your windows plugin can't build cache, you have to specify which oid you want to display.

Regards,

@Sims24 Sims24 closed this as completed Nov 7, 2016
@pierrick-openIT
Copy link
Author

Ok thanks,
I post a configuration example .. if it helps.
centreon plugin server2003

@Sims24
Copy link
Contributor

Sims24 commented Nov 8, 2016

Thanks, it will probably!

Tpo76 added a commit to Tpo76/centreon-plugins that referenced this issue Jul 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants