index 751b22ba9c00f58325bc2956bd5180278fb2eb13..2c9d8f386395a7da3a63e9630276ce2c35d72a97 100755 (executable)
PluginDir "$PLUGIN_DIR"
Interval 2
PluginDir "$PLUGIN_DIR"
Interval 2
-LoadBackend mock_plugin
+LoadPlugin "store::memory"
+LoadBackend "mock_plugin"
<Backend "mock_plugin">
</Backend>
EOF
<Backend "mock_plugin">
</Backend>
EOF
sleep 3
output="$( run_sysdb -H "$SOCKET_FILE" \
sleep 3
output="$( run_sysdb -H "$SOCKET_FILE" \
- -c "LOOKUP hosts MATCHING ANY metric = 'foo/bar/qux'" )"
+ -c "LOOKUP hosts MATCHING ANY metric.name = 'foo/bar/qux'" )"
echo "$output" \
| grep -F '"some.host.name"' \
| grep -F '"other.host.name"'
echo "$output" \
| grep -F '"some.host.name"' \
| grep -F '"other.host.name"'
echo "$output" | grep -F 'host2.example.com' && exit 1
output="$( run_sysdb -H "$SOCKET_FILE" \
echo "$output" | grep -F 'host2.example.com' && exit 1
output="$( run_sysdb -H "$SOCKET_FILE" \
- -c "LOOKUP hosts MATCHING ANY service = 'mock service'" )"
+ -c "LOOKUP hosts MATCHING ANY service.name = 'mock service'" )"
echo "$output" \
| grep -F '"some.host.name"' \
| grep -F '"host1.example.com"' \
echo "$output" \
| grep -F '"some.host.name"' \
| grep -F '"host1.example.com"' \
echo "$output" | grep -F 'some.host.name' && exit 1
output="$( run_sysdb -H "$SOCKET_FILE" \
echo "$output" | grep -F 'some.host.name' && exit 1
output="$( run_sysdb -H "$SOCKET_FILE" \
- -c "LOOKUP hosts MATCHING ANY attribute != 'architecture'" )"
+ -c "LOOKUP hosts MATCHING ANY attribute.name != 'architecture'" )"
+echo "$output" \
+ | grep -F '"localhost"' \
+ | grep -F '"other.host.name"' \
+ | grep -F '"host1.example.com"' \
+ | grep -F '"host2.example.com"'
+echo "$output" | grep -F 'some.host.name' && exit 1
+
+output="$( run_sysdb -H "$SOCKET_FILE" \
+ -c "LOOKUP hosts MATCHING ALL attribute.name != 'architecture'" )"
echo "$output" \
| grep -F '"some.host.name"' \
| grep -F '"localhost"'
echo "$output" \
| grep -F '"some.host.name"' \
| grep -F '"localhost"'
echo "$output" | grep -F 'host2.example.com' && exit 1
output="$( run_sysdb -H "$SOCKET_FILE" \
echo "$output" | grep -F 'host2.example.com' && exit 1
output="$( run_sysdb -H "$SOCKET_FILE" \
- -c "LOOKUP hosts MATCHING ANY service = 'sysdbd'" )"
+ -c "LOOKUP hosts MATCHING ANY service.name = 'sysdbd'" )"
echo "$output" | grep -F '"localhost"'
echo "$output" | grep -F 'some.host.name' && exit 1
echo "$output" | grep -F 'other.host.name' && exit 1
echo "$output" | grep -F '"localhost"'
echo "$output" | grep -F 'some.host.name' && exit 1
echo "$output" | grep -F 'other.host.name' && exit 1
echo "$output" | grep -F 'host2.example.com' && exit 1
output="$( run_sysdb -H "$SOCKET_FILE" \
echo "$output" | grep -F 'host2.example.com' && exit 1
output="$( run_sysdb -H "$SOCKET_FILE" \
- -c "LOOKUP hosts MATCHING host =~ 'example.com'" )"
+ -c "LOOKUP hosts MATCHING name =~ 'example.com'" )"
echo "$output" \
| grep -F '"host1.example.com"' \
| grep -F '"host2.example.com"'
echo "$output" \
| grep -F '"host1.example.com"' \
| grep -F '"host2.example.com"'
stop_sysdbd
stop_sysdbd
+# vim: set tw=78 sw=4 ts=4 noexpandtab :