markri/nagparser 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

markri/nagparser

最新稳定版本:0.1

Composer 安装命令:

composer require markri/nagparser

包简介

Nagios configuration parser

README 文档

README

Nagios Config Parser a simple parser written in PHP that parses Nagios config files (.cfg) into PHP objects, All definitions available in Nagios Nagios doc are read into PHP objects with getters for all options (easiness of autocompletion).

Currently it doesnt parse relations between definitions (yet).

Installation

Install with composer. See Packagist for versions and constraints. Or use your own PSR-0 compliant autoloader

Usage example

A little code example to fetch all service definitions from config

<?php

include 'vendor/autoload.php';

$parser = new NagParser\Parser('/usr/local/nagios/etc');
$parser->parse();

$checkServices = $parser->getServiceDefinitions();

// ... Whatever you want to with found definitions

Reason for existence

I wanted easy Nagios CFG editing, without repeated configs. So I came up with this parser to read all available services in order to create auto-generated servicegroups. This way I'm sure that no service will be left uncategorized, and would surely be in one of my servicegroups.

统计信息

  • 总下载量: 411
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 3
  • 点击次数: 3
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 3
  • Watchers: 1
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-02-01