Skip to end of metadata
Go to start of metadata

The module automatically displays network graphs when you add a switch in NOC-PS and assign the ports to the corresponding servers. If you don't have your own switch, but your data center provides an API for querying bandwidth usage, you can use the "nocpsforwhmcs_customBandwidthGraph" function to query the data and create a graph.

This function refers exclusively to the output of the network graphs. To measure the bandwidth consumption as well, use the following function: External Bandwidth Collection Function

How to integrate custom network graphs

The function can be activated via customconfig.php, which can be found in the directory "/modules/servers/dedicated/"

  • Navigate into the directory /modules/servers/dedicated/
  • Open the file customconfig.example.php and copy the function "nocpsforwhmcs_customBandwidthGraph". Also copy the function_exists check.
  • Open the file customconfig.php, or create the file if it does not exist and insert the copied code.
  • Adjust the code accordingly. The function must return either a link to an image (png/jpg/svg) or a base64 encoded image.

  • No labels