pondelok 17. januára 2022

systemctl enable --now

 systemctl enable --now 

- enable and start together: 


like this: 


[root@localhost ~]# systemctl status icinga2

● icinga2.service - Icinga host/service/network monitoring system

   Loaded: loaded (/usr/lib/systemd/system/icinga2.service; disabled; vendor preset: disabled)

   Active: inactive (dead)


Jan 15 18:01:41 localhost.localdomain icinga2[19648]: [2022-01-15 18:01:41 +0100] information/ConfigItem: Instantiated 1 Host.

Jan 15 18:01:41 localhost.localdomain icinga2[19648]: [2022-01-15 18:01:41 +0100] information/ConfigItem: Instantiated 1 Endpoint.

Jan 15 18:01:41 localhost.localdomain icinga2[19648]: [2022-01-15 18:01:41 +0100] information/ConfigItem: Instantiated 1 FileLogger.

Jan 15 18:01:41 localhost.localdomain icinga2[19648]: [2022-01-15 18:01:41 +0100] information/ConfigItem: Instantiated 244 CheckCommands.

Jan 15 18:01:41 localhost.localdomain icinga2[19648]: [2022-01-15 18:01:41 +0100] information/ScriptGlobal: Dumping variables to file '/var/cache/icinga2/icinga2.vars'

Jan 15 18:01:41 localhost.localdomain icinga2[19648]: [2022-01-15 18:01:41 +0100] information/cli: Closing console log.

Jan 15 18:01:41 localhost.localdomain systemd[1]: Started Icinga host/service/network monitoring system.

Jan 15 18:03:00 localhost.localdomain systemd[1]: Stopping Icinga host/service/network monitoring system...

Jan 15 18:03:01 localhost.localdomain systemd[1]: icinga2.service: Succeeded.

Jan 15 18:03:01 localhost.localdomain systemd[1]: Stopped Icinga host/service/network monitoring system.




[root@localhost ~]# systemctl enable --now icinga2.service

Created symlink /etc/systemd/system/multi-user.target.wants/icinga2.service → /usr/lib/systemd/system/icinga2.service.

[root@localhost ~]# systemctl status icinga2

● icinga2.service - Icinga host/service/network monitoring system

   Loaded: loaded (/usr/lib/systemd/system/icinga2.service; enabled; vendor preset: disabled)

   Active: active (running) since Sat 2022-01-15 18:03:25 CET; 2s ago

  Process: 21074 ExecStartPre=/usr/lib/icinga2/prepare-dirs /etc/sysconfig/icinga2 (code=exited, status=0/SUCCESS)

 Main PID: 21081 (icinga2)

   Status: "Startup finished."

    Tasks: 23 (limit: 49359)

   Memory: 13.6M

   CGroup: /system.slice/icinga2.service

           ├─21081 /usr/lib64/icinga2/sbin/icinga2 --no-stack-rlimit daemon --close-stdio -e /var/log/icinga2/error.log

           ├─21113 /usr/lib64/icinga2/sbin/icinga2 --no-stack-rlimit daemon --close-stdio -e /var/log/icinga2/error.log

           └─21122 /usr/lib64/icinga2/sbin/icinga2 --no-stack-rlimit daemon --close-stdio -e /var/log/icinga2/error.log


Jan 15 18:03:25 localhost.localdomain icinga2[21081]: [2022-01-15 18:03:25 +0100] information/ConfigItem: Instantiated 12 Notifications.

Jan 15 18:03:25 localhost.localdomain icinga2[21081]: [2022-01-15 18:03:25 +0100] information/ConfigItem: Instantiated 1 Downtime.

Jan 15 18:03:25 localhost.localdomain icinga2[21081]: [2022-01-15 18:03:25 +0100] information/ConfigItem: Instantiated 1 IcingaApplication.

Jan 15 18:03:25 localhost.localdomain icinga2[21081]: [2022-01-15 18:03:25 +0100] information/ConfigItem: Instantiated 1 Host.

Jan 15 18:03:25 localhost.localdomain icinga2[21081]: [2022-01-15 18:03:25 +0100] information/ConfigItem: Instantiated 1 Endpoint.

Jan 15 18:03:25 localhost.localdomain icinga2[21081]: [2022-01-15 18:03:25 +0100] information/ConfigItem: Instantiated 1 FileLogger.

Jan 15 18:03:25 localhost.localdomain icinga2[21081]: [2022-01-15 18:03:25 +0100] information/ConfigItem: Instantiated 244 CheckCommands.

Jan 15 18:03:25 localhost.localdomain icinga2[21081]: [2022-01-15 18:03:25 +0100] information/ScriptGlobal: Dumping variables to file '/var/cache/icinga2/icinga2.vars'

Jan 15 18:03:25 localhost.localdomain icinga2[21081]: [2022-01-15 18:03:25 +0100] information/cli: Closing console log.

Jan 15 18:03:25 localhost.localdomain systemd[1]: Started Icinga host/service/network monitoring system.

[root@localhost ~]#


Žiadne komentáre:

Zverejnenie komentára