mirror of
				https://github.com/ClusterCockpit/cc-metric-collector.git
				synced 2025-11-04 02:35:07 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			30 lines
		
	
	
		
			849 B
		
	
	
	
		
			Markdown
		
	
	
	
	
	
			
		
		
	
	
			30 lines
		
	
	
		
			849 B
		
	
	
	
		
			Markdown
		
	
	
	
	
	
## `nats` sink
 | 
						|
 | 
						|
The `nats` sink publishes all metrics into a NATS network. The publishing key is the database name provided in the configuration file
 | 
						|
 | 
						|
### Configuration structure
 | 
						|
 | 
						|
```json
 | 
						|
{
 | 
						|
  "<name>": {
 | 
						|
    "type": "nats",
 | 
						|
    "database" : "mymetrics",
 | 
						|
    "host": "dbhost.example.com",
 | 
						|
    "port": "4222",
 | 
						|
    "user": "exampleuser",
 | 
						|
    "password" : "examplepw",
 | 
						|
    "nkey_file": "/path/to/nkey_file",
 | 
						|
    "meta_as_tags" : [],
 | 
						|
  }
 | 
						|
}
 | 
						|
```
 | 
						|
 | 
						|
- `type`: makes the sink an `nats` sink
 | 
						|
- `database`: All metrics are published with this subject
 | 
						|
- `host`: Hostname of the NATS server
 | 
						|
- `port`: Port number (as string) of the NATS server
 | 
						|
- `user`: Username for basic authentication
 | 
						|
- `password`: Password for basic authentication
 | 
						|
- `meta_as_tags`: print all meta information as tags in the output (optional)
 | 
						|
- `nkey_file`: Path to credentials file with NKEY
 |