Logging and Poller Paths Issue

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

User avatar
macan
Cacti Guru User
Posts: 1146
Joined: Tue Mar 18, 2008 2:30 am
Location: Czech

Re: Logging and Poller Paths Issue

Post by macan »

you don't need this, you can use cron only:
https://docs.cacti.net/Installing-Under ... -Debian.md
Let the Cacti grow!
davidolaj
Posts: 18
Joined: Fri Sep 27, 2024 2:41 am

Re: Logging and Poller Paths Issue

Post by davidolaj »

Now I have perfectly installed the Cacti but no graphs after added SNMP Router...
Attachments
Preview-Mode.jpg
Preview-Mode.jpg (120.81 KiB) Viewed 922 times
User avatar
macan
Cacti Guru User
Posts: 1146
Joined: Tue Mar 18, 2008 2:30 am
Location: Czech

Re: Logging and Poller Paths Issue

Post by macan »

You have to add poller to cron (with correct path), it is described in our manual
https://docs.cacti.net/Installing-Under ... -Debian.md
Let the Cacti grow!
davidolaj
Posts: 18
Joined: Fri Sep 27, 2024 2:41 am

Re: Logging and Poller Paths Issue

Post by davidolaj »

Please which path and how do I correct the below;

vim /var/www/html/cacti/service/cactid.service (edit the path)
-------------------------------------------------------

[Unit]
Description=Cacti Daemon Main Poller Service
After=network.target

[Service]
Type=forking
User=apache
Group=apache
EnvironmentFile=/etc/sysconfig/cactid
ExecStart=/var/www/html/cacti/cactid.php
Restart=always
RestartSec=5s

[Install]
WantedBy=multi-user.target
User avatar
macan
Cacti Guru User
Posts: 1146
Joined: Tue Mar 18, 2008 2:30 am
Location: Czech

Re: Logging and Poller Paths Issue

Post by macan »

You must know that. It is your server. We don't know how did you install cacti
Let the Cacti grow!
davidolaj
Posts: 18
Joined: Fri Sep 27, 2024 2:41 am

Re: Logging and Poller Paths Issue

Post by davidolaj »

You mean right paths for;
EnvironmentFile=??
ExecStart=??


What do you mean by "EnvironmentFile=" ? Because I can locate /sysconfig/cactid in my /etc folder.
User avatar
macan
Cacti Guru User
Posts: 1146
Joined: Tue Mar 18, 2008 2:30 am
Location: Czech

Re: Logging and Poller Paths Issue

Post by macan »

what directory you installed cacti?
Execstart will be /path/to/your/cacti/cactid.php

The rest is only copy files, it is described in manual as I wrote
Let the Cacti grow!
davidolaj
Posts: 18
Joined: Fri Sep 27, 2024 2:41 am

Re: Logging and Poller Paths Issue

Post by davidolaj »

My Cacti "ExecStart" path is correct;
ExecStart=/var/www/html/cacti/cactid.php (I hope nothing to edit in the cactid.php) ?
davidolaj
Posts: 18
Joined: Fri Sep 27, 2024 2:41 am

Re: Logging and Poller Paths Issue

Post by davidolaj »

root@mrtg-server:/home# touch /etc/sysconfig/cactid
touch: cannot touch '/etc/sysconfig/cactid': No such file or directory
root@mrtg-server:/home# cp -p /var/www/html/cacti/service/cactid.service /etc/systemd/system
root@mrtg-server:/home# systemctl enable cactid
root@mrtg-server:/home# systemctl start cactid
Job for cactid.service failed because of unavailable resources or another system error.
See "systemctl status cactid.service" and "journalctl -xeu cactid.service" for details.
root@mrtg-server:/home# systemctl status cactid
● cactid.service - Cacti Daemon Main Poller Service
Loaded: loaded (/etc/systemd/system/cactid.service; enabled; vendor preset: enabled)
Active: activating (auto-restart) (Result: resources) since Fri 2024-10-18 12:24:38 WAT; 3s ago
CPU: 0

Oct 18 12:24:38 mrtg-server systemd[1]: Stopped Cacti Daemon Main Poller Service.
Oct 18 12:24:38 mrtg-server systemd[1]: cactid.service: Failed to load environment files: No such file or directory
Oct 18 12:24:38 mrtg-server systemd[1]: cactid.service: Failed to run 'start' task: No such file or directory
Oct 18 12:24:38 mrtg-server systemd[1]: cactid.service: Failed with result 'resources'.
Oct 18 12:24:38 mrtg-server systemd[1]: Failed to start Cacti Daemon Main Poller Service.
root@mrtg-server:/home#
User avatar
macan
Cacti Guru User
Posts: 1146
Joined: Tue Mar 18, 2008 2:30 am
Location: Czech

Re: Logging and Poller Paths Issue

Post by macan »

show result of journalctl -xeu cactid.service
Let the Cacti grow!
davidolaj
Posts: 18
Joined: Fri Sep 27, 2024 2:41 am

