我有以下curl标题,我仍然可以安装上面提到的libcurl4包 -
kafka@metamorphosis:~$ ll /usr/include/curl/
total 200
drwxr-xr-x 2 root root 4096 Jan 16 13:29 ./
drwxr-xr-x 51 root root 20480 Jan 16 13:29 ../
-rw-r--r-- 1 root root 7303 Dec 18 01:11 curlbuild.h
-rw-r--r-- 1 root root 83928 Dec 18 01:11 curl.h
-rw-r--r-- 1 root root 8934 Dec 18 01:11 curlrules.h
-rw-r--r-- 1 root root 2741 Dec 18 01:11 curlver.h
-rw-r--r-- 1 root root 3472 Dec 18 01:11 easy.h
-rw-r--r-- 1 root root 2790 Dec 18 01:11 mprintf.h
-rw-r--r-- …Run Code Online (Sandbox Code Playgroud) 我有一个ELK(Elasticsearch-Kibana)堆栈,其中elasticsearch节点的默认分片值为5.日志以logstash格式(logstash-YYYY.MM.DD)推送到它,如果我错了,则纠正我 - 按日期索引.
由于我无法在不重建索引的情况下更改现有索引的分片计数,因此我希望在创建下一个索引时将分片数增加到8 .我认为ES-API允许即时持续更改.
我该怎么做呢?
我有一个支持添加 python 插件的应用程序的源代码。我已经编写了一个 python 脚本,并且想要构建一个默认包含我的脚本的自定义 rpm。这样我就不必在 rpm 安装后额外添加它。
据我了解,这有两个部分-
.spec。我如何知道将文件放在源中的何处?如何指定要复制脚本的路径?规格文件包含如下文本:
%if %{with_python}
%files python
%{_mandir}/man5/collectd-python*
%{_libdir}/%{name}/python.so
//Something like this?
// %{_libdir}/%{name}/gearman.py
// %{_libdir}/%{name}/redis.py
%endif
Run Code Online (Sandbox Code Playgroud) 我将我的日志推送到elasticsearch,它存储了一个典型的文档 -
{
"_index": "logstash-2014.08.11",
"_type": "machine",
"_id": "2tSlN1P1QQuHUkmoJfkmnQ",
"_score": null,
"_source": {
"category": "critical log with list",
"app_name": "attachment",
"stacktrace_array": [
"this is the first line",
"this is the second line",
"this is the third line",
"this is the fourth line",
],
"@timestamp": "2014-08-11T13:30:51+00:00"
},
"sort": [
1407763851000,
1407763851000
]
}
Run Code Online (Sandbox Code Playgroud)
Kibana使搜索子串变得非常容易.例如,"critical"在仪表板中搜索将使用critical任何字符串映射值中的单词获取所有日志.
我如何搜索类似于"second line"嵌套在我的doc中的数组中的字符串的内容?
我目前的理解 -
题-
忘记重新映射.有没有办法告诉ES 默认行为-
"Consider everything that is not a date to be of string type"?
另外,如果我这样做,我会失去很多吗?
最新情况:
我添加了文件 - config/mappings/_default/mapping.json包含以下内容 -
{
"dynamic_templates": [
{
"template_1": {
"match": "*",
"match_mapping_type": "int",
"mapping": {
"type": "string"
}
},
"template_2": {
"match": "*",
"match_mapping_type": "long",
"mapping": {
"type": "string"
}
}
}
]
}
Run Code Online (Sandbox Code Playgroud)
我还尝试将以下内容放在 - config/default_mapping.json
{
"_default_" : {
"match": "*",
"match_mapping_type": "int",
"mapping": {
"type": "string"
}
}
}
Run Code Online (Sandbox Code Playgroud)
我的"动机"是摆脱出现的错误,如果int和 …
..在以下shell脚本中?
$USER1$=/usr/lib/nagios/plugins
据我所知,变量定义是作为 -
export USER1=/usr/lib/nagios/plugins
来源:
好的,命令有效.现在我必须将它实现到Nagios中.因为包管理器未安装的所有"本地"命令都在/ usr/lib/nagios/plugins_local中,所以我为此路径定义了一个$ USER2 $变量:
# vim resource.cfg
...
# Sets $USER1$ to be the path to the plugins
$USER1$=/usr/lib/nagios/plugins
# my own check-commands live here:
$USER2$=/usr/lib/nagios/plugins_local
Run Code Online (Sandbox Code Playgroud)