我的情况是在blackbox.yml中,我有ssh_banner模块,它会检查下面的ssh。
`-PseudoObjectExpr 0x7fe844080b80 <line:27:5, col:18> 'char *'
|-BinaryOperator 0x7fe844080ae8 <col:5, col:18> 'char [4]' lvalue '='
| |-ObjCPropertyRefExpr 0x7fe844080a98 <col:5, col:10> '<pseudo-object type>' lvalue objcproperty Kind=PropertyRef Property="model" Messaging=Setter
| | `-OpaqueValueExpr 0x7fe844080a78 <col:5> 'Robot *'
| | `-ImplicitCastExpr 0x7fe8440809c0 <col:5> 'Robot *' <LValueToRValue>
| | `-DeclRefExpr 0x7fe844080998 <col:5> 'Robot *' lvalue ImplicitParam 0x7fe8440808d8 'self' 'Robot *'
| `-OpaqueValueExpr 0x7fe844080ac8 <col:18> 'char [4]' lvalue
| `-StringLiteral 0x7fe844080a48 <col:18> 'char [4]' lvalue "123"
|-OpaqueValueExpr 0x7fe844080a78 <col:5> 'Robot *'
| `-ImplicitCastExpr 0x7fe8440809c0 <col:5> 'Robot *' <LValueToRValue>
| `-DeclRefExpr 0x7fe844080998 <col:5> 'Robot *' lvalue ImplicitParam 0x7fe8440808d8 'self' 'Robot *'
|-OpaqueValueExpr 0x7fe844080ac8 <col:18> 'char [4]' lvalue
| `-StringLiteral 0x7fe844080a48 <col:18> 'char [4]' lvalue "123"
|-OpaqueValueExpr 0x7fe844080b60 <col:18> 'char *'
| `-ImplicitCastExpr 0x7fe844080b10 <col:18> 'char *' <ArrayToPointerDecay>
| `-OpaqueValueExpr 0x7fe844080ac8 <col:18> 'char [4]' lvalue
| `-StringLiteral 0x7fe844080a48 <col:18> 'char [4]' lvalue "123"
`-ObjCMessageExpr 0x7fe844080b28 <col:10> 'void' selector=setModel:
|-OpaqueValueExpr 0x7fe844080a78 <col:5> 'Robot *'
| `-ImplicitCastExpr 0x7fe8440809c0 <col:5> 'Robot *' <LValueToRValue>
| `-DeclRefExpr 0x7fe844080998 <col:5> 'Robot *' lvalue ImplicitParam 0x7fe8440808d8 'self' 'Robot *'
`-OpaqueValueExpr 0x7fe844080b60 <col:18> 'char *'
`-ImplicitCastExpr 0x7fe844080b10 <col:18> 'char *' <ArrayToPointerDecay>
`-OpaqueValueExpr 0x7fe844080ac8 <col:18> 'char [4]' lvalue
`-StringLiteral 0x7fe844080a48 <col:18> 'char [4]' lvalue "123"
以下与prometheus.yml相关:
ssh_banner:
prober: tcp
tcp:
query_response:
- expect: "^SSH-2.0-"
我可以看到它只对node1进行ssh测试,而不是对node2进行ssh测试。有没有办法放在sigle的地方。我知道创建一个单独的工作可以解决这个问题。但服务器的数量可以很多。所以为每个节点创建一个单独的工作并不是一个好主意。