承接 aashley/nagios-livestatus-client 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

aashley/nagios-livestatus-client

最新稳定版本:v1.0.0

Composer 安装命令:

composer require aashley/nagios-livestatus-client

包简介

An OO client to talk to MK Livestatus

README 文档

README

This package implements a PHP OO client for talking to the MK Livestatus Nagios Event Broker.

This implementation is based on Lars Michelsen's LivestatusSlave.

Requirements

  • PHP 5.3.1+
  • Sockets enabled
  • JSON enabled

Usage

<?php

use Nagios\Livestatus\Client;

$options = array(
    'socketType' => 'tcp',
    'socketAddress' => '10.253.14.22',
    'socketPort' => '6557',
);

$client = new Client($options);

$response = $client
    ->get('hosts')
    ->column('host_name')
    ->column('state')
    ->execute();

foreach ($response as $host) {
    print $host[0] . ": " . $host[1] . "\n";
}

$response = $client
    ->get('hosts')
    ->column('host_name')
    ->column('state')
    ->executeAssoc();

foreach ($response as $host) {
    print $host['host_name'] . ": " . $host['state'] . "\n";
}

$client->command(
	array(
		'ACKNOWLEDGE_SVC_PROBLEM',
		'example.com',
		'some service', 2, 0, 1,
		'username', 'Example comment'
    )
);

Installation

In composer add a dependancy on aashley/nagios-livestatus-client

composer require aashley/nagios-livestatus-client

统计信息

  • 总下载量: 38.88k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 17
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 17
  • Watchers: 2
  • Forks: 8
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2013-11-19