pmscosta / Code-Challenge-for-Mercedes-Benz.io

Bot to check if a certain service is live or not

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Code-Challenge-for-Mercedes-Benz.io

This is my solution for the Mercedes-Benz io challenged presented @ FEUP Carrer Fair 2018.

My name is Pedro Costa and I'm currently in the 3rd grade of MIEIC at FEUP. Any doubts feel free to contact me: up201605339@fe.up.pt

This bot checks if a certain service (defined in the services.txt file in the resources folder) is live or not. It starts by checking if the URL is actually acessible and if such it scrapes the website for more information regarding the current status. For the scraping part, I'm using an external library, JSOUP. In order to keep the dependencies and the compile part simple, I integrated the project with the Maven Framework. To run the bot just simple type: java -jar bot-1.jar wherever you clone this repository.

The program also creates a log file stored in your home directory.

All the source code is provided as is. Feel free to change/shape it to meet any of your needs!

Usage

  java -jar bot1.jar command [args]
     
     command:
            poll - Retrieves the status from of all configured services
            services - Lists all known services
            history - Outputs all the data from the local storage
            help - This screen
            
     args: (only applicable to poll command)
            --only=service1, ... - Only checks the specified services
            --exclude=service1, ... - Ignores specified services

About

Bot to check if a certain service is live or not

License:GNU General Public License v3.0


Languages

Language:Java 99.2%Language:HTML 0.8%