did anyone manage to properly enable billing auto add? What I’m trying to achieve is to create bill for every customer port that is properly descriped including speed.
For example, I have port with description: Cust: Customer1 [100Mbps] {12345678} (Customer physical Address)
If I understand correctly, after setting in config.php:
$config[‘enable_billing’] = 1;
$config[‘billing’][‘customer_autoadd’] = 1;
$config[‘billing’][‘bill_autoadd’] = 1;
bills should be created for every customer using speed and notes part of port description. Or did I understand this wrong?
defaults file was place where I found that info. I hope that isn’t leftover, although until we have this case resolved, I think I’ll write my own script to add bills for every customer port
Any luck with this? I’m looking to do the same but did not know there was a bill “auto add” feature as I do not see it in the documentation or the WebUI. I thought the only way to do it was manually through the API.
hi, I suppose my script won’t be of much help for you as it’s highly customized for my organization needs, but I can give you a brief description how it works
connect to librenms database
check for customer parsed ports (this is in my case most important step as thanks to LibreNMS I standardized interface descriptions allowing me to get rid of much hassle writing proper code in script)
check billing table if we have already proper pairs: customer name = bill name, customer bandwidth = bill cdr (95th percentile in my case), customer circuit ID = billing reference, customer address = billing notes
if there is any difference regarding point 3, I can either create new bill, modify or delete existing one, depending on my needs (for example I want to save bill history when only CDR changes)
Summarizing, what I achieved is complete automatic billing including changing and deleting outdated
ps. when script see that there is bill with note having word “custom” inside, it leaves it as is. I may want to add something on my own to billing system.
Even though the script is heavily customised it would help greatly with getting started with the automatic billing and incorporate that with LibreNMS as a new function. Is there any possibility that we can get the script that you have made?
I have created a script that only relies on LibreNMS API, you have to change some settings before using it. You can find it here https://github.com/mp4lm/billing_librenms