ntpa/examples/ntpa.conf

387 lines
8.8 KiB
Plaintext

# --------------------------------------
# NTP Analyzer sample configuration file
# --------------------------------------
# Use the following command in shell to create a database on localhost named "ntpa" and a user named "ntpau" with password "password":
# 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;"
Database {
# Uncomment if you want to use PostgreSQL
# Provider PostgreSQL
Provider MySql
Host 127.0.0.1
# Uncomment to use another port than default
# Port 5432
Name ntpa
User ntpau
Pass "password"
# Uncomment to change connection timeout
# ConnectionTimeout 60
# Uncomment to use a SSL connection
# EnableSsl Yes
# Uncomment if your MySQL server uses client certificates
# CertificateFile client.pem
# Uncomment if your MySQL server uses password for client certificates
# CertificatePassword "certpass"
# Uncomment to override connection settings
# ConnectionString "Server=myServerAddress;Database=myDataBase;Uid=myUsername;Pwd=myPassword;"
# Uncomment to avoid (re)creation of tables and data
# New systems should enable this setting
# Create No
Create Yes
# Uncomment to automatically upgrade database schema
# Upgrade Yes
}
# Uncomment to change permission settings for generated files
# Permission {
# Mode 644
# User www
# Group ntpa
# }
Log {
File /var/log/ntpa/ntpa.log
# Uncomment to hide severity level in log messages
# ShowSeverity No
# Uncomment to hide timestamps in log messages
# ShowTimestamp No
# Uncomment to show log messages with severity debug
# Levels: error, warn, notice, info, debug and trace
# Severity Debug
# Uncomment to change default time stamp in log messages
# TimeFormat "MM-dd-yyyy HH:mm:ss"
}
# Uncomment to give more details in Syslog (default severity in syslog is Notice)
# Log {
# Type Syslog
# Severity Info
# }
# Uncomment to show debug info in console window
# Log {
# Type Console
# Severity Debug
# }
# Uncomment to show a heartbeat entry in logs
# Daemon {
# Heartbeat 1200
# }
# Uncomment to send a regular status mail
# Notify ntpstat-summary {
# # Uncomment to send a test immediately after start up
# # InitialRun Yes
#
# # Uncomment to send a mail every 360 minutes (6 hours)
# # Frequency 360
#
# Recipient root@example.net
# Sender sender@example.net
# Subject "NTP Analyzer stats daily run - stat"
#
# Host 127.0.0.1
# Port 587
#
# # Uncomment to set SMTP user name
# # User "username"
#
# # Uncomment to set SMTP password
# # Pass "password"
#
# # Uncomment to enable SMTP SSL connection
# # EnableSsl Yes
#}
Reading {
Name stat1
# Uncomment to read values from NTP servers immediately after start up
# InitialRun Yes
# Uncomment to change Frequency of NTP server readings to 10 minutes
# Frequency 10
Frequency 5
# Uncomment to change database timestamps to local time
# TimeStamp Local
TimeStamp UTC
}
Server {
HostID 1
HostAddress 127.0.0.1
FilePath "/usr/local/www/ntpa"
# Uncomment to use ntpctl instead of ntpq for readings
# HostType Ntpctl
# Uncomment to change base URL for generated files and links
# WebPath is relative to FilePath
# WebPath /ntpa
HostStats {
Frequency stat1
}
HostIoStats {
Frequency stat1
}
PeerStats {
Frequency stat1
}
# Uncomment to track changes in NTP drift file
# DriftStats {
# Frequency stat1
# }
HostPage ntp1 {
PageTitle "ntp1.example.net"
# Uncomment to use the default HTML template
# Template Default
Template Bootstrap
# Uncomment to use local time in host page.
# PageTime Local
PeerPages ntp1-peers
Link /index.html
# Uncomment to fetch peer status directly from NTP servers instead of from database
# QueryDirect Yes
# Uncomment to generate a link to pool.ntp.org
# PoolMember Yes
Images {
Title "Recent offset graphs"
Graph offset1
Graph offset3
}
Destinations {
File index.html
}
}
PeerPages ntp1-peers {
PageTitle "ntp1.example.net"
Template Bootstrap
Link /peers/
# Uncomment to use local time in peer pages.
# PageTime Local
Images {
Graph offset24
Graph offset72
Graph delay
}
Destinations {
Directory peers/
}
}
HostGraph offset1 {
Frequency 15
InitialRun Yes
Title "ntp1.example.net (1 day)"
# Uncomment to show a 7 days graph
# Timespan 7
Timespan 1
# Uncomment to generate a graph with 512 pixels width
# Width 512
# Uncomment to generate a graph with 320 pixels height
# Height 320
Jitter 1
Offset 1
# Uncomment to show deviation (stability) in graph
# Stability 1
# Uncomment to show frequency for the kernel phase-locked loop (PLL)
# GFrequency 1
# Uncomment to remove readings which divert more than factor 4 from average
# FilterFactor 4
# Uncomment to use local time in graph time line.
# GraphTime Local
Destinations {
File ntp1.png
}
Links {
Link ntp1.png
}
}
HostGraph offset3 {
Frequency 30
InitialRun Yes
Title "ntp1.example.net (3 days)"
Timespan 3
Jitter 1
Offset 1
GFrequency 1
# Uncomment to use local time in graph time line.
# GraphTime Local
Destinations {
File ntp3.png
}
Links {
Link ntp3.png
}
}
PeerGraphs offset24 {
Frequency 15
InitialRun Yes
Title "24 hours offset"
Timespan 1
Offset 1
# Uncomment to use local time in graph time line.
# GraphTime Local
Destinations {
Prefix offset24-
Directory /peers/
}
Links {
Link peer1/offset24-
}
}
PeerGraphs offset72 {
Frequency 15
InitialRun Yes
Title "72 hours offset"
Timespan 3
Offset 1
# Uncomment to use local time in graph time line.
# GraphTime Local
Destinations {
Prefix offset72-
Directory /peers/
}
Links {
Link peers/offset72-
}
}
PeerGraphs delay {
Frequency 180
InitialRun Yes
Title "15 days delay"
Timespan 15
Offset 1
Jitter 1
Delay 1
# Uncomment to use local time in graph time line.
# GraphTime Local
Destinations {
Prefix delay-
Directory /peers/
}
Links {
Link peers/delay-
}
}
Menu {
Item title {
Type Link
Caption example.net
Link http://example.net
}
Item main {
Type Page
Caption NTP
Page ntp1
}
Item {
Type Page
Caption About
Page about1
}
}
AboutPage about1 {
PageTitle "example.net"
Link /about.html
ContentTitle "ntp1.example.net"
# Uncomment to generate a link to support.ntp.org
# ServerID 999
Content {
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Sed et risus vel leo interdum fringilla. Vestibulum ex justo,
euismod ac conat tempor a massa. Donec elementum congue.</p>
}
Destinations {
File about.html
}
}
HostGraphPage graphpages1 {
InitialRun Yes
Frequency 0
GraphPage ntp1
Destinations {
Directory hgraphs/
}
}
PeerGraphPage graphpages2 {
InitialRun Yes
Frequency 0
GraphPage ntp1-peers
Destinations {
Directory pgraphs/
}
}
}