Skip to content
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

fix: Add consistent output of name and app_id to Poller for all Applications (fixes #13641) #13648

Merged
merged 5 commits into from
Jan 6, 2022

Conversation

westerterp
Copy link
Contributor

This PR fixes not only #13641, but standardizes the way the output of each Application polling starts.
Each Application will now first output the Application name and app_id before any application-specific output starts.

Every Application has been checked. There was quite some inconsistency.

  • If no echo statement was found, it was added
  • Some Applications only printed the name, but not the app_id, the app_id's have been added to the echo
  • The echo now always uses the $name variable and not hardcoded values
  • The use of d_echo debug function was removed.

DO NOT DELETE THE UNDERLYING TEXT

Please note

Please read this information carefully. You can run ./lnms dev:check to check your code before submitting.

  • Have you followed our code guidelines?
  • If my Pull Request does some changes/fixes/enhancements in the WebUI, I have inserted a screenshot of it.
  • If my Pull Request makes discovery/polling/yaml changes, I have added/updated test data.

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.

@CLAassistant
Copy link

CLAassistant commented Jan 3, 2022

CLA assistant check
All committers have signed the CLA.

@murrant
Copy link
Member

murrant commented Jan 4, 2022

I like the idea, but wouldn't it be better to output this in applications.inc.php so we don't have to modify every application?

@westerterp
Copy link
Contributor Author

Thanks for the suggestion!
That would make a lot more sense indeed.
Although if we do that, we won't have access to the Application name, but this was solved by using the app_type from the database

Copy link
Member

@laf laf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Jellyfrog Jellyfrog merged commit 8a6f158 into librenms:master Jan 6, 2022
@librenms-bot
Copy link

This pull request has been mentioned on LibreNMS Community. There might be relevant details there:

https://community.librenms.org/t/22-1-0-changelog/17974/1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants