########################################################################
# Configuration for small NTP Analyzer Web Front                       #
########################################################################

# Connection parameters to SQL database instance.
Database {
        # Select either MySQL or PostgreSQL
        Provider MySQL

        # Address of SQL server
        Host 127.0.0.1

        # Name of database
        Name ntpa

        # Database username
        User ntpau

        # Password for the user
        Pass password
}
    
Log {
        # Levels: error, warn, notice, info, debug and trace
        Severity info
        File /var/log/ntpa/ntpa.web.log
}

# Multiple server configurations are available
Server {
        # Primary key in 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
        
        # Base path for generated files
        FilePath /usr/local/www/ntpa
        
        # Base URL for generated files
        WebPath /
        
        ########## Webpages ##########
        
        # Main page for a host
        HostPage ntp1 {
                # Indicate if generation should happen immediately after start up
                InitialRun 1

                # Minutes between generation of page
                Frequency 5

                PageTitle ntp1.example.net

                # Use either 'default' or 'bootstrap'
                Template default

                # Set to 1 if this page should show a link to pool.ntp.org
                PoolMember 0

                # Set to 1 if NTP daemon can be queried directly. Set to 0 to
                # fetch statistics from database instead.
                QueryDirect 0

                # Links to graphs
                Images {
                        # Index in graph destination array
                        LinkIndex 1
                        
                        # Link to graphs in config file
                        Graph offset1
                        Graph offset3
                }

                # Name and path to generated file.
                Destinations {
                        File index.html
                }
        }

        HostGraph offset1 {
                InitialRun 1
                Frequency 15
                Timespan 1
                
                Title ntp1.example.net (1 day)
                Width 1024
                Height 550
                
                Stability 0
                GFrequency 1
                Jitter 1
                Offset 1
                
                Destinations {
                        File ntp1.png
                }

                Links {
                        Link ntp1.png
                }
        }

        HostGraph offset3 {
                InitialRun 1
                Frequency 30
                Timespan 3
                
                Title ntp1.example.net (3 days)
                Width 1024
                Height 550
                
                Stability 0
                GFrequency 1
                Jitter 1
                Offset 1
                
                Destinations {
                        File ntp3.png
                }
        
                Links {
                        Link ntp3.png
                }
        }
}
