我正在使用kapacitor使用HTTP POST将警报发送到URL。写入的脚本在给定的URL上命中,但未将相关数据发送到任何给定的URL。
以下是我的TICK脚本。
stream
|from()
.measurement('cpu')
|alert()
.id('kapacitor/{{ index .Tags "host"}}')
.message('{{ .ID }} is {{ .Level }} value:{{ index .Fields "value" }}')
.info(lambda: TRUE)
.post('http://localhost:1440/alert')
.post('http://localhost/test.php')
Run Code Online (Sandbox Code Playgroud)
以下是第一个帖子脚本:
var express = require("express");
var app = express();
var moment = require("moment");
var dateTime = moment();
var bodyParser = require("body-parser");
var urlencodedParser = bodyParser.urlencoded({extended:false});
var jsonParser = bodyParser.json();
var port = 1440;
app.post('/alert', jsonParser ,function(request, response){
console.log(request.body);
response.send();
});
app.listen(port);
console.log('Express App.js listening to port '+port);
Run Code Online (Sandbox Code Playgroud)
以下是第二个帖子脚本:
<?php
$content = json_encode($_REQUEST);
echo …Run Code Online (Sandbox Code Playgroud) 我在CodeIgniter中开发了我的项目,它在XAMPP服务器上运行良好,但在WAMP服务器上运行不正常.
我改变了
$config['index_page'] = 'index.php'; to $config['index_page'] = '';
Run Code Online (Sandbox Code Playgroud)
和.htaccess我
RewriteCond %{REQUEST_URI} ^system.*
RewriteRule ^(.*)$ /index.php?/$1 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L]
Run Code Online (Sandbox Code Playgroud)
网站主页正确显示.但是,每当我点击任何链接时,没有链接正在运行服务器主页出现在法语版本中.
只有在URL中有index.php时,项目才能在WAMP上正常运行.
例如
http://localhost/codeigniter/welcome/view (This link doesn't work)
http://localhost/codeigniter/index.php/welcome/view (Links works properly)
Run Code Online (Sandbox Code Playgroud) 我希望在仪表板上显示即将到来的生日记录.我有MySQL表'联系人'哪个
有领域dob (DATE YYYY-MM-DD).我希望在生日快到的时候检索所有记录
在接下来的15天里.例如:生日是1986-03-24应该是结果.