Thanks David, the NAS is supported by the centreon-plugin. I have only one question left: How do you check for warning/critical states. The plugin output is in my case "OK: All 7 components are ok [2/2 disk, 2/2 fan, 1/1 psu, 1/1 raid, 1/1 system]."
I have tried the following, but ist didn't worked: apply Service "Synology Component Status" { import "generic-service" check_command = "centreon-snmp-synology-components" vars.snmp_eregi = "OK: Alil" assign where host.vars.os == "Synology" } Regards Zafer On 05.09.2018 14:19, David Jones wrote: > Check out the Centreon plugin that probably already supports the NAS you > are trying to check: > > https://github.com/centreon/centreon-plugins > > > > ------------------------------------------------------------------------ > *From:* icinga-users <icinga-users-boun...@lists.icinga.org> on behalf > of Assaf Flatto <ici...@flatto.net> > *Sent:* Wednesday, September 5, 2018 6:58 AM > *To:* Icinga User's Corner > *Subject:* Re: [icinga-users] Query SNMP with iteration > > Hello > > I believe you could do that with a for loop in the service creation > > https://www.icinga.com/docs/icinga2/latest/doc/17-language-reference/#for-loops > > > Regards > > On 05/09/18 14:10, IT wrote: >> Hello, >> >> i want to write a service to query the disk-status of a NAS. The OIDs >> have the following scheme: >> >> 1.3.......2.2.0 >> 1.3.......2.2.1 >> 1.3.......2.2.2 >> 1.3.......2.3.0 >> >> The last index addresses the individual disks{0-2}. The forelast index >> addresses the status{2}. In the example we have got 3 disks. How can i >> create a service, which adds for each disk a service and queries for the >> number of disks? >> e.g.: >> * A 3-disk-NAS will get automatically 3 disk-checks >> * A 6-disk-NAS will get automatically 6 disk-checks >> >> >> Yours sincerely >> >> Zafer >> >> >> _______________________________________________ >> icinga-users mailing list >> icinga-users@lists.icinga.org <mailto:icinga-users@lists.icinga.org> >> https://lists.icinga.org/mailman/listinfo/icinga-users > > > > > _______________________________________________ > icinga-users mailing list > icinga-users@lists.icinga.org > https://lists.icinga.org/mailman/listinfo/icinga-users >
pEpkey.asc
Description: application/pgp-keys
_______________________________________________ icinga-users mailing list icinga-users@lists.icinga.org https://lists.icinga.org/mailman/listinfo/icinga-users