10-16-2019
here the real log ,
Quote:
2019-10-16 00:00:00,993|32|10.10.10.10|p1209|testing|testing456|p12091910160000004545714090|638221234567|1|F04| NotEligibleMinAmount|NotEligibleMinAmount;msisdn=62812560454
57;promo_id=1296;delta=0;shortcode=link_miri_cust;req_amount=20000;req_channel=API;req_credit=628125 6045457;req_debit=;req_number=6JF7IBD6IB;mode=v1;req_timestamp=20191015235959;req_fee=;insert=[insert];ReasonType=10003367;rewards_insert=[rewards_insert];rewards_notif=[rewards_notif];additional_rewards=[additional_rewards];additional_rewards_resp=[additional_rewards_resp
];sms_resp=[sms_resp];continue=[continue];inject_result=0;topic=cashin;rewards_id=1329;rewards_type=[rewards_type];rewards_name=[rewards_name];rewards_value_type=[_amount_type];rewards_val
ue=[_amount_value];rewards_resp=[doRequest];sql_eligible=[sql_eligible];budget_sc=-;quota_exceed=[quota_exceed];location=[json_area.kabupaten];los=0;code=[code];voucher_log=[voucher_log];s
tep=[step];solr_fail_url=;req_nominal=2000000;error_solr=;partner_shortcode=;notif_resp=[notif_resp];notif_bonbal=[resp_notif_bonbal];notif=[_notification];syariah=0:[syariah_exist];pendin
g_shortcode=[shortcode_exist];version=22|NotEligibleMinAmount|null|10.10.10.10
2019-10-16 00:00:01,154|22|10.10.10.10|p1209|testing123|testing456|p12091910160000019377314091|63822123456|1|F0 2|OutsideDateRange|OutsideDateRange;msisdn=6282225493773;promo
_id=1200;delta=0;shortcode=link_bari_cust;req_amount=135000;req_channel=API;req_credit=6282225493773 ;req_debit=;req_number=6JG2IBD6YA;mode=v1;req_timestamp=20191016000000;req_fee=;insert=[insert];ReasonType=10002829;rewards_insert=[rewards_insert];rewards_notif=[rewards_notif];additional_rewards=[additional_rewards];additional_rewards_resp=[additional_rewards_resp];sms_resp=
[sms_resp];continue=[continue];inject_result=0;topic=cashin;rewards_id=1252;rewards_type=[rewards_type];rewards_name=[rewards_name];rewards_value_type=[_amount_type];rewards_value=[_amount
_value];rewards_resp=[doRequest];sql_eligible=[sql_eligible];budget_sc=-;quota_exceed=[quota_exceed];location=[json_area.kabupaten];los=0;code=[code];voucher_log=[voucher_log];step=[step];
solr_fail_url=;req_nominal=13500000;error_solr=;partner_shortcode=;notif_resp=[notif_resp];notif_bonbal=[resp_notif_bonbal];notif=[_notification];syariah=0:[syariah_exist];pending_shortcod
e=[shortcode_exist];version=22|OutsideDateRange|null|10.10.10.10
Thanks
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
How would you convert lets say a 1000 minutes to hours, minutes, seconds (1 Reply)
Discussion started by: Vozx
1 Replies
2. UNIX for Dummies Questions & Answers
Hi All,
I am new to unix programming. I am trying for a requirement and the requirement goes like this.....
I have a test folder. Which tracks log files. After certain time, the log file is getting overwritten by another file (randomly as the time interval is not periodic). I need to preserve... (2 Replies)
Discussion started by: mailsara
2 Replies
3. Shell Programming and Scripting
HI Everyone,
My task is to search error messages last 10 minutes everytime from a log file.
My script,
date1=`date -d '10 minutes ago' "+%H:%M:%S"`
date2=`date "+%H:%M:%S"`
awk -v d1="${date1}" -v d2="${date2}" '$0~d1{p=1} $0~d2{p=0} p' filename
No error getting in... (3 Replies)
Discussion started by: ctscbe
3 Replies
4. Shell Programming and Scripting
Hi Friends,
I have the following logfile. Currently time in india is 07/31/2014 12:33:34 and i have the following content in logfile. I want to display only those entries which contain string 'Exception' within last 3 hours. In this case, it would be the last line only
I can get the... (12 Replies)
Discussion started by: srkmish
12 Replies
5. Shell Programming and Scripting
I am trying to accomplish following tasks in my KSH script:
Run a sql script on multiple $ORACLE_SID at once
Sends an alert only if the threshold > 2 for any of the $ORACLE_SID
Please advice as to how I can approach this!!
Thanks in advance! (1 Reply)
Discussion started by: jd_2000
1 Replies
6. Shell Programming and Scripting
Hello ,
I am working on AIX. I have to convert Unix timestamp to normal timestamp. Below is the file. The Unix timestamp will always be preceded by
EFFECTIVE_TIME as first field as shown and there could be multiple EFFECTIVE_TIME in the file : 3.txt
Contents of... (6 Replies)
Discussion started by: rahul2662
6 Replies
7. Shell Programming and Scripting
So basically I have a log file and each line in this log file starts with a timestamp:
MON DD HH:MM:SS
SEP 15 07:30:01
I need to grep all the lines between last hour timestamp and current timestamp. Then these lines will be moved to a tmp file from which I will grep for particular strings. ... (1 Reply)
Discussion started by: nms
1 Replies
8. UNIX for Beginners Questions & Answers
Hi, please help with below time conversion to minutes.
one column values:
2 minutes 16 seconds 420 msec
43 seconds 750 msec
0 days 3 hours 29 minutes 58 seconds 480 msec
11 seconds 150 msec
I need output in minutes(total elapsed time in minutes) (2 Replies)
Discussion started by: ramu.badugula
2 Replies
9. Shell Programming and Scripting
Hi all,
System Ubuntu 16.04.3 LTS
i have the following log
INFO 2019-02-07 15:13:31,099 module.py:700] default: "POST /join/8550614e-3e94-4fa5-9ab2-135eefa69c1b HTTP/1.0" 500 2042
INFO 2019-02-07 15:13:31,569 module.py:700] default: "POST /join/6cb9c452-dcb1-45f3-bcca-e33f5d450105... (15 Replies)
Discussion started by: charli1
15 Replies
10. Shell Programming and Scripting
Hello all,
Info:
System RedHat 7.5
I need to create a script that based on the creation time,
if the file is older then 5 minutes then execute some stuff, if not exit.
I thought to get the creation time and minutes like this.
CreationTime=$(stat -c %y /tmp/test.log | awk -F" " '{ print... (3 Replies)
Discussion started by: charli1
3 Replies
LEARN ABOUT PHP
mongodbdriverbulkwrite
MONGODBDRIVERBULKWRITE(3) 1 MONGODBDRIVERBULKWRITE(3)
The MongoDBDriverBulkWrite class
INTRODUCTION
The MongoDBDriverBulkWrite collects one ore more write operations that should be sent to the server in writees.
The MongoDBDriverManager has 3 wrapper methods for single-item writees for simplicity:
o MongoDBDriverManager::executeInsert
o MongoDBDriverManager::executeDelete
o MongoDBDriverManager::executeUpdate
along with the main method to execute a write: MongoDBDriverManager::executeBulkWrite
When constructing a write, you must define if the write should be executed in order (default), or if it can be reordered by the server.
Ordered write write operations are sent to the server, in the order provided, for serial execution. If a write fails, any remaining opera-
tions will be aborted.
Unordered operations are sent to the server in arbitrary order where they may be executed in parallel. Any errors that occur are reported
after all operations have been attempted.
CLASS SYNOPSIS
MongoDB0
final
MongoDB0ntable
Methods
o public MongoDBDriverBulkWrite::__construct ([boolean $ordered = true])
o public int MongoDBDriverBulkWrite::count (void )
o public void MongoDBDriverBulkWrite::delete (array|object $filter, [array $deleteOptions])
o public MongoDBDriverObjectID MongoDBDriverBulkWrite::insert (array|object $document)
o public void MongoDBDriverBulkWrite::update (array|object $filter, array|object $newObj, [array $updateOptions])
EXAMPLES
Example #1
Mixed write operations sent in groupped writees
Mixing write operations (insert/update/delete) will create internal sub-writees and will be sent sequentially to the server.
<?php
$write = new MongoDBDriverBulkWrite(true);
$write->insert($a);
$write->update($b, $obj);
$write->update($c, $obj);
$write->insert($d);
$write->insert($e);
$write->delete($f);
?>
Will result in 4 writes (round-trips) being executed.
Example #2
Ordered BulkWrite causing error
<?php
$write = new MongoDBDriverBulkWrite(false);
$write->delete([]);
$write->insert(["_id" => 1]);
$write->insert(["_id" => 2]);
$write->insert(["_id" => 3, "hello" => "world"]);
$write->update(["_id" => 3], ['$set' => ["hello" => "earth"]]);
$write->insert(["_id" => 4, "hello" => "pluto"]);
$write->update(["_id" => 4], ['$set' => ["hello" => "moon"]]);
$write->insert(["_id" => 3]);
$write->insert(["_id" => 4]);
$write->insert(["_id" => 5]);
$manager = new MongoDBDriverManager("mongodb://localhost:27017");
$writeConcern = new MongoDBDriverWriteConcern(MongoDBDriverWriteConcern::MAJORITY, 1000);
try {
$result = $manager->executeBulkWrite("databaseName.collectionName", $write, $writeConcern);
} catch(MongoDBDriverDuplicateKeyException $ex) {
$result = $ex->getWriteResult();
printf("Inserted %d document(s)
", $result->getInsertedCount());
printf("Updated %d document(s)
", $result->getModifiedCount());
/* If the WriteConcern could not be fullfilled */
if ($writeConcernError = $result->getWriteConcernError()) {
printf("%s (%d): %s
",
$writeConcernError->getMessage(),
$writeConcernError->getCode(),
var_export($writeConcernError->getInfo(), true)
);
}
/* If the write could not happen at all */
foreach ($result->getWriteErrors() as $writeError) {
printf("Operation#%d: %s (%d)
",
$writeError->getIndex(),
$writeError->getMessage(),
$writeError->getCode()
);
}
} catch(MongoDBDriverAuthenticationException $ex) {
} catch(MongoDBDriverConnectionException $ex) {
} catch(MongoDBDriverRuntimeException $ex) {
}
?>
The above example will output:
Inserted 4 document(s)
Updated 2 document(s)
Operation#7: E11000 duplicate key error index: databaseName.collectionName.$_id_ dup key: { : 3 } (11000)
If the WriteConcern could not be fullfilled, the example above would output something like:
Inserted 4 document(s)
Updated 2 document(s)
waiting for replication timed out (64): array (
'wtimeout' => true,
)
Operation#7: E11000 duplicate key error index: databaseName.collectionName.$_id_ dup key: { : 3 } (11000)
Executing the same example, changing the order to false:
<?php
$write = new MongoDBDriverBulkWrite(false);
/* ... */
?>
The above example will output:
Inserted 5 document(s)
Updated 2 document(s)
Operation#7: E11000 duplicate key error index: databaseName.collectionName.$_id_ dup key: { : 3 } (11000)
Operation#8: E11000 duplicate key error index: databaseName.collectionName.$_id_ dup key: { : 4 } (11000)
SEE ALSO
o MongoDBDriverManager::executeBulkWrite
oMongoDBDriverWriteResult
oMongoDBDriverWriteConcern
oMongoDBDriverWriteConcernError
oMongoDBDriverWriteError
PHP Documentation Group MONGODBDRIVERBULKWRITE(3)