Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Recreating hash

by NetWallah (Abbot)
on Sep 12, 2012 at 05:29 UTC ( #993137=note: print w/ replies, xml ) Need Help??


in reply to Recreating hash

Here you go - Hash creation code:

use strict; use warnings; my %hash =( 'alerts' => [ { 'min_failure_count' => '3', 'status_history' => { 'status' => [ 1, 1, 1, 0, 0, 0, 1, 1, 0, 0 ], 'ts' => [ 1347395526, 1347395226, 1347394926, 1347394626, 1347394326, 1347394026, 1347393726, 1347393426, 1347393126, 1347392826 ] }, 'status_code' => 1, 'original_status_code' => 'BAD', 'dimensions' => { 'cluster' => '1', 'filesystem' => '/', 'hostgroup' => 'hiho', 'service' => 'system.fs-us +ed_pct', 'host' => 'limonata' }, 'best_group' => 'NO GROUP', 'timestamp' => 1347395226, 'text' => '95.019 (value) > 95 (max limit +) between Tue 20:19 - Tue 20:2+0 (UTC)', 'check_type' => 'system.fs-used_pct', 'window_size' => '3' } ], 'bad_alerts' => 1, 'recovery_alerts' => 0 );
My guess is that you were looking for the parens ().

             I hope life isn't a big joke, because I don't get it.
                   -SNL


Comment on Re: Recreating hash
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://993137]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (5)
As of 2014-08-29 02:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (275 votes), past polls