{"id":17810751,"url":"https://github.com/favourdaniel/devopsfetch","last_synced_at":"2025-07-20T02:37:09.415Z","repository":{"id":250051473,"uuid":"833306146","full_name":"FavourDaniel/devopsfetch","owner":"FavourDaniel","description":null,"archived":false,"fork":false,"pushed_at":"2024-07-25T09:40:42.000Z","size":9,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-01T04:06:53.503Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/FavourDaniel.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-07-24T19:09:42.000Z","updated_at":"2024-07-25T09:40:45.000Z","dependencies_parsed_at":"2024-07-24T23:11:01.866Z","dependency_job_id":"d0c39817-381e-46f8-a246-7af43bb8462f","html_url":"https://github.com/FavourDaniel/devopsfetch","commit_stats":null,"previous_names":["favourdaniel/devopsfetch"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/FavourDaniel/devopsfetch","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FavourDaniel%2Fdevopsfetch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FavourDaniel%2Fdevopsfetch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FavourDaniel%2Fdevopsfetch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FavourDaniel%2Fdevopsfetch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/FavourDaniel","download_url":"https://codeload.github.com/FavourDaniel/devopsfetch/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FavourDaniel%2Fdevopsfetch/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266058481,"owners_count":23870157,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-27T15:40:14.377Z","updated_at":"2025-07-20T02:37:09.396Z","avatar_url":"https://github.com/FavourDaniel.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DevopsFetch\n\nDevopsfetch is a command line tool that collects and displays system information, including active ports, user logins, Nginx configurations, Docker images, and container statuses.\n\n## Features\n- Ports: DevOpsfetch displays all active ports and associated services. It also provides detailed information about specific ports.\n- Docker: It lists all Docker images with their details (repository, tag, image ID, size, creation date), shows all Docker containers (including exited ones) with comprehensive information and offers detailed inspection of specific containers or images\n- Nginx: It displays all Nginx domains and their corresponding ports, and provides configuration details for specific domains\n- Users: It lists all system users along with their last login times and provides detailed information about specific users.\n- Time Range: It allows filtering of activities within a specified time range.\n- Continuous Monitoring: It enables continuous monitoring of user activities.\n- Log Rotation: It implements automatic log rotation using logrotate to manage log file sizes efficiently.\n\n## Prerequisites\nBefore installing DevopsFetch, ensure you meet the following requirements:\n\n- A Linux-based operating system with root or sudo access\n- Docker installed and running\n- Nginx installed and configured\n\n## Installation\n\nFollow these steps to set up DevopsFetch on your machine:\n\n1.  Clone the Repository\n```\ngit clone https://github.com/FavourDaniel/devopsfetch.git\n```\n2. Navigate to the DevopsFetch directory:\n```\ncd devopsfetch\n```\n3. Make the scripts executable:\n```\nchmod +x devopsfetch.sh\nchmod +x install_devopsfetch.sh\n```\n4. Run the installation script with root privileges:\n```\nsudo ./install_devopsfetch.sh\n```\n\nThis script will:\n- Install necessary dependencies\n- Set up log rotation\n- Configure the DevopsFetch service for continuous monitoring\n\n## Usage Examples\nDevopsFetch offers a variety of commands to retrieve system information:\n\n### Port Information\n- Display all active ports and services\n```\nsudo ./devopsfetch.sh -p\nsudo ./devopsfetch.sh --port\n```\n- Get detailed information about a specific port\n```\nsudo ./devopsfetch.sh -p \u003cport-number\u003e\n```\n### Docker Information\n\n- List all Docker images and containers\n```\nsudo ./devopsfetch.sh -d\nsudo ./devopsfetch.sh --docker\n```\n- Get detailed information about a specific container or image:\n```\nsudo ./devopsfetch.sh --docker \u003ccontainer_name\u003e\nsudo ./devopsfetch.sh -d \u003ccontainer_name\u003e\n```\n### Nginx Information\n\n- Display all Nginx domains and their ports\n```\nsudo ./devopsfetch.sh -n\nsudo ./devopsfetch.sh --nginx\n```\n- Get configuration details for a specific domain\n```\nsudo ./devopsfetch.sh -n \u003cdomain\u003e\nsudo ./devopsfetch.sh --nginx \u003cdomain\u003e\n```\n\n### User Information\n- List all users and their last login times\n```\nsudo ./devopsfetch.sh -u\nsudo ./devopsfetch.sh --users\n```\n- Get detailed information about a specific user\n```\nsudo ./devopsfetch.sh -u \u003cusername\u003e\nsudo ./devopsfetch.sh --users \u003cusername\u003e\n```\n### Time Range Filtering\n\n- Display activities within a specified time range\n```\nsudo ./devopsfetch.sh -t \u003ctime-range\u003e\nsudo ./devopsfetch.sh --time \u003ctime-range\u003e\n```\n### Help\n\n- Get usage instructions for the program\n```\nsudo ./devopsfetch.sh -h\nsudo ./devopsfetch.sh --help\n```\n\n## Logging Mechanism\n\nDevopsFetch implements a robust logging system to track its activities:\n\n- Log file location: `/var/log/devopsfetch.log`\n- Log rotation configuration:\n\n```\ncat \u003c\u003c EOF \u003e /etc/logrotate.d/devopsfetch\n/var/log/devopsfetch.log {\n    daily\n    rotate 7\n    compress\n    delaycompress\n    missingok\n    notifempty\n    create 644 root root\n    postrotate\n        systemctl reload devopsfetch.service \u003e dev/null 2\u003e /dev/null || true\n    endscript\n}\nEOF\n```\n- To view the logs\n```\ncat /var/log/devopsfetch.log\n```\nor \n```\ntail -f /var/log/devopsfetch.log\n```\n\n## Continuous Monitoring\n\nDevopsFetch can run as a service for continuous monitoring:\n\n- Start the service\n```\nsudo systemctl start devopsfetch.service\n```\n- Stop the service\n```\nsudo systemctl stop devopsfetch.service\n```\n- Check service status\n```\nsudo systemctl status devopsfetch.service\n```\n\n## Troubleshooting\n\nIf you encounter any issues:\n1. Check the log file for error messages\n```\ncat /var/log/devopsfetch.log\n```\n2. Ensure all prerequisites are correctly installed\n3. Verify that you have the necessary permissions to run the script\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffavourdaniel%2Fdevopsfetch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffavourdaniel%2Fdevopsfetch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffavourdaniel%2Fdevopsfetch/lists"}