Code Monkey home page Code Monkey logo

Comments (12)

mtakaki avatar mtakaki commented on July 24, 2024

You just need to add a yaml file in your directory. Do you have a local config.yml in your directory? It sounds like it's a directory, not a file based on the error message.

from cachet-url-monitor.

antoine19 avatar antoine19 commented on July 24, 2024

Hello,
Yes i do have a file "config.yml" in local.

Then also when I run:
docker run --rm -it -v "$PWD"/my_config.yml:/usr/src/app/config/config.yml:ro mtakaki/cachet-url-monitor

When i check on Kitematic, it is going to create a folder "config.yml" inside config (on my container repo) . This is where the error "Is a Directory" comes from.
--> config/config.yml
--> it runs but note with my configuration file my_config.yml ( it pings URL http://localhost:8080/swagger instead)

The issu is i can't acces my container repo (usr\src\app\config) until i run the image.

Maybe my configuration file "my_config.yml" is not in the right place.

from cachet-url-monitor.

mtakaki avatar mtakaki commented on July 24, 2024

So, I tried reproducing the same error you're getting and I only get it if I create a directory named config.yml, like this:

$ mkdir config.yml
$ docker run --rm -it -v "$PWD":/usr/src/app/config/ mtakaki/cachet-url-monitor
Traceback (most recent call last):
  File "./cachet_url_monitor/scheduler.py", line 90, in <module>
    scheduler = Scheduler(sys.argv[1])
  File "./cachet_url_monitor/scheduler.py", line 56, in __init__
    self.configuration = Configuration(config_file)
  File "/usr/local/lib/python3.7/site-packages/cachet_url_monitor-0.5-py3.7.egg/cachet_url_monitor/configuration.py", line 84, in __init__
    self.data = load(open(self.config_file, 'r'), Loader=FullLoader)
IsADirectoryError: [Errno 21] Is a directory: 'config/config.yml'

Could you please confirm you have a config.yml file (not directory) in your current directory when you're calling docker?

from cachet-url-monitor.

antoine19 avatar antoine19 commented on July 24, 2024

Hello,
Yes i do have a file "config.yml" in my local repository.
I think the problem is coming from the fact that i have two volumes mounted on my container:
-usr\src\app\config
-usr\src\app\conf\

So when i run :
docker run --rm -it -v "$PWD":/usr/src/app/conf/ mtakaki/cachet-url-monitor

It runs but still with another fill.
By default it seems that it will look in this container repo and ignores the other container repo.(usr\src\app\config)

from cachet-url-monitor.

mtakaki avatar mtakaki commented on July 24, 2024

On which OS are you running this?

from cachet-url-monitor.

antoine19 avatar antoine19 commented on July 24, 2024

I am using Windows (not Pro).

I deleted the container and re-pull image and run the container with Kitematic.
I have now a local repo with a config.yml inside.

Capture

Its running and now my issue seems to be coming from the Cachet API now.

Capture2

from cachet-url-monitor.

mtakaki avatar mtakaki commented on July 24, 2024

Name does not resolve sounds like your domain name is incorrect. Sometimes in docker you can get dns issues, if you don't configure the dns properly on your container. Is it an internal domain name that is only resolved by your internal dns server? Or is it a public one?

from cachet-url-monitor.

antoine19 avatar antoine19 commented on July 24, 2024

Ok thanks, my bad i made a mistake when entering the cachet API.
I think my last issue is coming from the metric now during the uploading.
It is weird because i do have two metric in my cachet server (with id: 1 and id: 2)
Do i need token to access them ? Because when entering (http://hostname/api/v1/metrics) i get them without any token ?
Capture0

from cachet-url-monitor.

antoine19 avatar antoine19 commented on July 24, 2024

Hi,

Indeed, i need an API token.
Ok now i have everything working fine, thank you for your help.
I was just wondering if it would be possible to monitor multiple URL at the send time with the configuration file (.yml) ?

from cachet-url-monitor.

mtakaki avatar mtakaki commented on July 24, 2024

@antoine19 this is now supported on the latest release. You can refer to the readme on how to set it up.

from cachet-url-monitor.

mtakaki avatar mtakaki commented on July 24, 2024

I'm closing this issue as it's not a problem anymore.

from cachet-url-monitor.

tayanov avatar tayanov commented on July 24, 2024

before create container, make empty config file, then start container.
Because container make not file, but folder.

from cachet-url-monitor.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.