kastesh / zabbix-plugins

plugins and templates for zabbix
2 stars 3 forks source link

Importing 3ware template to zabbix3.0 #1

Open kr1sti4n opened 8 years ago

kr1sti4n commented 8 years ago

Hi,

When I try to import your template for 3ware raid monitoring to zabbix 3.0 I get following error:


Import failed Details

Created: Application "LD" on "Template - 3Ware Controller".
Created: Application "PD" on "Template - 3Ware Controller".
Created: Application "RAID Controller" on "Template - 3Ware Controller".
Created: Discovery rule "3ware ad discovery" on "Template - 3Ware Controller".
Created: Discovery rule "3ware ld discovery" on "Template - 3Ware Controller".
Created: Discovery rule "3ware pd discovery" on "Template - 3Ware Controller".
Created: Discovery rule "3ware pd to ld discovery" on "Template - 3Ware Controller".
Cannot find value map "3ware BBU statuses" used for item prototype "3ware $3: Battery State" of discovery rule "3ware ad discovery" on "Template - 3Ware Controller".

Any hint why this happens ?

Thank you.

kastesh commented 8 years ago

Hi,

There was no way to create value mapping from the import (may be something change now, but I don't test). You need to create next value mapping before import process: https://www.zabbix.com/documentation/2.4/manual/config/items/mapping

There is next value mappings for 3ware templates: 3ware BBU statuses

1 Not Present 2 Testing 3 Charging 4 OK 5 WeakBat 6 Failed 7 Error 8 Fault 9 Unknown

3ware opts statuses

1 OK 2 HIGH 3 LOW 4 TOO-HIGH 5 TOO-LOW 6 UNKNOWN

3ware statuses

1 OK 2 VERIFYING 3 INITIALIZING 4 INIT-PAUSED 5 REBUILDING 6 REBUILD-PAUSED 7 DEGRADED 8 MIGRATING 9 MIGRATE-PAUSED 10 RECOVERY 11 INOPERABLE 12 UNKNOWN

2016-03-02 14:57 GMT+02:00 kr1sti4n notifications@github.com:

Hi,

When I try to import your template for 3ware raid monitoring to zabbix 3.0

I get following error:

Import failed Details

Created: Application "LD" on "Template - 3Ware Controller". Created: Application "PD" on "Template - 3Ware Controller". Created: Application "RAID Controller" on "Template - 3Ware Controller". Created: Discovery rule "3ware ad discovery" on "Template - 3Ware Controller". Created: Discovery rule "3ware ld discovery" on "Template - 3Ware Controller". Created: Discovery rule "3ware pd discovery" on "Template - 3Ware Controller". Created: Discovery rule "3ware pd to ld discovery" on "Template - 3Ware Controller". Cannot find value map "3ware BBU statuses" used for item prototype "3ware $3: Battery State" of discovery rule "3ware ad discovery" on "Template - 3Ware Controller".


Any hint why this happens ?

Thank you.

— Reply to this email directly or view it on GitHub https://github.com/kastesh/zabbix-plugins/issues/1.

C уважением, Шемаева Екатерина Константиновна

kr1sti4n commented 8 years ago

Hi,

We created those now but now it fails on the following


Created: Application "LD" on "Template - 3Ware Controller". Created: Application "PD" on "Template - 3Ware Controller". Created: Application "RAID Controller" on "Template - 3Ware Controller". Created: Discovery rule "3ware ad discovery" on "Template - 3Ware Controller". Created: Discovery rule "3ware ld discovery" on "Template - 3Ware Controller". Created: Discovery rule "3ware pd discovery" on "Template - 3Ware Controller". Created: Discovery rule "3ware pd to ld discovery" on "Template - 3Ware Controller". Cannot find value map "megacli - battery state" used for item prototype "3ware $3: Battery Temperature" of discovery rule "3ware ad discovery" on "Template - 3Ware Controller"


Any hint for this one ?

kastesh commented 8 years ago

Megacli template:

megacli - battery state 0 "Not Optimal" 1 "Optimal"

megacli - cache policy 1 "WriteBack" 2 "WriteThrough" 255 "Unknown"

megacli - ld state 0 "Not Optimal" 1 "Optimal"

PD Interface Type 1 SAS 2 SATA 255 Unknown

RAID - status 0 Error 1 OK

Thank you for feedback. It seems like there is improvement in the Zabbix 3.0 version: https://support.zabbix.com/browse/ZBXNEXT-1679. Can you upload changes for templates with value mapping? (If you have time and right version of zabbix server)

2016-03-02 15:28 GMT+02:00 kr1sti4n notifications@github.com:

Hi,

We created those now but now it fails on the following

Created: Application "LD" on "Template - 3Ware Controller". Created: Application "PD" on "Template - 3Ware Controller". Created: Application "RAID Controller" on "Template - 3Ware Controller". Created: Discovery rule "3ware ad discovery" on "Template - 3Ware Controller". Created: Discovery rule "3ware ld discovery" on "Template - 3Ware Controller". Created: Discovery rule "3ware pd discovery" on "Template - 3Ware Controller". Created: Discovery rule "3ware pd to ld discovery" on "Template - 3Ware Controller". Cannot find value map "megacli - battery state" used for item prototype "3ware $3: Battery Temperature" of discovery rule "3ware ad discovery" on

"Template - 3Ware Controller"

Any hint for this one ?

— Reply to this email directly or view it on GitHub https://github.com/kastesh/zabbix-plugins/issues/1#issuecomment-191238073 .

C уважением, Шемаева Екатерина Константиновна

kr1sti4n commented 8 years ago

We are just missing this two now Storage Device Type Storage Device Status

After that we might try exporting template out from zabbix3

kastesh commented 8 years ago

Storage Device Type 1 SAS 2 SSD 255 Unknown

Storage Device Status 1 OK 0 Error

kr1sti4n commented 8 years ago

Hi,

Here are exported values from zabbix3. Template is same as your, nothing changed in it from what I see so importing this values before template should prevent errors during template import.

kr1sti4n commented 8 years ago

Seems I can't attach the zip file so here is the xml code from the export.

`<?xml version="1.0" encoding="UTF-8"?>

3.0 2016-03-03T13:03:48Z 3ware BBU statuses 1 Not Present 2 Testing 3 Charging 4 OK 5 WeakBat 6 Failed 7 Error 8 Fault 9 Unknown 3ware opts statuses 1 OK 2 HIGH 3 LOW 4 TOO-HIGH 5 TOO-LOW 6 UNKNOWN 3ware statuses 1 OK 2 VERIFYING 3 INITIALIZING 4 INIT-PAUSED 5 REBUILDING 6 REBUILD-PAUSED 7 DEGRADED 8 MIGRATING 9 MIGRATE-PAUSED 10 RECOVERY 11 INOPERABLE 12 UNKNOWN megacli - battery state 0 Not Optimal 1 Optimal megacli - cache policy 1 WriteBack 2 WriteThrough 255 Unknown megacli - ld state 0 Not Optimal 1 Optimal PD Interface Type 1 SAS 2 SATA 255 Unknown RAID - status 1 OK Storage Device Status 0 Error 1 OK Storage Device Type 1 SAS 2 SSD 255 Unknown

`

kr1sti4n commented 8 years ago

One more favor, could you give us values for the adaptecraid.status.sh e.g. Cannot find value map "RAID - level" used for item "Adaptec RAID: Logical Device Level" on "Template - RAID - Adaptec" And any other that is related to the adaptec?

kastesh commented 8 years ago

And any other that is related to the adaptec?

RAID - status 0 Optimal 1 Failed 2 Degradated 255 Unknown

RAID - cache status 0 Disabled 1 Enabled

RAID - level 0 RAID0 1 RAID1 5 RAID5 6 RAID6 10 RAID10 50 RAID50

RAID - device status 0 Inline 1 Offline

kr1sti4n commented 8 years ago

Hi,

We had to do one correction in the 3ware value maps. One value was marked with wrong number at the battery status. Here is the corrected value map -> http://pastebin.com/S0LzmZZD Also here is value map for Adaptec -> http://pastebin.com/NnVhXCLx

Also could you send us value maps for the exim monitoring if there are any ? p.s. Its seems you are missing script for apache monitoring in the scripts directory -> apache2_stat.sh

kastesh commented 8 years ago

Hi,

Thank you for helping :)

