ZABBIX Forums  

Go Back   ZABBIX Forums > Zabbix Discussions and Feedback > Zabbix Cookbook

Reply
 
Thread Tools Display Modes
  #21  
Old 20-12-2013, 13:33
timon_is_timon timon_is_timon is offline
Senior Member
 
Join Date: Dec 2012
Posts: 116
Default

PS C:\fs\zagent> .\raid_discovery.ps1
info from server: "processed: 0; failed: 3; total: 3; seconds spent: 0.000077"
sent: 3; skipped: 0; total: 3
Reply With Quote
  #22  
Old 20-12-2013, 13:51
ArtemK ArtemK is offline
Senior Member
 
Join Date: May 2013
Posts: 229
Default

Looks like your server doesn't recognize data from your agent, do you have active agent configured on host?
  1. check, that you linked template to right host in zabbix
  2. check, that discovery trapper items have blank 'Allowed hosts' or correct ip of host
  3. check, that active agent is working on host (zabbix trapper uses it's config). Or, you can modify zabbix_sender command in script to manually define zabbix server and agent host name.
Reply With Quote
  #23  
Old 20-12-2013, 13:55
timon_is_timon timon_is_timon is offline
Senior Member
 
Join Date: Dec 2012
Posts: 116
Default

Quote:
Originally Posted by ArtemK View Post
Looks like your server doesn't recognize data from your agent, do you have active agent configured on host?
  1. check, that you linked template to right host in zabbix
  2. check, that discovery trapper items have blank 'Allowed hosts' or correct ip of host
  3. check, that active agent is working on host (zabbix trapper uses it's config). Or, you can modify zabbix_sender command in script to manually define zabbix server and agent host name.
1. yes, it linked
2. it's blank
3. Active agent is working i'm take logs from this host succesfully

Fragment of agent's log
292:20131220:184624.813 Starting Zabbix Agent [NS-hyper-V]. Zabbix 2.2.0 (revision 40147).
3292:20131220:184624.813 using configuration file: C:\zabbix_agentd.conf
1176:20131220:184624.829 agent #0 started [collector]
2748:20131220:184624.829 agent #1 started[listener #1]
2996:20131220:184624.829 agent #2 started[listener #2]
1328:20131220:184624.829 agent #3 started[listener #3]
4004:20131220:184624.829 agent #4 started [active checks #1]

Last edited by timon_is_timon; 20-12-2013 at 13:58.
Reply With Quote
  #24  
Old 20-12-2013, 14:02
ArtemK ArtemK is offline
Senior Member
 
Join Date: May 2013
Posts: 229
Default

Do you have any zabbix active agent types checks on this host, that successfully works? Looks like template is linked to wrong host, or active agent doesn't work (hostname mismatch in server and agent, server address in agent configuration?)
Reply With Quote
  #25  
Old 22-12-2013, 17:07
timon_is_timon timon_is_timon is offline
Senior Member
 
Join Date: Dec 2012
Posts: 116
Default

Quote:
Originally Posted by ArtemK View Post
Do you have any zabbix active agent types checks on this host, that successfully works? Looks like template is linked to wrong host, or active agent doesn't work (hostname mismatch in server and agent, server address in agent configuration?)
Yes i do. There iventlog[] propertly work on that server (sorry for my bad english)
Reply With Quote
  #26  
Old 23-12-2013, 04:18
timon_is_timon timon_is_timon is offline
Senior Member
 
Join Date: Dec 2012
Posts: 116
Default

discovery end cheks is worked. But values is not readble

For example:
C:\fs\zagent\intel_raid_check.ps1 : ?? 㤠???? ?஢???? ??㬥?? ??? ??ࠬ???
"enclosure_id". ??㬥?? 2989 ????? ?????⨬??? ????????? ???ᨬ????? ???祭
?? 1024. ?????? ??㬥??, ???祭?? ???ண? ????? 1024, ??᫥ 祣? ??????
?믮?????? ???????.
??ப?:0 ????:1
+ <<<<
+ CategoryInfo : InvalidData: ( [intel_raid_check.ps1], ParentC
ontainsErrorRecordException
+ FullyQualifiedErrorId : ParameterArgumentValidationError,intel_raid_chec
k.ps1


How i can repair that?
Reply With Quote
  #27  
Old 22-10-2014, 14:06
denser denser is offline
Junior Member
 
Join Date: Oct 2014
Posts: 22
Default

Why shedule script via windows? We can doit via agent... Just add Text Data Item
Code:
UserParameter=hw.raid.discover,powershell.exe -File "C:\FS\Zagent\raid\raid_discovery.ps1"
And run it as often as need No sheduler.

Also you can add trigger to ALARM on not contained test "failed: 0"
Reply With Quote
  #28  
Old 22-10-2014, 20:07
ArtemK ArtemK is offline
Senior Member
 
Join Date: May 2013
Posts: 229
Default

Quote:
Originally Posted by denser View Post
Why shedule script via windows? We can doit via agent... Just add Text Data Item
Because quite often I got script running more than 30 seconds and discovery item in not supported state because of this

And I didn't understood your note about trigger and alarm
Reply With Quote
  #29  
Old 23-10-2014, 06:24
denser denser is offline
Junior Member
 
Join Date: Oct 2014
Posts: 22
Default

I mean if Discovery returns string without falure:0 (ie falure: 1) - i can alarm about it. It means something goes wron on discovery stage.

Code:
            <items>
                <item>
                    <name>Discovery initiate</name>
                    <type>7</type>
                    <snmp_community/>
                    <multiplier>0</multiplier>
                    <snmp_oid/>
                    <key>hw.raid.discover</key>
                    <delay>86400</delay>
                    <history>360</history>
                    <trends>365</trends>
                    <status>0</status>
                    <value_type>4</value_type>
                    <allowed_hosts/>
                    <units/>
                    <delta>0</delta>
                    <snmpv3_contextname/>
                    <snmpv3_securityname/>
                    <snmpv3_securitylevel>0</snmpv3_securitylevel>
                    <snmpv3_authprotocol>0</snmpv3_authprotocol>
                    <snmpv3_authpassphrase/>
                    <snmpv3_privprotocol>0</snmpv3_privprotocol>
                    <snmpv3_privpassphrase/>
                    <formula>1</formula>
                    <delay_flex/>
                    <params/>
                    <ipmi_sensor/>
                    <data_type>0</data_type>
                    <authtype>0</authtype>
                    <username/>
                    <password/>
                    <publickey/>
                    <privatekey/>
                    <port/>
                    <description/>
                    <inventory_link>0</inventory_link>
                    <applications>
                        <application>
                            <name>RAID discover</name>
                        </application>
                    </applications>
                    <valuemap/>
                    <logtimefmt/>
                </item>
            </items>
I start using your template and tune discovery every day via Item. So 3 days goes good. Zabbix 2.2.6

Last edited by denser; 23-10-2014 at 11:14.
Reply With Quote
  #30  
Old 23-10-2014, 18:12
ArtemK ArtemK is offline
Senior Member
 
Join Date: May 2013
Posts: 229
Default

Still unclear. Discovery should return JSON, what string you are talking about? BTW, there are should be updated scripts on github

Last edited by ArtemK; 23-10-2014 at 18:14.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 09:13.