Giter Site home page Giter Site logo

marcelofmatos / phpnetmap Goto Github PK

View Code? Open in Web Editor NEW
43.0 7.0 17.0 12.42 MB

Web application for ethernet mapping. PHP Software for network device monitoring with SNMP v(1/2c/3) protocol.

Home Page: http://marcelofmatos.github.io/phpnetmap/

License: Other

PHP 97.43% CSS 0.61% JavaScript 1.29% Batchfile 0.01% Shell 0.01% Dockerfile 0.01% Less 0.67%
docker switches php traffic-monitoring network d3js yii monitoring traffic traffic-analysis

phpnetmap's Introduction

PHPNetMap

README.pt-BR

PHP Software for network device monitoring with SNMP v(1/2c/3) protocol. Tested with 3Com/HP, ProCurve, Dell and Extreme devices. Some other models with SNMP support work properly. Framework yii with Bootstrap Colorpicker and CAdvancedArBehavior. Using JavaScript D3 library to the map.

How It works

The PHPNetMap shows connected hosts based on the FIB or table CAM switches, and ARP table devices. You can perform searches within these tables in various devices with the Search form. With the map view you can check the connections between hosts and each host there is a screen indicating the port status with their respective connected host. You can see the operating status port and status of the Spanning Tree Protocol on switches with dot1dStpPortState OID. Using an SNMP community with read/write permission you can change the ifAdminStatus or set ifAlias

PHPNetMap and Docker

I created a Docker image with all the configuration ready for use PHPNetMap, available in Docker Hub. With the docker-compose.yml in the project root you can download the image and run system only with the command docker-compose up within the directory project. Note server settings to run in production mode (Password in ADMIN_PASSWORD environment variable, for example). Change the docker-compose.yml as necessary.

Installing Docker

curl -ssl https://get.docker.com/ | sh

Create and run a single container

docker run -p 80:80 --name=server1 marcelofmatos/phpnetmap

Open a web browser and access http://<server_ip> or http://localhost if 'docker run' executed in your local machine The HTTP user is 'admin' and password is string set in ADMIN_PASSWORD environment variable.

If you wish run container in other port:

docker run -p 8081:80 --name=server1 marcelofmatos/phpnetmap

And open http://localhost:8081

To manage container:

docker start server1
docker stop server1

Set HTTP user and password:

docker run -p 80:80 --name=server1 -e ADMIN_USER=admin -e ADMIN_PASSWORD=pnm marcelofmatos/phpnetmap

If ADMIN_USER is not set, 'admin' is default value. If ADMIN_PASSWORD is not set, a random value is set and printed on log container.

To show log container

docker logs server1

See more in https://docs.docker.com/engine/getstarted/

Using with docker-compose

Use these comands to install docker-compose

apt-get install python-pip
pip install docker-compose

To run configuration in docker-compose.yml:

docker-compose up

To run especific YML file, like docker-compose-multiple-servers.yml:

docker-compose -f docker-compose-multiple-servers.yml up

Server

The software was tested on Debian and Ubuntu Server with the following installed packages:

  • apache2
  • libapache2-mod-php5
  • php5-snmp
  • php5-sqlite
  • php-apc
  • snmpd
  • sqlite3

The login is set in .htaccess and .htpasswd so apache must be configured to read the instructions

Screenshots

Main page

Home Screenshot

Host and network map

Host Screenshot

Traffic ports

Traffic Screenshot

References

phpnetmap's People

Contributors

marcelofmatos avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

phpnetmap's Issues

ficando Internal Server Error após o login

IErro do Servidor Interno

Oi, eu tentando instalar phpnetmap mas quando eu estou faça o login com usuário e senha padrão que é "admin : test" eu estou recebendo erro interno do servidor

Error 500 Undefined variable: result

I'm getting a lot of these errors running on server without docker.
Any idea what I'm doing wrong?

REQUEST_URI=/phpnetmap/search/index 2020/06/25 15:28:40 [error] [php] Undefined variable: result (/var/www/phpnetmap/protected/views/search/index.php:14) Stack trace: #0 /var/www/phpnetmap/yii/framework/web/CController.php(869): SearchController->renderFile() #1 /var/www/phpnetmap/yii/framework/web/CController.php(782): SearchController->renderPartial() #2 /var/www/phpnetmap/protected/controllers/SearchController.php(42): SearchController->render() #3 /var/www/phpnetmap/yii/framework/web/actions/CInlineAction.php(49): SearchController->actionIndex() #4 /var/www/phpnetmap/yii/framework/web/CController.php(308): CInlineAction->runWithParams() #5 /var/www/phpnetmap/yii/framework/web/CController.php(286): SearchController->runAction() #6 /var/www/phpnetmap/yii/framework/web/CController.php(265): SearchController->runActionWithFilters() #7 /var/www/phpnetmap/yii/framework/web/CWebApplication.php(282): SearchController->run() #8 /var/www/phpnetmap/yii/framework/web/CWebApplication.php(141): CWebApplication->runController() #9 /var/www/phpnetmap/yii/framework/base/CApplication.php(184): CWebApplication->processRequest() #10 /var/www/phpnetmap/index.php(13): CWebApplication->run() REQUEST_URI=/phpnetmap/search/index

Problemas durante a instalação

Após rodar o comando:
curl -sSL https://get.docker.com/ | sh

apresentou o seguinte erro durante a execução do comando:

The following packages have unmet dependencies:
docker-engine : Depends: init-system-helpers (>= 1.18~) but it is not installable
Recommends: aufs-tools but it is not going to be installed
Recommends: cgroupfs-mount but it is not installable or
cgroup-lite but it is not installable
Recommends: git but it is not going to be installed
Recommends: yubico-piv-tool (>= 1.1.0~) but it is not installable
E: Unable to correct problems, you have held broken packages.

Ambiente: Debian 7.7 64bits

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.