API Reference
Class
BgpPrefixMonitor
Monitors BGP origin ASNs for domain IP prefixes.
Inheritance
- Object
- BgpPrefixMonitor
Remarks
Notifications are generated when the announcing ASN for a prefix changes, helping detect possible hijacks or routing errors.
Constructors
public BgpPrefixMonitor() #Methods
public async Task RunAsync(CancellationToken ct = null) #Returns:
TaskRuns a single check.
Parameters
- ct System.Threading.CancellationToken = null
public Void UseCustom(Func<String, CancellationToken, Task> handler) #Returns:
VoidConfigure a custom notification handler.
Parameters
- handler System.Func{System.String,System.Threading.CancellationToken,System.Threading.Tasks.Task}
public Void UseEmail(String smtpHost, Int32 port, Boolean useSsl, String from, String to, String username = null, String password = null) #Returns:
VoidConfigure an email notification.
Parameters
- smtpHost System.String
- port System.Int32
- useSsl System.Boolean
- from System.String
- to System.String
- username System.String = null
- password System.String = null
public Void UseWebhook(String url) #Returns:
VoidConfigure a webhook notification.
Parameters
- url System.String
Inherited Methods
public override Boolean Equals(Object obj) #Returns:
BooleanInherited from Object
Parameters
- obj Object
Properties
public String Domain { get; set; } #Domain to monitor.
public TimeSpan Interval { get; set; } #Interval between checks.
public INotificationSender Notifier { get; set; } #Notification sender.
public Func<CancellationToken, Task<Dictionary<String, Int32>>> QueryOverride { get; set; } #Override prefix query for testing.