c-lightning by itself does not expose it's RPC over the network. This is to avoid having to dictate what kind of authorization and authentication to use in order to provide access control.
There are however a couple of options that are easy to implement and will do what you want:
- Implement a small proxy plugin that'll export the information you need over HTTP and then just retrieve that info from your analysis machine. It'd just take a couple of lines with pyln and flask for example and since there is not write access you're good to go.
- Use
socat
to expose the RPC Unix socket over TCP and then use any JSON-RPC library you'd like. Simple, but may require a.bit of care since now your exposing read write access on an unauthenticated and unencrypted network connection.
- Use an existing rpc proxy such as sparko to expose the RPC over whatever your favorite rpc protocol is.
In your case I'd go for the first option, since you're likely just using read only access and you can do some filtering and processing on the node reducing the amount of data that needs to be transferred.