-
-
Notifications
You must be signed in to change notification settings - Fork 179
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[HELP] How to install Scrunity on Proxmox #534
Comments
https://github.com/AnalogJ/scrutiny/blob/master/docs/INSTALL_HUB_SPOKE.md might be a good guide for you I'm going to close this issue, but feel free to reopen/comment if that doesnt help. |
Thank you very much for the link, with that guide I was able to setup Scrutiny on 2 of my Proxmox servers and it's just been awesome experience using it. |
@AnalogJ However there seems to be a problem with cronjob part of that guide that with cronjob it's not getting the data and the chart it's not getting update but when I manually execute the command it's updating the info on Scrutiny. Like the guide said I just added the following line to the
Output of
|
@AnalogJ Also I added the |
confermo ,anche a me non funziona...soluzioni? |
@ushio75 I used systemd instead of cronjob and it's been working that way. |
I also had problems with the collector running flawlessly when triggered manually, but failing to run using cron. I switched to Systemd timers using this guide (https://www.howtogeek.com/replace-cron-jobs-with-systemd-timers/) and it's worked without issue ever since. |
I also had problems with cron. It would execute but only print the SCRUTINY title. I switched to systemd timers and it works now. Below is how I did it.
|
FYI, this only worked for me when I made the chmod +x /root/scrutiny/scrutiny.sh For those who are interested, here is my whole script that automates this: #!/bin/bash
# change as needed
API_ENDPOINT="http://192.168.1.xx:8081"
####################################
# Install Scrutiny Collector
# Installing dependencies
apt install smartmontools -y
# Define variables
INSTALL_DIR="/opt/scrutiny"
BIN_DIR="$INSTALL_DIR/bin"
LATEST_RELEASE_URL=$(curl -s https://api.github.com/repos/AnalogJ/scrutiny/releases/latest | grep "browser_download_url.*scrutiny-collector-metrics-linux-amd64" | cut -d '"' -f 4)
# Create the installation directory if it doesn't exist
mkdir -p $BIN_DIR
# Download the latest release
curl -L $LATEST_RELEASE_URL -o $BIN_DIR/scrutiny-collector-metrics-linux-amd64
# Make the binary executable
chmod +x $BIN_DIR/scrutiny-collector-metrics-linux-amd64
#####################################
# Install Scrutiny Service
# Create the directory if it doesn't exist
mkdir -p /root/scrutiny
# Write the script to /root/scrutiny/scrutiny.sh
cat << EOF > /root/scrutiny/scrutiny.sh
#!/bin/bash
/opt/scrutiny/bin/scrutiny-collector-metrics-linux-amd64 run --api-endpoint "$API_ENDPOINT" 2>&1 | tee /var/log/scrutiny.log
EOF
# Make the script executable
chmod +x /root/scrutiny/scrutiny.sh
# Write the service file to /etc/systemd/system/scrutiny.service
cat << 'EOF' > /etc/systemd/system/scrutiny.service
[Unit]
Description="Scrutiny Collector"
Requires=scrutiny.timer
[Service]
Type=simple
ExecStart=/root/scrutiny/scrutiny.sh
User=root
EOF
# Write the timer file to /etc/systemd/system/scrutiny.timer
cat << 'EOF' > /etc/systemd/system/scrutiny.timer
[Unit]
Description="Timer for the scrutiny.service"
[Timer]
Unit=scrutiny.service
OnBootSec=5min
OnUnitActiveSec=15min
[Install]
WantedBy=timers.target
EOF
# Reload the systemd manager configuration
systemctl enable scrutiny.timer
systemctl start scrutiny.timer
# show status to prove it's running
systemctl status scrutiny.timer |
Hello
Thank you very much for creating and maintaining this awesome and critical app
I know it's not a right place to ask for this but I couldn't find a discussion section or a Discord server to ask for guidance regarding installing Scrunity on Proxmox.
The approach I'm looking forward to is since the collector and DB and WebUI are separated, install the collector on the Proxmox host without docker and then have WebUI and DB via docker on a VM that's getting the data from the collector, but reading and trying with the documents I couldn't quite understand the procedure and hence I'm opening this issue.
Thanks in advance
The text was updated successfully, but these errors were encountered: