1# -------------------------------------- 2# NTP Analyzer sample configuration file 3# -------------------------------------- 4 5# Use the following command in shell to create a database on localhost named "ntpa" and a user named "ntpau" with password "password": 6# mysql -u root -p -e "CREATE DATABASE ntpa; CREATE USER 'ntpau'@'localhost' IDENTIFIED BY 'password'; GRANT ALL PRIVILEGES ON ntpa.* TO 'ntpau'@'localhost'; FLUSH PRIVILEGES;" 7 8Database { 9 # Uncomment if you want to use PostgreSQL 10 # Provider PostgreSQL 11 Provider MySql 12 13 Host 127.0.0.1 14 15 # Uncomment to use another port than default 16 # Port 5432 17 18 Name ntpa 19 User ntpau 20 Pass "password" 21 22 # Uncomment to change connection timeout 23 # ConnectionTimeout 60 24 25 # Uncomment to use a SSL connection 26 # EnableSsl Yes 27 28 # Uncomment if your MySQL server uses client certificates 29 # CertificateFile client.pem 30 31 # Uncomment if your MySQL server uses password for client certificates 32 # CertificatePassword "certpass" 33 34 # Uncomment to override connection settings 35 # ConnectionString "Server=myServerAddress;Database=myDataBase;Uid=myUsername;Pwd=myPassword;" 36 37 # Uncomment to avoid (re)creation of tables and data 38 # New systems should enable this setting 39 # Create No 40 Create Yes 41 42 # Uncomment to automatically upgrade database schema 43 # Upgrade Yes 44} 45 46# Uncomment to change permission settings for generated files 47# Permission { 48# Mode 644 49# User www 50# Group ntpa 51# } 52 53Log { 54 File /var/log/ntpa/ntpa.log 55 56 # Uncomment to hide severity level in log messages 57 # ShowSeverity No 58 59 # Uncomment to hide timestamps in log messages 60 # ShowTimestamp No 61 62 # Uncomment to show log messages with severity debug 63 # Levels: error, warn, notice, info, debug and trace 64 # Severity Debug 65 66 # Uncomment to change default time stamp in log messages 67 # TimeFormat "MM-dd-yyyy HH:mm:ss" 68} 69 70# Uncomment to give more details in Syslog (default severity in syslog is Notice) 71# Log { 72# Type Syslog 73# Severity Info 74# } 75 76# Uncomment to show debug info in console window 77# Log { 78# Type Console 79# Severity Debug 80# } 81 82# Uncomment to show a heartbeat entry in logs 83# Daemon { 84# Heartbeat 1200 85# } 86 87# Uncomment to send a regular status mail 88# Notify ntpstat-summary { 89# # Uncomment to send a test immediately after start up 90# # InitialRun Yes 91# 92# # Uncomment to send a mail every 360 minutes (6 hours) 93# # Frequency 360 94# 95# Recipient root@example.net 96# Sender sender@example.net 97# Subject "NTP Analyzer stats daily run - stat" 98# 99# Host 127.0.0.1 100# Port 587 101# 102# # Uncomment to set SMTP user name 103# # User "username" 104# 105# # Uncomment to set SMTP password 106# # Pass "password" 107# 108# # Uncomment to enable SMTP SSL connection 109# # EnableSsl Yes 110#} 111 112Reading { 113 Name stat1 114 115 # Uncomment to read values from NTP servers immediately after start up 116 # InitialRun Yes 117 118 # Uncomment to change Frequency of NTP server readings to 10 minutes 119 # Frequency 10 120 Frequency 5 121 122 # Uncomment to change database timestamps to local time 123 # TimeStamp Local 124 TimeStamp UTC 125} 126 127Server { 128 HostID 1 129 HostAddress 127.0.0.1 130 FilePath "/usr/local/www/ntpa" 131 132 # Uncomment to use ntpctl instead of ntpq for readings 133 # HostType Ntpctl 134 135 # Uncomment to change base URL for generated files and links 136 # WebPath is relative to FilePath 137 # WebPath /ntpa 138 139 HostStats { 140 Frequency stat1 141 } 142 143 HostIoStats { 144 Frequency stat1 145 } 146 147 PeerStats { 148 Frequency stat1 149 } 150 151 # Uncomment to track changes in NTP drift file 152 # DriftStats { 153 # Frequency stat1 154 # } 155 156 HostPage ntp1 { 157 PageTitle "ntp1.example.net" 158 159 # Uncomment to use the default HTML template 160 # Template Default 161 Template Bootstrap 162 163 # Uncomment to use local time in host page. 164 # PageTime Local 165 166 PeerPages ntp1-peers 167 Link /index.html 168 169 # Uncomment to fetch peer status directly from NTP servers instead of from database 170 # QueryDirect Yes 171 172 # Uncomment to generate a link to pool.ntp.org 173 # PoolMember Yes 174 175 Images { 176 Title "Recent offset graphs" 177 Graph offset1 178 Graph offset3 179 } 180 181 Destinations { 182 File index.html 183 } 184 } 185 186 PeerPages ntp1-peers { 187 PageTitle "ntp1.example.net" 188 Template Bootstrap 189 Link /peers/ 190 191 # Uncomment to use local time in peer pages. 192 # PageTime Local 193 194 Images { 195 Graph offset24 196 Graph offset72 197 Graph delay 198 } 199 200 Destinations { 201 Directory peers/ 202 } 203 } 204 205 HostGraph offset1 { 206 Frequency 15 207 InitialRun Yes 208 Title "ntp1.example.net (1 day)" 209 210 # Uncomment to show a 7 days graph 211 # Timespan 7 212 Timespan 1 213 214 # Uncomment to generate a graph with 512 pixels width 215 # Width 512 216 217 # Uncomment to generate a graph with 320 pixels height 218 # Height 320 219 220 Jitter 1 221 Offset 1 222 223 # Uncomment to show deviation (stability) in graph 224 # Stability 1 225 226 # Uncomment to show frequency for the kernel phase-locked loop (PLL) 227 # GFrequency 1 228 229 # Uncomment to remove readings which divert more than factor 4 from average 230 # FilterFactor 4 231 232 # Uncomment to use local time in graph time line. 233 # GraphTime Local 234 235 Destinations { 236 File ntp1.png 237 } 238 239 Links { 240 Link ntp1.png 241 } 242 } 243 244 HostGraph offset3 { 245 Frequency 30 246 InitialRun Yes 247 Title "ntp1.example.net (3 days)" 248 Timespan 3 249 Jitter 1 250 Offset 1 251 GFrequency 1 252 253 # Uncomment to use local time in graph time line. 254 # GraphTime Local 255 256 Destinations { 257 File ntp3.png 258 } 259 260 Links { 261 Link ntp3.png 262 } 263 } 264 265 PeerGraphs offset24 { 266 Frequency 15 267 InitialRun Yes 268 Title "24 hours offset" 269 Timespan 1 270 Offset 1 271 272 # Uncomment to use local time in graph time line. 273 # GraphTime Local 274 275 Destinations { 276 Prefix offset24- 277 Directory /peers/ 278 } 279 280 Links { 281 Link peer1/offset24- 282 } 283 } 284 285 PeerGraphs offset72 { 286 Frequency 15 287 InitialRun Yes 288 Title "72 hours offset" 289 Timespan 3 290 Offset 1 291 292 # Uncomment to use local time in graph time line. 293 # GraphTime Local 294 295 Destinations { 296 Prefix offset72- 297 Directory /peers/ 298 } 299 300 Links { 301 Link peers/offset72- 302 } 303 } 304 305 PeerGraphs delay { 306 Frequency 180 307 InitialRun Yes 308 Title "15 days delay" 309 Timespan 15 310 Offset 1 311 Jitter 1 312 Delay 1 313 314 # Uncomment to use local time in graph time line. 315 # GraphTime Local 316 317 Destinations { 318 Prefix delay- 319 Directory /peers/ 320 } 321 322 Links { 323 Link peers/delay- 324 } 325 } 326 327 Menu { 328 329 Item title { 330 Type Link 331 Caption example.net 332 Link http://example.net 333 } 334 335 Item main { 336 Type Page 337 Caption NTP 338 Page ntp1 339 } 340 341 Item { 342 Type Page 343 Caption About 344 Page about1 345 } 346 } 347 348 AboutPage about1 { 349 PageTitle "example.net" 350 Link /about.html 351 ContentTitle "ntp1.example.net" 352 353 # Uncomment to generate a link to support.ntp.org 354 # ServerID 999 355 356 Content { 357 <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. 358 Sed et risus vel leo interdum fringilla. Vestibulum ex justo, 359 euismod ac conat tempor a massa. Donec elementum congue.</p> 360 } 361 362 Destinations { 363 File about.html 364 } 365 } 366 367 HostGraphPage graphpages1 { 368 InitialRun Yes 369 Frequency 0 370 GraphPage ntp1 371 372 Destinations { 373 Directory hgraphs/ 374 } 375 } 376 377 PeerGraphPage graphpages2 { 378 InitialRun Yes 379 Frequency 0 380 GraphPage ntp1-peers 381 382 Destinations { 383 Directory pgraphs/ 384 } 385 } 386} 387