<!DOCTYPE RefEntry PUBLIC "-//OASIS//DTD DocBook V4.1//EN">
<refentry id="uptimed.conf">

<refmeta>
<refentrytitle>uptimed.conf</refentrytitle>
<manvolnum>5</manvolnum>
<refmiscinfo>uptimed.conf</refmiscinfo>
</refmeta>

<refnamediv>
<refname>uptimed.conf</refname>
<refpurpose>The configuration file for <application>uptimed</application>(8)
</refpurpose>
</refnamediv>

<refsect1><title>DESCRIPTION</title>
<para>
<indexterm><primary>uptimed.conf</primary></indexterm>
<filename>uptimed.conf</filename> contains a list of key-value
pairs to configure the behaviour of <command>uptimed</command>(8),
comments start with <emphasis>#</emphasis>.
The beginning of <filename>uptimed.conf</filename> might look like
the following:
</para>
<para>
<blockquote>
<literallayout>
# Uptimed configuration file.

# Interval to write the logfile with in seconds.
UPDATE_INTERVAL=3600

# Maximum number of entries in logfile. Set to 0 for unlimited.
LOG_MAXIMUM_ENTRIES=500
</literallayout>
</blockquote>
</para>

<para>
The variables <varname>LOG_MINIMUM_UPTIMED</varname>, 
<varname>MAIL_MINIMUM_UPTIME</varname> and <varname>MILESTONE</varname>
expect a time unit which are encoded by a single letter. 
<emphasis>h</emphasis> is used for hour,
<emphasis>d</emphasis> is used for day, 
<emphasis>w</emphasis> is used for weeks and
<emphasis>y</emphasis> is used for years. Default (nothings specified)
is seconds.
</para>

<para>
The default <filename>uptimed.conf</filename> is quite well commented so
you should be able to use it as a basis. The following keys are supported:
</para>
<para> <variablelist><!-- <title>Recognized Configuration Variables</title> -->

<varlistentry><term><varname>UPDATE_INTERVAL</varname></term>
<listitem><para>
Interval to write the logfile with in seconds, e.g. 60.
</para></listitem></varlistentry>

<varlistentry><term><varname>LOG_MAXIMUM_ENTRIES</varname></term>
<listitem><para>
Maximum number of entries in logfile, e.g. 50. Set to 0 for unlimited.
</para></listitem></varlistentry>

<varlistentry><term><varname>LOG_MINIMUM_UPTIMED</varname></term>
<listitem><para>
Minimum uptime that must be reached to be considered a record.
</para></listitem></varlistentry>

<varlistentry><term><varname>MAIL_MINIMUM_UPTIME</varname></term>
<listitem><para>
Minimum uptime before sending out e-mail.
</para></listitem></varlistentry>

<varlistentry><term><varname>MAIL_MINIMUM_POSITION</varname></term>
<listitem><para>
Minimum position in uptime ranking before sending out e-mail.
</para></listitem></varlistentry>

<varlistentry><term><varname>EMAIL</varname></term>
<listitem><para>
Email address to mail milestones/records to.
Assumes <command>sendmail</command>(8) compatible <acronym>MTA</acronym> 
installed as <filename>/usr/lib/sendmail</filename>.
You can enable this with <varname>SEND_EMAIL</varname> or with the 
<option>-e</option> option on the commandline.
</para></listitem></varlistentry>

<varlistentry><term><varname>SEND_EMAIL</varname></term>
<listitem><para>
Controls if email is sent. Use <emphasis>0</emphasis> if you never want
an email, <emphasis>1</emphasis> if you want emails for both milestones and
records, <emphasis>2</emphasis> if you want emails only for milestones and
<emphasis>3</emphasis> if you want emails only for records.
</para></listitem></varlistentry>

<varlistentry><term><varname>SENDMAIL</varname></term>
<listitem><para>
Command to call a sendmail compatible mailer,
e.g. <Literal>/usr/lib/sendmail -t</Literal>.
</para></listitem></varlistentry>

<varlistentry><term><varname>PIDFILE</varname></term>
<listitem><para>
Path to store <acronym>PID</acronym> file, e.g.
<filename>/var/run/uptimed</filename>
</para></listitem></varlistentry>

<varlistentry><term><varname>MILESTONE</varname></term>
<listitem><para>
Configurable milestones. 
Syntax is pretty easy: <Literal>MILESTONE=time:description</Literal>.
Keep in mind that the description needs to fit in the window. 
</para>
<para>
<example><title>Example for <varname>MILESTONE</varname> settings</title>
<blockquote>
<literallayout>
MILESTONE=5d:five days
MILESTONE=10d:ten days
MILESTONE=25d:twenty-five days
MILESTONE=50d:fifty days
MILESTONE=10w:ten weeks
MILESTONE=75d:seventy-five days
MILESTONE=100d:hundred days
MILESTONE=150d:hundred and fifty days
MILESTONE=25w:twenty-five weeks
MILESTONE=200d:two hundred days
MILESTONE=250d:250 days
MILESTONE=300d:three hundred days
MILESTONE=50w:fifty weeks
MILESTONE=1y:one year
MILESTONE=400d:four hundred days
MILESTONE=500d:five hundred days
MILESTONE=100w:hundred weeks
MILESTONE=750d:750 days
MILESTONE=1000d:thousand days
</literallayout>
</blockquote>
</example>
</para></listitem></varlistentry>
</variablelist>


</refsect1>
<refsect1><title>AUTHOR</title>
<para>
This man page was written by Helge Kreutzmann
<email>kreutzm@itp.uni-hannover.de</email> for the Debian GNU/Linux project but
may be used by others.
</para>
</refsect1>
<refsect1><title>SEE ALSO</title>
<para><application>uptimed</application>(8), <application>uprecords</application>(1)</para>
</refsect1>
</refentry>
