how to add a new service in nagios
Lab 4.2: Adding a New Startup Service with systemd For example a very minimal file named /etc/systemd/system/fake2.service: [Unit] Description=fake2 After=network.target [Service] ExecStart=/bin/echo I am starting the fake2 service ExecStop=/bin/echo I am stopping the fake2 service [Install] WantedBy=multi-user.target
root@ubuntu:/etc/systemd/system# systemctl start fake.service root@ubuntu:/etc/systemd/system# systemctl status fake.service fake.service - fake Loaded: loaded (/etc/systemd/system/fake.service; disabled; vendor preset: enabled) Active: inactive (dead) May 16 11:41:05 ubuntu systemd[1]: Started fake. May 16 11:41:05 ubuntu systemd[1]: Starting fake... May 16 11:41:05 ubuntu echo[1798]: I am starting the fake2 service May 16 11:41:05 ubuntu echo[1800]: I am stopping the fake2 service root@ubuntu:/etc/systemd/system# ps aux | grep fake* root 1809 0.0 0.0 13688 2272 pts/8 S+ 11:41 0:00 grep --color=auto fake.service root@ubuntu:/etc/systemd/system#
Could not connect to host (http://127.0.0.1:18083/)
[root@devserver ~]# service vboxweb-service status Checking for VBox Web Service ...running [root@devserver ~]# service vboxdrv status VirtualBox kernel modules (vboxdrv, vboxnetflt, vboxnetadp, vboxpci) are loaded. [root@devserver ~]# service vboxautostart-service status Usage: /etc/init.d/vboxautostart-service {start|stop} [root@devserver ~]# service vboxballoonctrl-service status Checking for VBox watchdog service ...not running [root@devserver ~]# sestatus SELinux status: enabled SELinuxfs mount: /selinux Current mode: permissive Mode from config file: permissive Policy version: 24 Policy from config file: targeted [root@devserver ~]#
/* SOAP URL of vboxwebsrv (not phpVirtualBox's URL) */ var $location = 'http://127.0.0.1:18083/'; ... // Host / ip to use for console connections #var $consoleHost = '192.168.1.40';