I have uploaded value mappings templates for: megacli, adaptec, 3ware, mdadm and disk. Fix mistake in the 3ware template, there was usage of "megacli - battery state" value mappings in "Battery Temperature". I have found apache2 scripts, it is included in the last commit.

Exim template uses default value mappings "Service State", it can be found in default installation: 0 - Down 1 - Up

damirch commented 8 years ago

Hello,

In disk.conf there is user parameter: UserParameter=discovery.disk.name,/var/lib/zabbix/local/scripts/system.discovery.sh disks

Where can I find system.discovery.sh script ?

Thanks

kr1sti4n commented 8 years ago

Hi,

Any info regarding discovery.sh script ?

kastesh commented 8 years ago

Hi,

I'm very sorry. Working tasks have been captured my attention completely. I am going to find it on this weekend.

2016-03-31 9:15 GMT+02:00 kr1sti4n notifications@github.com:

Hi,

Any info regarding discovery.sh script ?

— You are receiving this because you commented. Reply to this email directly or view it on GitHub https://github.com/kastesh/zabbix-plugins/issues/1#issuecomment-203792467

C уважением, Шемаева Екатерина Константиновна

kastesh commented 8 years ago

Hi,

I've added discovery function to disk.sh script and updated disks.conf. However I need to warn you, disk's items use "Zabbix trapper" type, because it takes time for iostat to collect a information ($WAITTIME variable in the script). You need to add next command in cron on your server. It collect disk data and send it to zabbix server or proxy. /var/lib/zabbix/local/scripts/disk.sh -t status