Check out the
headlines
headlines
The created_at() function
returns the date that a node was created.
The created_at() function returns a string and takes one parameter:
string created_at(tree input)
Query: When was the last time the traffic was observed?
SELECT created_at(interface) FROM /network/device
Results: Depending on the database, this query returns results similar to this:
row created_at(interface) 2008-04-17T00:08:13.497360Z row created_at(interface) 2008-04-17T03:55:08.933126Z row created_at(interface) 2008-04-17T23:09:22.560774Z . . .
Query: When was each installed software node created?
SELECT name, created_at(name) FROM /network/device/wmi/win32_product WHERE installdate > '20080101'
Results: Depending on the database, this query returns results similar to this:
row name Altoworks Crawler created_at(name) 2008-04-19T00:35:30.670602Z row name Windows Media Encoder 9 Series created_at(name) 2008-05-05T22:21:17.984139Z row name Microsoft .NET Framework 2.0 Service Pack 1 created_at(name) 2008-05-05T22:21:17.984139Z . . .
Query: When were the system nodes with low disk space first created?
SELECT created_at(systemname) FROM %free disk space% WHERE freespace < 1000000000 AND description = 'Local Fixed Disk'
Results: Depending on the database, this query returns results similar to this:
row created_at(systemname) 2008-06-06T22:31:32.233309Z row created_at(systemname) 2008-06-06T22:24:22.257788Z row created_at(systemname) 2008-06-11T21:20:39.000000Z row created_at(systemname) 2008-06-10T01:05:26.000000Z
To see other PQL functions, see Functions.