mirror of
https://bitbucket.org/anguist/ntpa
synced 2026-09-27 11:28:53 +00:00
143 lines
3.8 KiB
Plaintext
143 lines
3.8 KiB
Plaintext
#########################################################
|
|
# Configuration for NTP Analyzer statistical recordings #
|
|
#########################################################
|
|
|
|
Database {
|
|
# Address of MySQL server
|
|
Host 127.0.0.1
|
|
|
|
# Port of MySQL server. The default port number is 3306.
|
|
#Port 2567
|
|
|
|
# Name of database
|
|
Name ntpa
|
|
|
|
# Database user name
|
|
User ntpau
|
|
|
|
# Password for the user
|
|
Pass xxxx
|
|
|
|
# Set to 1 to automatically create all tables and data.
|
|
Create 1
|
|
}
|
|
|
|
Permission {
|
|
# Drop privilege to user after startup. Default is ntpa
|
|
# This only applies inside of mono.
|
|
ExecUser ntpa
|
|
|
|
# Create new files with this user. Default is ntpa
|
|
User ntpa
|
|
|
|
# Create new files with this group. Default is ntpa
|
|
Group ntpa
|
|
|
|
# Set mask for new files. Default is 644
|
|
Mask 644
|
|
}
|
|
|
|
Listener {
|
|
IP 127.0.0.1
|
|
Port 9070
|
|
}
|
|
|
|
Log {
|
|
# Levels: error, warn, notice, info, debug and trace
|
|
Severity info
|
|
File /var/log/ntpa/ntpa.stat.log
|
|
}
|
|
|
|
# Synchronize timestamps for readings across different NTP servers/peers
|
|
Reading {
|
|
Name stat1
|
|
|
|
# Indicate if generation should happen immediately after start up
|
|
InitialRun 0
|
|
|
|
# Minutes between reading values from NTP servers.
|
|
Frequency 5
|
|
|
|
# Indicate if readings should happen at rounded intervals.
|
|
FixedRun 1
|
|
}
|
|
|
|
Server {
|
|
# Primary key in database table 'host'
|
|
HostID 1
|
|
|
|
# Address queried by ntpq and ntpdc
|
|
HostAddress ntp1.example.net
|
|
|
|
# The utility used to query ntpd. Use ntpdc for old hosts.
|
|
HostType ntpq
|
|
|
|
HostStats {
|
|
# Use name defined in Reading section or number of minutes between readings.
|
|
Frequency stat1
|
|
}
|
|
|
|
HostIOStats {
|
|
Frequency stat1
|
|
}
|
|
|
|
PeerStats {
|
|
Frequency stat1
|
|
}
|
|
}
|
|
|
|
# Support for multiple servers
|
|
#Server {
|
|
# HostID 2
|
|
#
|
|
# HostStats {
|
|
# Frequency stat1
|
|
# }
|
|
#
|
|
# PeerStats {
|
|
# Frequency stat1
|
|
# }
|
|
#}
|
|
|
|
Notify ntpstat-summary {
|
|
# Indicate if a test mail should be sent immediately after start up
|
|
InitialRun 1
|
|
|
|
# Send a mail every 1440 minutes or 24 hours
|
|
Frequency 1440
|
|
|
|
# Send the mail to this address
|
|
Mail root@example.net
|
|
|
|
# Subject of mail
|
|
Subject NTP Analyzer stats daily run - stat
|
|
|
|
# Sender of mail
|
|
Sender ntpa-xxx@example.net
|
|
|
|
# Address of SMTP host
|
|
SmtpHost smtp.example.net
|
|
|
|
# Port number on SMTP host. The default port number is 25.
|
|
SmtpPort 587
|
|
|
|
# Username for SMTP server. Should be used with SSL turned on.
|
|
SmtpUser xxx@example.net
|
|
|
|
# Password for SMTP server. Should be used with SSL turned on.
|
|
SmtpPass xxx
|
|
|
|
# Set to 1 when using RFC 3207 SMTP. Default is disabled.
|
|
EnableSsl 1
|
|
|
|
## Does SSL work for SMTP, like GMail ?
|
|
## Yes it does. First you must import the root certificates using the mozroots tool:
|
|
# mozroots --import --ask-remove
|
|
## Note that if you are using a web application (i.e. not the current user) you must add the --machine option like this:
|
|
# mozroots --import --ask-remove --machine
|
|
## Next you need to import the intermediate certificates. You can do this by using the certmgr tool to connect to the SSL server. E.g.
|
|
# certmgr -ssl smtps://smtp.gmail.com:465
|
|
## Use the -m option to import the certificates into the machine store if required.
|
|
## Finally you need to make sure to use the SSL-enabled port in your application. This is generally 465 or 587 instead of port 25.
|
|
## Reference: http://www.mono-project.com/docs/faq/security/
|
|
} |