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

Request: enhance MONIT app #616

Closed
GOUKI9999 opened this issue Apr 4, 2023 · 7 comments
Closed

Request: enhance MONIT app #616

GOUKI9999 opened this issue Apr 4, 2023 · 7 comments
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@GOUKI9999
Copy link
Contributor

GOUKI9999 commented Apr 4, 2023

Heimdall's newest version, Nginx

The MONIT app (https://mmonit.com/monit/) is working well on my Linux server. I want to add it as an app in Heimdall like other services, but it failed. After I filled in the username and password, clicking the test button showed me "Failed: Invalid credentials."

If I filled the Website (above) with the URL http://user:pass@ip:port/ and clicked Go, it seemed to return the correct message (icon).

The Monit service is running well, and I can log in to the web service through Chrome. I checked the IP, port, and password that I filled in Heimdall, and I think there are no errors. On the same server, I added services as apps such as Plex, Transmission, qBittorrent, Netdata, and so on. Their APIs are working well, but Monit's is not.

I tried downloading the Monit app zip from https://apps.heimdall.site/applications/enhanced. I got the Monit.zip with the date 22/11/18, and I tried putting it into \Heimdall\app\SupportedApps\ and extracting it to \Heimdall\app\SupportedApps\Monit.

However, it still doesn't work.

@mvdkleijn
Copy link
Collaborator

I looked at the code for the monit enhancement and it tries to connect to status.

So if you fill in a URL like http://ip:port/ it will try to connect to http://ip:port/status.

A quick glance at the MMonit docs however, suggest that the correct endpoint would be something like http://ip:port/api/v2/status. I don't have monit to test that, but you should be able to do so by updating the URL accordingly.

However, even then it might not return the proper values from what I see.

If that indeed works, we could update the app.

@GOUKI9999
Copy link
Contributor Author

GOUKI9999 commented Jan 24, 2024

I looked at the code for the monit enhancement and it tries to connect to status.

So if you fill in a URL like http://ip:port/ it will try to connect to http://ip:port/status.

A quick glance at the MMonit docs however, suggest that the correct endpoint would be something like http://ip:port/api/v2/status. I don't have monit to test that, but you should be able to do so by updating the URL accordingly.

However, even then it might not return the proper values from what I see.

If that indeed works, we could update the app.

sure,I tried use "http://ip:port/api/v2/" replaced "http://ip:port/" ,and it return the "Invalid credentials"yet.
If I opened the http://ip:port/api/v2/status page ,it just a "not found" 404 page

@mvdkleijn
Copy link
Collaborator

I have some bad news. I believe the Monit app has not been properly implemented (in Heimdall) in the past. There does not appear to be any logic retrieving data from Monit, nor does it appear to try to authenticate.

I could probably implement it as the Monit API appears fairly straightforward but I'd have to setup a Monit instance to test it properly. As I already spent an entire day working through the issue and PR backlog, I am fairly busy the rest of this week and weekend at least. So no promises on when I might be able to do this.

In any case, with the app's current state it is impossible to get the enhanced part of it working.

You are welcome to try to implement it yourself or maybe someone else reading this can lend a hand.

As a side note: I didn't notice this before, but you said you downloaded the app from the site and tried to put it in SupportedApps. Please do not do that. The downloads on the site are templates meant for developers to implement app support in Heimdall. It is not necessary to download anything manually if the app is supported by Heimdall. I will see if I can clarify that on the site / wiki somehow.

@mvdkleijn mvdkleijn added enhancement New feature or request help wanted Extra attention is needed good first issue Good for newcomers labels Jan 25, 2024
@mvdkleijn mvdkleijn changed the title MONIT app dosen't work with api Failed: Invalid credentials Request: enhance MONIT app Feb 16, 2024
@LinuxServer-CI
Copy link

This issue has been automatically marked as stale because it has not had recent activity. This might be due to missing feedback from OP. It will be closed if no further activity occurs. Thank you for your contributions.

2 similar comments
@LinuxServer-CI
Copy link

This issue has been automatically marked as stale because it has not had recent activity. This might be due to missing feedback from OP. It will be closed if no further activity occurs. Thank you for your contributions.

@LinuxServer-CI
Copy link

This issue has been automatically marked as stale because it has not had recent activity. This might be due to missing feedback from OP. It will be closed if no further activity occurs. Thank you for your contributions.

@mvdkleijn mvdkleijn closed this as not planned Won't fix, can't repro, duplicate, stale May 16, 2024
@GOUKI9999
Copy link
Contributor Author

I submitted PR #761 to fix the auth issue and added dropdown options in the configuration for data selection.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
Archived in project
Development

No branches or pull requests

3 participants