Jump to content

You know what is a funny thing missing?


yggdrasil

Recommended Posts

I always found this not only odd but funny in WHMCS.

 

While there are API's and hooks for almost most the important features, there is absolutely not a single API available for network incidents/status. I find this particular amusing since most of the status pages and systems the first and main feature they promote is webhooks, API's, etc so you can post updates as fast as possible and from what ever system your IT team is using.

 

The network status incident page in WHMCS is mostly useless if you can't post incidents from external systems (monitoring, automation platforms, etc) without tapping into the database. I guess its not getting much love because WHMCS is it not using it themselves. But lets not forget the core name of WHMCS comes from Web Host Manager Complete Solution and so posting network or service incidents should still be something important.

Link to comment
Share on other sites

There's a lot of Hook/API points missing. What you've mentioned really doesn't qualify as one of them.

As you, yourself mentioned, you can simply write up a query to update tblnetworkissues . There's no need for a Hook/API here.

The system isn't getting much use, because, honestly, it's worthless. Most people use external systems which are much more reliable and provide actual functionality.

Link to comment
Share on other sites

Do you mean something like this? http://docs.whmcs.com/Hooks:NetworkIssueAdd

 

Look under Support Tools at http://docs.whmcs.com/Hooks:Index

 

Ok now I'm embarrassed.

:twisted:

I searched the API not once, but 3 times this year for that. I never figured out it was under the admin category.

 

- - - Updated - - -

 

There's a lot of Hook/API points missing. What you've mentioned really doesn't qualify as one of them.

As you, yourself mentioned, you can simply write up a query to update tblnetworkissues . There's no need for a Hook/API here.

The system isn't getting much use, because, honestly, it's worthless. Most people use external systems which are much more reliable and provide actual functionality.

 

Its not the same. There is a reason why softwares have an API. To talk and connect to other systems/software/users.

 

Sure, you can just tap the database directly and do what ever you want with the data, but why do you think there is an API and is usually preferred?

 

Tapping the database means you need local access. What about external software? A mobile app, another software in another server that does not have access to the MySQL database? API.

 

Tapping the database is also dangerous. Unless you know exactly what your code does, not only it can introduce security issues, but you can end up screwing something in the tables. Again, API is safer as it makes all the checks for you.

 

There are other reasons of course, but usually you would only touch and interact with the database if there is no other way around doing something. If you go with the API its usually for a reason. And most of the times its because you need to run them from somewhere else (out of the WHMCS server and MySQL database). Even if you are running things internally in the same server, the local API will still provide benefits instead of doing your own scripts that talk to the database.

 

EDIT: Ok those are hooks. Not API calls.

 

My experience with hooks in WHMCS is not the best. I don't like them because you need to be running them all the time for some things. They conflict with other stuff (other hooks depending on the order they are executed) and its just not efficient to check for a hook on each action for some things. I would still prefer the API which means I can execute it only when I want.

Edited by yggdrasil
Link to comment
Share on other sites

You could simply a cron every minute from WHMCS to "ping" your external monitoring systems and determine if everything is ok. As soon as you find that there's an issue, automatically create an event in Network Issues (it should be a question of 2 queries) with a predefinite title and description including also all relevant informations. Many years ago I was using Hyperspin and Pingdom to monitor my servers and websites and I used this approach to automatically perform several actions on my WHMCS based on external "service status" / "uptime" pages provided by Hyperspin and Pingdom. It works.

Link to comment
Share on other sites

Its not the same. There is a reason why softwares have an API. To talk and connect to other systems/software/users.

Actually it is very much the same.

 

why do you think there is an API and is usually preferred?

It's only preferred by those that don't know what they're doing, the lazy ones that want the quick solutions.

 

Tapping the database means you need local access.

Not correct

 

Tapping the database is also dangerous.

So is getting in the car and driving to work every morning. In fact, that is more dangerous than 'tapping into the database'.

 

Unless you know exactly what your code does, not only it can introduce security issues, but you can end up screwing something in the tables. Again, API is safer as it makes all the checks for you.

And therein lies the problem. You don't know what you're doing, so you shouldn't be messing with anything development wise.

 

An API is a lazy man's way to do something. Learn to develop effective code without relying on the API / Hooks.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated