We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b07b7ef commit 196316aCopy full SHA for 196316a
imageroot/actions/create-module/80provision_metrics
@@ -11,12 +11,14 @@ import agent
11
12
module_id = os.environ['MODULE_ID']
13
agent_id = os.environ['AGENT_ID']
14
-node_id = int(os.environ['NODE_ID'])
15
16
def main():
17
- global module_id, node_id
+ global module_id
+ node_id = int(os.environ['NODE_ID'])
18
+ rdb_ro = agent.redis_connect()
19
+ ip_address = rdb_ro.hget(f'node/{node_id}/vpn', 'ip_address') or '127.0.0.1'
20
targets = [{
- "targets": [f"127.0.0.1:{os.environ['TCP_PORT']}"],
21
+ "targets": [f"{ip_address}:{os.environ['TCP_PORT']}"],
22
"labels": {
23
"module_id": module_id,
24
"node": node_id, # no "_id" suffix for Metrics
0 commit comments