Giter Site home page Giter Site logo

matoh12 / mrtg-admin-dashboard Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 1.67 MB

MRTG PHP admin

Home Page: https://blog.mhasin.eu

PHP 57.89% CSS 19.04% JavaScript 4.72% Hack 0.12% SCSS 15.88% HTML 2.35%
mrtg mrtgphp mrtgadmin mrtg-admin mrtgdash mrtg-dashboard

mrtg-admin-dashboard's Introduction

MRTG,switchmap php admin

MRTG admin structure

Install package debian/ubuntu:

apt install mrtg apache2 php php-mysql mariadb-server mariadb-client composser

Install script for generate MRTG configuration from MySQL database:

mkdir /var/www/mrtg

Web admin install: Copy data from git to web root directrory.

cd /var/www/
git clone https://github.com/matoH12/MRTG-admin-DASHBOARD.git .
mysql -u root mrtgadmin < admin/mrtgadmin.sql

Setting password for MYSQL in file:

  1. index.php
function lokalita($id_budova)
{
$mysqli = new mysqli("localhost", "admin", 'yabFidth3', "mrtgadmin");
...
  1. admin/config/config.php
|--------------------------------------------------------------------------
| DATABASE CONFIGURATION
|--------------------------------------------------------------------------
 */

define('DB_HOST', "localhost");
define('DB_USER', "admin");
define('DB_PASSWORD', "yadFidth");
define('DB_NAME', "mrtgadmin");

Default credential for local account:

User: admin
Password: admin

MYSQL config admin account

For authenticate you can use keaycloak sso system over openid protocol. Configure credential in:

authenticate.php

$provider = new Stevenmaguire\OAuth2\Client\Provider\Keycloak([
    'authServerUrl'         => 'https://sso.local.sk/auth',
    'realm'                 => 'realm1',
    'clientId'              => 'mrtg.local.sk',
    'clientSecret'          => '39d50b9d-22a4-49af-9049-587547247391',
    'redirectUri'           => 'https://mrtg.local.sk/admin/authenticate.php',
//    'encryptionAlgorithm'   => 'RS256',                             // optional
//    'encryptionKeyPath'     => '../key.pem'                         // optional
//    'encryptionKey'         => 'contents_of_key_or_certificate'     // optional
]);

This project use for authenticate this dictiornary:

https://github.com/stevenmaguire/oauth2-keycloak

Cron settings:

30 0 * * * php /var/www/html/mrtg.local.sk/admin/script/mrtggen.php
30 1 * * * php /var/www/html/mrtg.local.sk/admin/script/scansnmp.php

30 1 * * * php /var/www/html/local.sk/admin/script/scansnmp.php
1 2 * * * php /script/switchmapfrommysql.php
44 * * * * /var/www/html/switchmap.local.sk/ScanSwitch.pl
49 * * * * /var/www/html/switchmap.local.sk/GetArp.pl
01 3 * * * /var/www/html/switchmap.local.sk/SwitchMap.pl

Title page MRTG

Administration:

Administration

mrtg-admin-dashboard's People

Contributors

matoh12 avatar

Watchers

 avatar

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.