Your problem is you are sending a post request with 'config.json' as the body not the contents of that file. I believe in order to tell curl to read the file prefix it with an @
curl -X POST --data @config.json http://localhost:8500/v1/catalog/register
However you may hit another problem. Recently I was trying to do something similar, register a check remotely using catalog/register end point and although the request worked and the check registered with a few seconds the agent anti entropy kick in and removed the check. I think you will find a similar issue as with the IP address reverting to what the agent was configured with.
--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
GitHub Issues: https://github.com/hashicorp/consul/issues
IRC: #consul on Freenode
---
You received this message because you are subscribed to the Google Groups "Consul" group.
To unsubscribe from this group and stop receiving emails from it, send an email to consul-tool...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/consul-tool/40a9da87-37c0-4a2c-986e-24d1948e8926%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To view this discussion on the web visit https://groups.google.com/d/msgid/consul-tool/CAHp%3D8aUmMx3Px9pgq65fbxf1x%2BRVZyprrxO_Z-kXnS96FsKp4Q%40mail.gmail.com.
You received this message because you are subscribed to a topic in the Google Groups "Consul" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/consul-tool/hN_tWGYAnZ0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to consul-tool...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/consul-tool/CAGoWc05dqrg6E-48qx3LGUM-VLN7DyN3KhSSjtHVmUM9y-fJpw%40mail.gmail.com.