CPU Usage Alert

How would I create an alert rule for CPU Usage for networking equipment?

Let’s say I want an alert if the CPU Usage is equal to or above 40%.

Have a look at the sheet rules collection on GitHub
https://github.com/librenms/librenms/blob/master/misc/alert_rules.json

There is a rule for that.
An easier way is to check out the collection button in the UI where you can add rules from the collection to your installation.

Yes also in the docs. https://docs.librenms.org/#Alerting/

How to batch upload to the librenms?