New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Veeam backup SNMP Traps #13170
Veeam backup SNMP Traps #13170
Conversation
Please add test data so we can ensure your change is not broken in the future. Read the docs to find out how: https://docs.librenms.org/Developing/os/Test-Units |
|
||
$message = 'SNMP Trap: Backup success - SureBackup Job 1'; | ||
Log::shouldReceive('event')->once()->with($message, $device->device_id, 'backup', 2); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like you are getting an extra log entry the tests don't expect or your log message doesn't match.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mmh, I do not find my issue for a view days. No idea how to debug this test cases :-( Can someone help me?
@mpikzink it helps to capture actual traps for the tests. The ones you added seem to be fabricated, because there was several incorrect things in the test trap strings. |
THX @murrant I will do in my next PRs. I have 2 more trap handlers in the pipeline. Is there a good way to capture? I grabbed it from the devices event log with debugging on and reformatted it. There I did the mistakes. |
How I capture is in snmptrap.php, I write the $text to a file. |
* SNMP Trap Veeam backupjob status * Add onVmBackupJobCompleted * add mib * fix style * fix style * Split backupjob and vm backup * Add Traptest * Fix style * Fit style * typehint on tests * Fix handling empty string * Fix wrong check * Fix styl * Fix style * Update VeeamBackupJobCompleted.php * Update VeeamVmBackupJobCompleted.php * Update VeeamTrapTest.php * Update VeeamTrapTest.php Co-authored-by: Tony Murray <murraytony@gmail.com>
This pull request has been mentioned on LibreNMS Community. There might be relevant details there: |
* SNMP Trap Veeam backupjob status * Add onVmBackupJobCompleted * add mib * fix style * fix style * Split backupjob and vm backup * Add Traptest * Fix style * Fit style * typehint on tests * Fix handling empty string * Fix wrong check * Fix styl * Fix style * Update VeeamBackupJobCompleted.php * Update VeeamVmBackupJobCompleted.php * Update VeeamTrapTest.php * Update VeeamTrapTest.php Co-authored-by: Tony Murray <murraytony@gmail.com>
Log Veeam backup status in eventlog
Please give a short description what your pull request is for
DO NOT DELETE THE UNDERLYING TEXT
Please note
Testers
If you would like to test this pull request then please run:
./scripts/github-apply <pr_id>
, i.e./scripts/github-apply 5926
After you are done testing, you can remove the changes with
./scripts/github-remove
. If there are schema changes, you can ask on discord how to revert.