Skip to content
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

pingCheck.php on Docker #2601

Closed
Nisbo opened this issue Jun 25, 2019 · 5 comments
Closed

pingCheck.php on Docker #2601

Nisbo opened this issue Jun 25, 2019 · 5 comments

Comments

@Nisbo
Copy link

Nisbo commented Jun 25, 2019

Hello,

I am running phpipam 1.4 dbversion25 in a Docker container on a Synology NAS
I uses this image
https://hub.docker.com/r/phpipam/phpipam-www/

The Name of the Conatainer is: phpipam_phpipam-web_1

If I login to the NAS via SSH, change to root and try to execute the command
docker exec phpipam_phpipam-web_1 /usr/bin/php /var/www/phpipam/functions/scripts/pingCheck.php

I got this error
Could not open input file: /var/www/phpipam/functions/scripts/pingCheck.php

I also tried:
docker exec -it phpipam_phpipam-web_1 /usr/bin/php /var/www/html/functions/scripts/pingCheck.php
because there are 2 diffrent manuals available if I googled it

The 1st part
docker exec phpipam_phpipam-web_1
should be OK, if I change the name of the container

I get the expected error
Error response from daemon: No such container: phpipam_phpipam-web_11

are there any changes to the version 1.4 ?

Currently phpipam checks the hosts every hour but I dont know where this is configured

There was also a container installed with the name
phpipam_phpipam-cron_1
so I assume this a docker corn job but I dont know how to configure it

Any idea ? I am not a docker profi, sorry for the stupid questions ;)

@GaryAllan
Copy link
Collaborator

Hi @Nisbo

I started a thread for testing the docker images #2425. I'm hoping to get everything running well for the 1.40 release. At the moment I'm only tracking the git master branch.

The php files are installed into /phpipam. The command you need is...

docker exec -it phpipam_phpipam-web_1 /usr/bin/php /phpipam/functions/scripts/pingCheck.php

Multiple load-balanced frontend phpipam-web containers are supported. Ping and discovery scanning is via the phpipam-cron container (should run only 1 phpipam-cron container). Discovery scanning is currently hard-coded to 1 hour, changing this to be configurable is the last open issue.

Ideas, testing and feedback would be helpful.

Thanks

@Nisbo
Copy link
Author

Nisbo commented Jun 26, 2019

@GaryAllan

thx for your quick reply, the CMD works like a charm :)
Maybe as a hint for everyone who is also new to docker, you can use the ls command to check the content of a directory

docker exec -it phpipam_phpipam-web_1 ls /phpipam/

I found this option after I started this thread but was still unable to locate the pingCheck.php .. maybe it was already to late in the evening :D

I will join your docker thread, thx for heads up

Greetings from Germany :)

@GaryAllan
Copy link
Collaborator

GaryAllan commented Jun 27, 2019

I've added an environment variable to the docker images.

  • SCAN_INTERVAL Network discovery job interval = 5m,10m,15m,30m,1h,2h,4h,6h,12h (default: 1h) [CRON Container only]

@Nisbo
Copy link
Author

Nisbo commented Jun 28, 2019

Stupid question, as I said in the 1st post I am not so familiar with docker. How do I update a container and keep all the data / configuration ? Normally I use Docker only for IP-Symcon and IP-Symcon has a linked storage folder outside of the container.

@GaryAllan
Copy link
Collaborator

Hello

There should be a "pull latest from repository" option (or something similar) in the GUI, I don't have access to a Synology NAS to check.

docker-compose can also be used directly via the CLI.

Persistent data is stored in volumes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants