* **host**: (optional) The value to populate in the host field * for events from this data input.
* **host_regex**: (optional) A regular expression used to * extract the host value from each event.
* **source**: (optional) The source value to fill in the * metadata for this input's events.
* **sourcetype**: (optional) The sourcetype to apply to * events from this input.
* } * @throws Splunk_IOException * @link http://docs.splunk.com/Documentation/Splunk/latest/RESTAPI/RESTinput#receivers.2Fsimple */ public function submit($data, $args=array()) { $this->service->getReceiver()->submit($data, array_merge($args, array( 'index' => $this->getName(), ))); } /** * Creates a stream for logging events to the specified index. * * It is highly recommended to specify a sourcetype explicitly. * * It is slightly faster to use {@link Splunk_Receiver::attach()} * to accomplish the same task. One fewer network request is needed. * * The returned stream should eventually be closed via fclose(). * * @param array $args (optional) {
* **host**: (optional) The value to populate in the host field * for events from this data input.
* **host_regex**: (optional) A regular expression used to * extract the host value from each event.
* **source**: (optional) The source value to fill in the * metadata for this input's events.
* **sourcetype**: (optional) The sourcetype to apply to * events from this input.
* } * @return resource A stream that you can write event text to. * @throws Splunk_IOException * @link http://docs.splunk.com/Documentation/Splunk/latest/RESTAPI/RESTinput#receivers.2Fstream */ public function attach($args=array()) { return $this->service->getReceiver()->attach(array_merge($args, array( 'index' => $this->getName(), ))); } }