| 
									
										
										
										
											2013-10-20 21:16:13 +02:00
										 |  |  | # This test runs basic munin setup with node and cron job running on the same | 
					
						
							|  |  |  | # machine. | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-07-12 12:09:40 +02:00
										 |  |  | import ./make-test.nix ({ pkgs, ...} : { | 
					
						
							| 
									
										
										
										
											2014-06-28 16:04:49 +02:00
										 |  |  |   name = "munin"; | 
					
						
							| 
									
										
										
										
											2015-07-12 12:09:40 +02:00
										 |  |  |   meta = with pkgs.stdenv.lib.maintainers; { | 
					
						
							| 
									
										
										
										
											2016-05-17 12:57:28 +01:00
										 |  |  |     maintainers = [ domenkozar eelco chaoflow ]; | 
					
						
							| 
									
										
										
										
											2015-07-12 12:09:40 +02:00
										 |  |  |   }; | 
					
						
							| 
									
										
										
										
											2014-04-14 14:02:44 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  |   nodes = { | 
					
						
							| 
									
										
										
										
											2013-10-20 21:16:13 +02:00
										 |  |  |     one = | 
					
						
							| 
									
										
										
										
											2018-07-20 20:56:59 +00:00
										 |  |  |       { config, ... }: | 
					
						
							| 
									
										
										
										
											2014-04-14 14:02:44 +02:00
										 |  |  |         { | 
					
						
							| 
									
										
										
										
											2013-10-20 21:16:13 +02:00
										 |  |  |           services = { | 
					
						
							|  |  |  |            munin-node.enable = true; | 
					
						
							|  |  |  |            munin-cron = { | 
					
						
							|  |  |  |              enable = true; | 
					
						
							|  |  |  |              hosts = ''
 | 
					
						
							|  |  |  |                [${config.networking.hostName}] | 
					
						
							|  |  |  |                address localhost | 
					
						
							|  |  |  |              '';
 | 
					
						
							|  |  |  |            }; | 
					
						
							|  |  |  |           }; | 
					
						
							| 
									
										
										
										
											2014-09-28 14:25:05 +02:00
										 |  |  |           systemd.services.munin-node.serviceConfig.TimeoutStartSec = "3min"; | 
					
						
							| 
									
										
										
										
											2013-10-20 21:16:13 +02:00
										 |  |  |         }; | 
					
						
							|  |  |  |     }; | 
					
						
							| 
									
										
										
										
											2014-04-14 14:02:44 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2013-10-20 21:16:13 +02:00
										 |  |  |   testScript = ''
 | 
					
						
							|  |  |  |     startAll; | 
					
						
							| 
									
										
										
										
											2014-04-14 14:02:44 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2013-10-20 21:16:13 +02:00
										 |  |  |     $one->waitForUnit("munin-node.service"); | 
					
						
							| 
									
										
										
										
											2017-03-22 00:08:41 +01:00
										 |  |  |     $one->succeed('systemctl start munin-cron'); | 
					
						
							| 
									
										
										
										
											2013-10-20 21:16:13 +02:00
										 |  |  |     $one->waitForFile("/var/lib/munin/one/one-uptime-uptime-g.rrd"); | 
					
						
							|  |  |  |     $one->waitForFile("/var/www/munin/one/index.html"); | 
					
						
							|  |  |  |   '';
 | 
					
						
							| 
									
										
										
										
											2015-07-12 12:09:40 +02:00
										 |  |  | }) |