NAME

Mojo::Zabbix::APP - The application module of Mojo-Zabbix .Using to get data from zabbix data include host,items, Triggers and warns and so on.

SYNOPSIS

    use Mojo::Zabbix::APP;

    my @myzinfo = <DATA>; ##(get zabbix info from __DATA__ )

# Define for debug and traceing processe infomaition。(打开调试和跟踪)

   my $DEBUG=0;
   my $TRACE=0;

#my @myzinfo = ('test1 http://test1/zabbix testuser pass'); # @可以定义为多行数据,格式按照这种,一个zabbix 服务地址一个

  for (@myzinfo) {
    next if /^#/;
    next if /^\s*$/;
    my ( $name, $url,$user, $pass ) = split;
    print "\n$name\n";
    my $z;

    eval { $z = initZ( $url,$user,$pss ); };

    if ($@) {

        print "Error $@!\n";
 
    } else {
       
      ## Print the version of zabbix api. 打印zabbix 版本 
       
        pVersion($z);
        
       ## Print all host lists。 获取所有的主机列表
        
       print  getAllhost($z);

       ## Print warning info of Triggers。打印取得的所有触发器告警信息
       pTriggers($z);
       
       ## Print the history data of given items, default for past 24 hours.
       ## 打印给定时间段的item历史数据,如果默认不给时间默认为过去24小时内的
       pHitems($z);

    }
 }

AUTHOR

ORANGE, <bollwarm at ijz.me>

BUGS

Please report any bugs or feature requests to bug-mojo-zabbix-app at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Mojo-Zabbix-APP. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT

You can find documentation for this module with the perldoc command.

    perldoc Mojo::Zabbix::APP

You can also look for information at:

ACKNOWLEDGEMENTS

LICENSE AND COPYRIGHT

Copyright 2016 ORANGE.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.