Re: Logging and Poller Paths Issue

Post by davidolaj »

root@mrtg-server:/home# journalctl -xeu cactid.service
░░ Subject: A stop job for unit cactid.service has finished
░░ Defined-By: systemd
░░ Support: http://www.ubuntu.com/support
░░
░░ A stop job for unit cactid.service has finished.
░░
░░ The job identifier is 279280 and the job result is done.
Oct 18 16:52:30 mrtg-server systemd[1]: cactid.service: Failed to load environm>
Oct 18 16:52:30 mrtg-server systemd[1]: cactid.service: Failed to run 'start' t>
Oct 18 16:52:30 mrtg-server systemd[1]: cactid.service: Failed with result 'res>
░░ Subject: Unit failed
░░ Defined-By: systemd
░░ Support: http://www.ubuntu.com/support
░░
░░ The unit cactid.service has entered the 'failed' state with result 'resource>
Oct 18 16:52:30 mrtg-server systemd[1]: Failed to start Cacti Daemon Main Polle>
░░ Subject: A start job for unit cactid.service has failed
░░ Defined-By: systemd
░░ Support: http://www.ubuntu.com/support
░░
░░ A start job for unit cactid.service has finished with a failure.
░░
░░ The job identifier is 279280 and the job result is failed.
lines 5140-5162/5162 (END)
░░ Subject: A stop job for unit cactid.service has finished
░░ Defined-By: systemd
░░ Support: http://www.ubuntu.com/support
░░
░░ A stop job for unit cactid.service has finished.
░░
░░ The job identifier is 279280 and the job result is done.
Oct 18 16:52:30 mrtg-server systemd[1]: cactid.service: Failed to load environment files: No such file or directory
Oct 18 16:52:30 mrtg-server systemd[1]: cactid.service: Failed to run 'start' task: No such file or directory
Oct 18 16:52:30 mrtg-server systemd[1]: cactid.service: Failed with result 'resources'.
░░ Subject: Unit failed
░░ Defined-By: systemd
░░ Support: http://www.ubuntu.com/support
░░
░░ The unit cactid.service has entered the 'failed' state with result 'resources'.
Oct 18 16:52:30 mrtg-server systemd[1]: Failed to start Cacti Daemon Main Poller Service.
░░ Subject: A start job for unit cactid.service has failed
░░ Defined-By: systemd
░░ Support: http://www.ubuntu.com/support
░░
░░ A start job for unit cactid.service has finished with a failure.
░░
░░ The job identifier is 279280 and the job result is failed.
User avatar
macan
Cacti Guru User
Posts: 1146
Joined: Tue Mar 18, 2008 2:30 am
Location: Czech

Re: Logging and Poller Paths Issue

Post by macan »

try locate cactid.php
or
find / -type f -name cactid.php

It will find where is your cactid.php. Add this path to cactid.service
Let the Cacti grow!
davidolaj
Posts: 18
Joined: Fri Sep 27, 2024 2:41 am

Re: Logging and Poller Paths Issue

Post by davidolaj »

root@mrtg-server:~# find / -type f -name cactid.php
/var/www/html/cacti/cactid.php



vim /var/www/html/cacti/service/cactid.service
-------------------------------------------

[Unit]
Description=Cacti Daemon Main Poller Service
After=network.target

[Service]
Type=forking
User=apache
Group=apache
EnvironmentFile=/etc/sysconfig/cactid
ExecStart=/var/www/html/cacti/cactid.php
Restart=always
RestartSec=5s

[Install]
WantedBy=multi-user.target


With above paths setting, the Cacti still not show GRAPH.
User avatar
macan
Cacti Guru User
Posts: 1146
Joined: Tue Mar 18, 2008 2:30 am
Location: Czech

Re: Logging and Poller Paths Issue

Post by macan »

systemctl status cactid
Let the Cacti grow!
davidolaj
Posts: 18
Joined: Fri Sep 27, 2024 2:41 am

Re: Logging and Poller Paths Issue

Post by davidolaj »

root@mrtg-server:/home# systemctl status cactid
● cactid.service - Cacti Daemon Main Poller Service
Loaded: loaded (/etc/systemd/system/cactid.service; enabled; vendor preset>
Active: activating (auto-restart) (Result: resources) since Tue 2024-10-22>
CPU: 0

Oct 22 21:17:39 mrtg-server systemd[1]: Stopped Cacti Daemon Main Poller Servic>
Oct 22 21:17:39 mrtg-server systemd[1]: cactid.service: Failed to load environm>
Oct 22 21:17:39 mrtg-server systemd[1]: cactid.service: Failed to run 'start' t>
Oct 22 21:17:39 mrtg-server systemd[1]: cactid.service: Failed with result 'res>
Oct 22 21:17:39 mrtg-server systemd[1]: Failed to start Cacti Daemon Main Polle>
lines 1-10/10 (END)
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest