-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathINSTALL
More file actions
45 lines (32 loc) · 1.47 KB
/
Copy pathINSTALL
File metadata and controls
45 lines (32 loc) · 1.47 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
If you install on a Debian stretch, prepare your system using the following
commands:
aptitude install make libyaml-perl libsys-cpuload-perl libanyevent-perl \
libxml-parser-perl libauthen-sasl-perl \
libnet-libidn-perl libobject-event-perl \
libxml-writer-perl libfile-pid-perl libanyevent-xmpp-perl
cpan -i Nagios::Status::HostStatus
cpan -i Nagios::Status::ServiceStatus
then (or if you habe any other kind of operating system), Do a
perl Build.PL (watch for missing prerequisites in the output!)
./Build
./Build install
and create/copy your configuration to an appropriate place. Change the
configuration to met your environment.
You can find sample nagios commands in the file nagios-misccommands.
You may want to run the bot unter supervise control:
mkdir /var/log/nagibot
mkdir -p /opt/nagios/supervise/nagibot/log
chown nagios /var/log/nagibot
cat > /opt/nagios/supervise/nagibot/run <<EOF
#!/bin/sh
exec /command/setuidgid nagios /usr/bin/nagibot.pl -vvv -c /opt/nagios/etc/nagibot.conf yourbotjid@example.com 2>&1
EOF
chmod 600 /opt/nagios/supervise/nagibot/run
cat > /opt/nagios/supervise/nagibot/log/run <<EOF
#!/bin/sh
exec /command/setuidgid nagios /command/multilog t /var/log/nagibot
EOF
chmod 600 /opt/nagios/supervise/nagibot/log/run
ln -s /opt/nagios/supervise/nagibot /service/
The script is also able to fork into background. An example init.d script is provided
as nagibot.initd.