-
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathapp.config
More file actions
91 lines (72 loc) · 3.37 KB
/
app.config
File metadata and controls
91 lines (72 loc) · 3.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
<?xml version="1.0"?>
<configuration>
<configSections>
<section name="UrlMonitorConfig" type="UrlMonitor.UrlMonitorConfigSectionHandler, UrlMonitor" />
<section name="nlog" type="NLog.Config.ConfigSectionHandler, NLog"/>
</configSections>
<UrlMonitorConfig>
<!-- Email configuration used to send email when a url fails. You must set this to valid info before running the service. -->
<Email>
<Host>smtp.gmail.com</Host>
<UserName>youremailsendfrom@gmail.com</UserName>
<Password>yourpassword</Password>
<Port>587</Port>
<Ssl>true</Ssl>
<From>Your Display Name</From>
<Subject>UrlMonitor Alert</Subject>
</Email>
<Urls>
<!-- Example url for WWDC, please remove or replace with your own url -->
<Url>
<!-- Full url to monitor -->
<Path>https://developer.apple.com/wwdc/</Path>
<!-- HTTP VERB -->
<Method>GET</Method>
<!-- Headers to send with the request -->
<Headers>
<Header>
<Name>User-Agent</Name>
<Value>Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.151 Safari/535.19</Value>
</Header>
</Headers>
<!-- Base64 encoded bytes to post to the url (empty for none) -->
<PostBytes></PostBytes>
<!-- Text to post to the url (empty for none) -->
<PostText></PostText>
<!-- Frequency at which to ping the url (DD:HH:MM:SS) -->
<Frequency>00:00:01:00</Frequency>
<!-- Regex that must match the status code sent back or email is sent (empty for none) -->
<StatusCodeRegex>200</StatusCodeRegex>
<!-- Regex that must match at least one http header in the response or email is sent (empty for none) -->
<HeadersRegex></HeadersRegex>
<!-- Regex that must match the body sent back or email is sent (empty for none) -->
<BodyRegex></BodyRegex>
<!-- True or false to alert if the url response changes, must be all lowercase -->
<AlertIfChanged>true</AlertIfChanged>
<!-- Message to go in the email body if something changed -->
<MismatchMessage>WWDC page changed, go order your tickets!</MismatchMessage>
<!-- Email addresses to send to if there is a problem, comma separated -->
<EmailAddresses>youremailreceive@example.com,youremailreceive2@example.com</EmailAddresses>
</Url>
</Urls>
<!-- Amount of time to sleep after each url is checked (DD:HH:MM:SS.Milliseconds) -->
<SleepTimeUrl>00:00:00:00.020</SleepTimeUrl>
<!-- Amount of time to sleep between checks of batches urls (DD:HH:MM:SS) -->
<SleepTimeBatch>00:00:00:05</SleepTimeBatch>
<!-- Maximum number of threads -->
<MaxThreads>500</MaxThreads>
</UrlMonitorConfig>
<nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<targets>
<target name="logfile" xsi:type="File" fileName="logfile.txt"/>
<target name="console" xsi:type="Console" />
</targets>
<rules>
<logger name="*" minlevel="Info" writeTo="logfile" />
<logger name="*" minlevel="Info" writeTo="console" />
</rules>
</nlog>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
</startup>
</configuration>