1 Star 0 Fork 0

警醒 / VeinOpen

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
elastic.php 725 Bytes
一键复制 编辑 原始数据 按行查看 历史
警醒 提交于 2020-01-17 15:56 . 写入elasticsearch错误调试11
<?php
go(function () {
$data = '{"ip":"0.0.0.0","method":"GET","host":null,"uri":"LogCenter","logId":"5fb39ccd823508865b10b033ffa83498","ext":{"param":"[]","info":"[\"[ LANG ] \\\/www\\\/VeinOpen\\\/thinkphp\\\/lang\\\/zh-cn.php\"]"},"project":"veinopen","serverIp":"10.0.0.12","time":"2020-01-17 15:54:10"}';
// $data = json_decode($data, true);
$client = new Swoole\Coroutine\Http\Client('127.0.0.1', '9200');
$client->setHeaders(['Content-Type' => 'application/json; charset=utf-8',]);
$client->set(['timeout' => 1.0]);
$index = '/testrequestlog/_doc';
$client->setMethod("POST");
$client->setData($data);
$client->execute($index);
echo $client->body;
$client->close();
});
1
https://gitee.com/alerting/VeinOpen.git
git@gitee.com:alerting/VeinOpen.git
alerting
VeinOpen
VeinOpen
devicemanager

搜索帮助

53164aa7 5694891 3bd8fe86 5694891