JackrayWang opened a new issue #14592:
URL: https://github.com/apache/pulsar/issues/14592
## create es sink
```shell
/opt/apache-pulsar-2.9.1/bin/pulsar-admin sinks create \
--archive /root/pulsar-io-elastic-search-2.9.1.nar \
--tenant public \
--namespace default \
--name elasticsearch-test-sink \
--sink-config
'{"elasticSearchUrl":"http://192.168.228.106:9200","indexName":
"my_index","username": "scooby","password": "doobie"}' \
--inputs alert_data
```
## es sink status
```shell
/opt/apache-pulsar-2.9.1/bin/pulsar-admin sinks status --instance-id 0
--name elasticsearch-test-sink --tenant public --namespace default
```
```json
{
"running" : false,
"error" : "",
"numRestarts" : 15,
"numReadFromPulsar" : 0,
"numSystemExceptions" : 0,
"latestSystemExceptions" : [ ],
"numSinkExceptions" : 0,
"latestSinkExceptions" : [ ],
"numWrittenToSink" : 0,
"lastReceivedTime" : 0,
"workerId" : "c-pulsar-cluster-zk-fw-192.168.228.107-8080"
}
```
## start es sink
```shell
/opt/apache-pulsar-2.9.1/bin/pulsar-admin sinks start --instance-id 0 --name
elasticsearch-test-sink --tenant public --namespace default
```
```shell
2022-03-08T10:17:40,505+0800 [AsyncHttpClient-7-1] WARN
org.apache.pulsar.client.admin.internal.BaseResource -
[http://localhost:8080/admin/v3/sink/public/default/elasticsearch-test-sink/start]
Failed to perform http post request: javax.ws.rs.BadRequestException: HTTP 400
Bad Request
Operation not permitted
Reason: Operation not permitted
```
## get all topics
```shell
/opt/apache-pulsar-2.9.1/bin/pulsar-admin topics list public/default
"persistent://public/default/my-topic-partition-0"
"persistent://public/default/testtopic-partition-0"
"persistent://public/default/alert_data"
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]