mirror of
				https://github.com/librenms/librenms.git
				synced 2024-10-07 16:52:45 +00:00 
			
		
		
		
	Add some hints in the documentation.
This commit is contained in:
		@@ -116,6 +116,7 @@ Placeholders:
 | 
			
		||||
- Rule: `%rule`
 | 
			
		||||
- Rule-Name: `%name`
 | 
			
		||||
- Timestamp: `%timestamp`
 | 
			
		||||
- Transport name: `%transport`
 | 
			
		||||
- Contacts, must be iterated in a foreach, `%key` holds email and `%value` holds name: `%contacts`
 | 
			
		||||
 | 
			
		||||
The Default Template is a 'one-size-fit-all'. We highly recommend defining own templates for your rules to include more specific information.
 | 
			
		||||
@@ -136,6 +137,11 @@ Rule: {if %name}%name{else}%rule{/if}\r\n
 | 
			
		||||
Alert sent to: {foreach %contacts}%value <%key> {/foreach}
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
Conditional formatting example, will display a link to the host in email or just the hostname in any other transport:
 | 
			
		||||
```text
 | 
			
		||||
{if %transport == 'mail'}<a href='https://my.librenms.install/device/device=%hostname/'>%hostname</a>{else}%hostname{/if}
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
# <a name="transports">Transports</a>
 | 
			
		||||
 | 
			
		||||
Transports are located within `$config['install_dir']/includes/alerts/transports.*.php` and defined as well as configured via ~~`$config['alert']['transports']['Example'] = 'Some Options'`~~.
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user