nexylan/graylog-sdk 问题修复 & 功能扩展

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

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

nexylan/graylog-sdk

最新稳定版本:v0.7.0

Composer 安装命令:

composer require nexylan/graylog-sdk

包简介

A PHP sdk to communicate with the Graylog REST API

README 文档

README

Graylog API PHP SDK.

Latest Stable Version Latest Unstable Version License

Total Downloads Monthly Downloads Daily Downloads

Documentation

All the installation and usage instructions are located in this README. Check it for a specific versions:

Prerequisites

This version of the project requires:

  • PHP 7.0+

Installation

First of all, you need to require this library through Composer:

composer require nexylan/graylog-sdk

Usage

$graylog = new \Nexy\Graylog\Graylog([
    'base_uri' => 'https://your.graylog.instance.com/api'
]);

// You may authenticate with API token:
$graylog->auth('YourApiToken');
// Or user credentials:
$graylog->auth('YourGraylogUsername', 'YourGrayLogPassword');

// Then, start using the API:
$result = $graylog->search()->relative()->terms('file', 'source: host.com', 0);

Symfony integration

Activate the bundle:

// config/bundles.php

return [
    Nexy\Graylog\Bridge\Symfony\Bundle\NexyGraylogBundle::class => ['all' => true],
];

Add the configuration file:

// config/packages/nexy_graylog.yaml

nexy_graylog:
    options:
        base_uri:             ~ # Required
    auth:

        # Can be a username or a token.
        user:                 ~ # Required

        # Required only for username auth.
        password:             null

Then, inject the Graylog service thanks to autowiring:

class MyService
{
    private $graylog;

    public function __construct(Nexy\Graylog\Graylog $graylog)
    {
        $this->graylog = $graylog;
    }
}

统计信息

  • 总下载量: 30.94k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 6
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 6
  • Watchers: 5
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-10-12

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固