Added service
This commit is contained in:
		
							
								
								
									
										16
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										16
									
								
								README.md
									
									
									
									
									
								
							| @ -14,8 +14,18 @@ template: | |||||||
|  |  | ||||||
| It gives knot's default stats, plus the rrl stats. For other modules, you'll have to add them yourself; have a look at the get_stats and gen_metrics functions. | It gives knot's default stats, plus the rrl stats. For other modules, you'll have to add them yourself; have a look at the get_stats and gen_metrics functions. | ||||||
|  |  | ||||||
|  | # Prometheus job example | ||||||
|  | The exporter uses port 8001. | ||||||
|  |  | ||||||
|  | ```yaml | ||||||
|  |   - job_name: 'knot-stats' | ||||||
|  |     static_configs: | ||||||
|  |       - targtes: ['myknot:8001'] | ||||||
|  | ``` | ||||||
|  |  | ||||||
| # Installation | # Installation | ||||||
|  | * Copy knot-prom.py to /usr/bin and make it executable by root | ||||||
| I don't know yet; might create a .deb | * Copy prometheus-knot-exporter.service to /etc/systemd/system | ||||||
|  | * systemctl enable prometheus-knot-exporter.service && systemctl start prometheus-knot-exporter.service | ||||||
|  | * Don't forget to open port 8001/tcp in your firewall | ||||||
|  |  | ||||||
|  | |||||||
							
								
								
									
										11
									
								
								prometheus-knot-exporter.service
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										11
									
								
								prometheus-knot-exporter.service
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,11 @@ | |||||||
|  | [Unit] | ||||||
|  | Description=prometheus-knot-exporter | ||||||
|  |  | ||||||
|  | [Service] | ||||||
|  | User=root | ||||||
|  | ExecStart=/usr/bin/knot-prom.py | ||||||
|  | Restart=on-failure | ||||||
|  |  | ||||||
|  | [Install] | ||||||
|  | WantedBy=multi-user.target | ||||||
|  |  | ||||||
		Reference in New Issue
	
	Block a user