Add gatus intervals and umami external link tracking
This commit is contained in:
		
							parent
							
								
									f48e702339
								
							
						
					
					
						commit
						4608081fba
					
				
					 5 changed files with 19 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -75,6 +75,7 @@ class FilterModule(object):
 | 
			
		|||
                    "group": mon.get("group"),
 | 
			
		||||
                    "url": url,
 | 
			
		||||
                    "conditions": conditions,
 | 
			
		||||
                    "interval": mon.get("interval"),
 | 
			
		||||
                    "alerts": self.default_alerts,
 | 
			
		||||
                    "ui": {
 | 
			
		||||
                        "hide-url": True
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1 +1,2 @@
 | 
			
		|||
<script async src="/_a/script.js" data-website-id="{{ vault_forgejo.umami }}"></script>
 | 
			
		||||
<script async src="/_a/track-external.js"></script>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -22,6 +22,7 @@ forgejo_runner_compose:
 | 
			
		|||
      docker-in-docker:
 | 
			
		||||
        image: docker:dind
 | 
			
		||||
        privileged: true
 | 
			
		||||
        dns: 1.1.1.1
 | 
			
		||||
        restart: always
 | 
			
		||||
        command: dockerd -H tcp://0.0.0.0:2375 --tls=false
 | 
			
		||||
        networks:
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -10,6 +10,21 @@ umami_docker_image: docker.umami.dev/umami-software/umami:postgresql-latest
 | 
			
		|||
 | 
			
		||||
umami_svc:
 | 
			
		||||
  domain: "{{ all_services | service_get_domain(role_name) }}"
 | 
			
		||||
  caddy_extra: |
 | 
			
		||||
    handle /track-external.js {
 | 
			
		||||
      header Content-Type text/javascript
 | 
			
		||||
      respond <<JS
 | 
			
		||||
        (() => {
 | 
			
		||||
          const name = 'outbound-link-click';
 | 
			
		||||
          document.querySelectorAll('a').forEach(a => {
 | 
			
		||||
            if (a.host !== window.location.host && !a.getAttribute('data-umami-event')) {
 | 
			
		||||
              a.setAttribute('data-umami-event', name);
 | 
			
		||||
              a.setAttribute('data-umami-event-url', a.href);
 | 
			
		||||
            }
 | 
			
		||||
          });
 | 
			
		||||
        })();
 | 
			
		||||
        JS 200
 | 
			
		||||
    }
 | 
			
		||||
  port: 3000
 | 
			
		||||
 | 
			
		||||
umami_env:
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue