Agent scripts are called during host initialization and are used to collect information about the underlying operating system of the remote agent. As default, information about the OS name, its version and the system architecture is collected by internal Java functions. Customized agent scripts can be created and used to change the stored OS information of a host.
Create custom agent script
Custom agent scripts can be created within the web interface. The link to do so can be found in the "Administration" area.
The agent script is called up to three times during host initialization (once per OS property) while the environment variable NP_OSINFORMATION is set each time to the requested value (NAME, VERSION or ARCHITECTURE). So it's possible to create one script for each information and return one fixed value. Nevertheless it's recommended to create one script collecting the needed information regarding to the set environment variable. The returned resp. output value must have a length between 1 and 512 chars, it will be assigned to the corresponding operating system property (Name, Version, Architecture).
The following code can be an example to create an own script. Please note that this example is Linux specific.