Emerson/Liebert/Vertiv PDU not showing power graphs for individual ports (2)

The previous post autoclosed a few days ago so i can’t put it in there:

Basically it seems nobody had time to pick this up so I was wondering whether I can do it myself?

I checked the documentation but did not find any info on how to extend existing snmp querying,
so maybe somebody (@laf ?) can provide the basic steps I’d need to follow (and maybe some help along the way)… or a link to a previous topic where this has been done/documented…

If this includes creating webpages and database tables I am prolly in over my head (timewise), but if its as simple as telling the various php scripts to just add a couple of oids to the process then that would be no problem.
I assume/hope its a mix of both, some work but hopefully not weeks. Just have no idea where to start…

Edit: Could it be as simple as adjusting discovery/vertiv-pdu.yaml to include the extra objects?
I could compare it to the avocent.yaml which I know contains a lot of the data I want (different mib references of course but probably adaptable)…
Will this propagate throughout the system or would I need to add all that stuff somewhere else?

Ok, so its basically a ‘new’ OS with the advantage that some of the work is already done.

Will have a more thorough look, thanks

If the OS already exists you can extend it, but sometimes you kind of have to create new ones because different models can differ too much

So things are not as difficult as I feared, the receptables are already working.

— Removed / Resolved issue —

Thanks

— Removed / Resolved issue —

Found the issue, there was still a wrong oid in the definition. Not sure why it was correct on disco though, but nevermind.

Edit2 - Next issue - trying to run the unit tests, but

 lnms dev:check
Lint check skipped.
Style check skipped.
Only checking os: liebert
Running unit check...
PHPUnit 9.5.20 #StandWithUkraine

...............................................................  63 / 656 (  9%)
............................................................... 126 / 656 ( 19%)
............................................................... 189 / 656 ( 28%)
............................................................... 252 / 656 ( 38%)
............................................................... 315 / 656 ( 48%)
............................................................... 378 / 656 ( 57%)
............................................................... 441 / 656 ( 67%)
............................................................... 504 / 656 ( 76%)
............................................................... 567 / 656 ( 86%)
............................................................... 630 / 656 ( 96%)
..............SS......

Time: 01:13.114, Memory: 890.50 MB

OK, but incomplete, skipped, or risky tests!
Tests: 656, Assertions: 5300, Skipped: 2.
success (75.17s)


 lnms dev:check unit -o liebert
Only checking os: liebert
Running unit check...
Starting snmpsim listening on 127.1.6.2:1162...
PHPUnit 9.5.20 #StandWithUkraine

Error in bootstrap script: PDOException:
SQLSTATE[HY000] [1698] Access denied for user 'root'@'localhost'
#0 /opt/librenms/tests/bootstrap.php(54): PDO->__construct()
#1 /opt/librenms/vendor/phpunit/phpunit/src/Util/FileLoader.php(65): include_once('/opt/librenms/t...')
#2 /opt/librenms/vendor/phpunit/phpunit/src/Util/FileLoader.php(49): PHPUnit\Util\FileLoader::load()
#3 /opt/librenms/vendor/phpunit/phpunit/src/TextUI/Command.php(562): PHPUnit\Util\FileLoader::checkAndLoad()
#4 /opt/librenms/vendor/phpunit/phpunit/src/TextUI/Command.php(344): PHPUnit\TextUI\Command->handleBootstrap()
#5 /opt/librenms/vendor/phpunit/phpunit/src/TextUI/Command.php(111): PHPUnit\TextUI\Command->handleArguments()
#6 /opt/librenms/vendor/phpunit/phpunit/src/TextUI/Command.php(96): PHPUnit\TextUI\Command->run()
#7 phpvfscomposer:///opt/librenms/vendor/phpunit/phpunit/phpunit(97): PHPUnit\TextUI\Command::main()
#8 /opt/librenms/vendor/bin/phpunit(118): include('phpvfscomposer:...')
#9 {main}
failed (6.22s)

Not sure thats related to my changes at all?

Sorry to bother you @Jellyfrog but I can’t submit this if I cant fix this;)

I searched some more, see this is a laravel issue… I tried following php - SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: NO) . DB_HOST set to localhost - Stack Overflow to no avail,
I verified root can access mysql, but I dont see why the root user is used at all in this check - my .env file uses librenms…

APP_KEY=base64:...

DB_HOST=127.0.0.1
DB_DATABASE=librenms
DB_USERNAME=librenms
DB_PASSWORD="password with special chars"

Is it my job to dig deeper into this and fix or is that something not under my control?

Anyone else?
@Kevin_Krumm or @murrant maybe?

Well, it certainly isn’t anyone else’s job.

Getting Started - LibreNMS Docs if you want to fix your issue with running tests locally.

Lol,

so its a problem with my local stack and not a generic one.
Happy to look into it then or try on a fresh install.

Thanks.

You set the wrong variables for testing. It’s DB_TEST_HOST or similar. Check the config folder

1 Like

Still planing on looking into this when i find time. Next vacation probably.
Just commenting to keep this alive;)

Ok, after an arduous experience I finally submitted # 14745.
I hope it contains all that you need.

For self reference (or documentation improvement)

  1. Don’t use an existing installation of LibreNMS, start with a fresh box
  2. Set up Librenms prereqs
  3. Set up Git, clone librennms master, get oauth token (
  4. Configure/perform actual installation/configuration
  5. Make code changes
  6. Create test data
  7. Push changes
  8. Create pull request in GitHub WebUI

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.