The below example creates a Solaris pkg from the Nagios application, you can then publishes the pkg to a Solaris repository.
Note: To see how-to publish this pkg to a Solaris repository click here
Extract legacy pkg to temp directory
1 2 3 |
mkdir nrpe-pkg-source nagios-plugins-pkg-source pkgtrans nagios-plugins-1.4.16-sol10-i386-local nagios-plugins-pkg-source pkgtrans nrpe-2.14-sol10-i386-local nrpe-pkg-source |
Create a directory with all files being used for example nagios.
Then under this directory create all sub directory’s like if its the system root, exmaple below
1 2 3 |
mkdir nagios-x86 mkdir nagios-x86/opt mkdir nagios-x86/opt/nagios |
Create mainfest with all pkg info (look below for example)
1 |
pkgsend generate -u nagios |
Now to transfer to the final repo
1 2 3 4 5 6 7 8 9 10 11 |
#create repo (can be zfs file system) pkgrepo create nagios-repo #set repo's name pkgrepo -s nagios-repo set publisher/prefix=nagios #publish pkg to repo with manfiest file pkgsend -s nagios-repo publish -d nagios nagios_manifest.p5m #download/arcihve pkg as p5p for delivrey pkgrecv -s nagios-repo -a -d nagios.p5p nagios #publish final pkg pkgrecv -d /var/mnt/virtlibs/1451311412517/af636d06-33cb-44e0-9ecb-5f4046233370/data -s /tmp/idr793.1.p5p "*" pkgrepo refresh -s /var/mnt/virtlibs/1451311412517/af636d06-33cb-44e0-9ecb-5f4046233370/data |
Note: to test
1 2 |
pkg set-publisher -p nagios-repo pkg install nagios |
To retrieve the package from the repo in a raw format
1 |
pkgrecv -s http://10.10.10.10:11000/solaris --raw -d nagios nagios@1.3 |
Note: to remove any file or service just remove the line fro the manifest
Helpful links
https://www.joyent.com/blog/installing-svr4-packages-on-smartos
http://www.oracle.com/technetwork/articles/servers-storage-admin/o11-097-create-pkg-ips-524496.html
https://docs.oracle.com/cd/E53394_01/html/E54820/pkgcreate.html#scrolltoc
Nagios manifest
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 |
set name=pkg.fmri value=pkg://solaris/application/nagios@1.3,5.11-0 set name=info.source-url value=http://www.nagios.com set name=pkg.summary value="Nagios network monitor" set name=description value="Nagios network monitor & plugins" set name=variant.arch value=i386 depend fmri=pkg:/diagnostic/top type=require group groupname=nagios gid=757 user gcos-field="Nagios Monitoring" group=nagios uid=1969 username=nagios login-shell=/bin/csh home-dir=/opt/nagios dir group=sys mode=0755 owner=root path=opt dir group=nagios mode=0755 owner=nagios path=opt/nagios dir group=nagios mode=0755 owner=nagios path=opt/nagios/bin dir group=nagios mode=0755 owner=nagios path=opt/nagios/libexec dir group=nagios mode=0755 owner=nagios path=opt/nagios/lib dir group=nagios mode=0775 owner=nagios path=opt/nagios/libexec/orderhistory file opt/nagios/bin/nrpe group=nagios mode=0755 owner=nagios path=opt/nagios/bin/nrpe file opt/nagios/lib/charset.alias group=nagios mode=0644 owner=nagios path=opt/nagios/lib/charset.alias file opt/nagios/libexec/check_ftp group=nagios mode=0755 owner=nagios path=opt/nagios/libexec/check_ftp file opt/nagios/libexec/check_http group=nagios mode=0755 owner=nagios path=opt/nagios/libexec/check_http file opt/nagios/libexec/check_by_ssh group=nagios mode=0755 owner=nagios path=opt/nagios/libexec/check_by_ssh file opt/nagios/libexec/check_smtp group=nagios mode=0755 owner=nagios path=opt/nagios/libexec/check_smtp file opt/nagios/libexec/check_apt group=nagios mode=0755 owner=nagios path=opt/nagios/libexec/check_apt file opt/nagios/libexec/check_ping group=nagios mode=0755 owner=nagios path=opt/nagios/libexec/check_ping file opt/nagios/libexec/check_breeze group=nagios mode=0755 owner=nagios path=opt/nagios/libexec/check_breeze file opt/nagios/libexec/check_faxprintq group=nagios mode=0755 owner=nagios path=opt/nagios/libexec/check_faxprintq file opt/nagios/libexec/check_mem group=nagios mode=0755 owner=nagios path=opt/nagios/libexec/check_mem file opt/nagios/libexec/check_ups group=nagios mode=0755 owner=nagios path=opt/nagios/libexec/check_ups file opt/nagios/libexec/check_disk group=nagios mode=0755 owner=nagios path=opt/nagios/libexec/check_disk file opt/nagios/libexec/check_nfs_health.sh group=nagios mode=0755 owner=nagios path=opt/nagios/libexec/check_nfs_health.sh file opt/nagios/libexec/check_imap group=nagios mode=0755 owner=nagios path=opt/nagios/libexec/check_imap file opt/nagios/libexec/check_webapp group=nagios mode=0755 owner=nagios path=opt/nagios/libexec/check_webapp file opt/nagios/libexec/custom_check_mem group=nagios mode=0775 owner=nagios path=opt/nagios/libexec/custom_check_mem file opt/nagios/libexec/check_snmp group=nagios mode=0755 owner=nagios path=opt/nagios/libexec/check_snmp file opt/nagios/libexec/check_file_age group=nagios mode=0755 owner=nagios path=opt/nagios/libexec/check_file_age file opt/nagios/libexec/check_ifcfg group=nagios mode=0755 owner=nagios path=opt/nagios/libexec/check_ifcfg file opt/nagios/libexec/check_mysql_query group=nagios mode=0755 owner=nagios path=opt/nagios/libexec/check_mysql_query file opt/nagios/libexec/ldap_test.sh group=nagios mode=0755 owner=nagios path=opt/nagios/libexec/ldap_test.sh file opt/nagios/libexec/check_load group=nagios mode=0755 owner=nagios path=opt/nagios/libexec/check_load file opt/nagios/libexec/check_ntp_time group=nagios mode=0755 owner=nagios path=opt/nagios/libexec/check_ntp_time file opt/nagios/libexec/negate group=nagios mode=0755 owner=nagios path=opt/nagios/libexec/negate file opt/nagios/libexec/messages.1 group=nagios mode=0644 owner=nagios path=opt/nagios/libexec/messages.1 file opt/nagios/libexec/samba_test.sh group=nagios mode=0755 owner=nagios path=opt/nagios/libexec/samba_test.sh file opt/nagios/libexec/check_real group=nagios mode=0755 owner=nagios path=opt/nagios/libexec/check_real file opt/nagios/libexec/check_tcp.new group=nagios mode=0755 owner=nagios path=opt/nagios/libexec/check_tcp.new file opt/nagios/libexec/check_simap group=nagios mode=0755 owner=nagios path=opt/nagios/libexec/check_simap file opt/nagios/libexec/check_mysql group=nagios mode=0755 owner=nagios path=opt/nagios/libexec/check_mysql file opt/nagios/libexec/check_apps_ssh group=nagios mode=0644 owner=nagios path=opt/nagios/libexec/check_apps_ssh file opt/nagios/libexec/nagisk.pl group=nagios mode=0775 owner=nagios path=opt/nagios/libexec/nagisk.pl file opt/nagios/libexec/custom_check_procs group=nagios mode=0775 owner=nagios path=opt/nagios/libexec/custom_check_procs file opt/nagios/libexec/local_ldap_test.sh group=nagios mode=0755 owner=nagios path=opt/nagios/libexec/local_ldap_test.sh file opt/nagios/libexec/check_ssl_cert group=nagios mode=0755 owner=nagios path=opt/nagios/libexec/check_ssl_cert file opt/nagios/libexec/check_b2bapp group=nagios mode=0755 owner=nagios path=opt/nagios/libexec/check_b2bapp file opt/nagios/libexec/check_ntp group=nagios mode=0755 owner=nagios path=opt/nagios/libexec/check_ntp file opt/nagios/libexec/check_nwstat group=nagios mode=0755 owner=nagios path=opt/nagios/libexec/check_nwstat file opt/nagios/libexec/check_ssmtp group=nagios mode=0755 owner=nagios path=opt/nagios/libexec/check_ssmtp file opt/nagios/libexec/check_netstat.pl group=nagios mode=0775 owner=nagios path=opt/nagios/libexec/check_netstat.pl file opt/nagios/libexec/check_sensors group=nagios mode=0755 owner=nagios path=opt/nagios/libexec/check_sensors file opt/nagios/libexec/check_time group=nagios mode=0755 owner=nagios path=opt/nagios/libexec/check_time file opt/nagios/libexec/check_cpu_stats.sh group=nagios mode=0775 owner=nagios path=opt/nagios/libexec/check_cpu_stats.sh file opt/nagios/libexec/check_disk.global group=nagios mode=0755 owner=nagios path=opt/nagios/libexec/check_disk.global file opt/nagios/libexec/domains2 group=nagios mode=0644 owner=nagios path=opt/nagios/libexec/domains2 file opt/nagios/libexec/check_users group=nagios mode=0755 owner=nagios path=opt/nagios/libexec/check_users file opt/nagios/libexec/check_flexlm group=nagios mode=0755 owner=nagios path=opt/nagios/libexec/check_flexlm file opt/nagios/libexec/check_swap group=nagios mode=0755 owner=nagios path=opt/nagios/libexec/check_swap file opt/nagios/libexec/check_client group=nagios mode=0755 owner=nagios path=opt/nagios/libexec/check_client file opt/nagios/libexec/check_open_files.pl group=nagios mode=0775 owner=nagios path=opt/nagios/libexec/check_open_files.pl file opt/nagios/libexec/check_asterisk_sip_peers.sh group=nagios mode=0775 owner=nagios path=opt/nagios/libexec/check_asterisk_sip_peers.sh file opt/nagios/libexec/check_mrtgtraf group=nagios mode=0755 owner=nagios path=opt/nagios/libexec/check_mrtgtraf file opt/nagios/libexec/check_blackberry.pl group=nagios mode=0755 owner=nagios path=opt/nagios/libexec/check_blackberry.pl file opt/nagios/libexec/utils.pm group=nagios mode=0755 owner=nagios path=opt/nagios/libexec/utils.pm file opt/nagios/libexec/check_ntp_peer group=nagios mode=0755 owner=nagios path=opt/nagios/libexec/check_ntp_peer file opt/nagios/libexec/check_nntp group=nagios mode=0755 owner=nagios path=opt/nagios/libexec/check_nntp file opt/nagios/libexec/check_smf group=nagios mode=0755 owner=nagios path=opt/nagios/libexec/check_smf file opt/nagios/libexec/send_host_check group=nagios mode=0755 owner=nagios path=opt/nagios/libexec/send_host_check file opt/nagios/libexec/check_ircd group=nagios mode=0755 owner=nagios path=opt/nagios/libexec/check_ircd file opt/nagios/libexec/check_nagios group=nagios mode=0755 owner=nagios path=opt/nagios/libexec/check_nagios file opt/nagios/libexec/check_log group=nagios mode=0755 owner=nagios path=opt/nagios/libexec/check_log file opt/nagios/libexec/check_dig group=nagios mode=0755 owner=nagios path=opt/nagios/libexec/check_dig file opt/nagios/libexec/check_whois group=nagios mode=0755 owner=nagios path=opt/nagios/libexec/check_whois file opt/nagios/libexec/check_pop group=nagios mode=0755 owner=nagios path=opt/nagios/libexec/check_pop file opt/nagios/libexec/check_ifoperstatus group=nagios mode=0755 owner=nagios path=opt/nagios/libexec/check_ifoperstatus file opt/nagios/libexec/urlize group=nagios mode=0755 owner=nagios path=opt/nagios/libexec/urlize file opt/nagios/libexec/check_init_service group=nagios mode=0775 owner=nagios path=opt/nagios/libexec/check_init_service file opt/nagios/libexec/check_mrtg group=nagios mode=0755 owner=nagios path=opt/nagios/libexec/check_mrtg file opt/nagios/libexec/send_service_check group=nagios mode=0755 owner=nagios path=opt/nagios/libexec/send_service_check file opt/nagios/libexec/check_dns group=nagios mode=0755 owner=nagios path=opt/nagios/libexec/check_dns file opt/nagios/libexec/check_ssh group=nagios mode=0755 owner=nagios path=opt/nagios/libexec/check_ssh file opt/nagios/libexec/check_hpjd group=nagios mode=0755 owner=nagios path=opt/nagios/libexec/check_hpjd file opt/nagios/libexec/check_dummy group=nagios mode=0755 owner=nagios path=opt/nagios/libexec/check_dummy file opt/nagios/libexec/check_nrpe group=nagios mode=0755 owner=nagios path=opt/nagios/libexec/check_nrpe file opt/nagios/libexec/check_procs group=nagios mode=0755 owner=nagios path=opt/nagios/libexec/check_procs file opt/nagios/libexec/utils.sh group=nagios mode=0755 owner=nagios path=opt/nagios/libexec/utils.sh file opt/nagios/libexec/script2 group=nagios mode=0755 owner=nagios path=opt/nagios/libexec/script2 file opt/nagios/libexec/check_sip group=nagios mode=0775 owner=nagios path=opt/nagios/libexec/check_sip file opt/nagios/libexec/check_udp group=nagios mode=0755 owner=nagios path=opt/nagios/libexec/check_udp file opt/nagios/libexec/check_spop group=nagios mode=0755 owner=nagios path=opt/nagios/libexec/check_spop file opt/nagios/libexec/check_tcp group=nagios mode=0755 owner=nagios path=opt/nagios/libexec/check_tcp file opt/nagios/libexec/check_mailq group=nagios mode=0755 owner=nagios path=opt/nagios/libexec/check_mailq file opt/nagios/libexec/check_clamd group=nagios mode=0755 owner=nagios path=opt/nagios/libexec/check_clamd file opt/nagios/libexec/check_logfiles group=nagios mode=0755 owner=nagios path=opt/nagios/libexec/check_logfiles file opt/nagios/libexec/domains3 group=nagios mode=0644 owner=nagios path=opt/nagios/libexec/domains3 file opt/nagios/libexec/check_jabber group=nagios mode=0755 owner=nagios path=opt/nagios/libexec/check_jabber file opt/nagios/libexec/typescript group=nagios mode=0644 owner=nagios path=opt/nagios/libexec/typescript file opt/nagios/libexec/check_ifstatus group=nagios mode=0755 owner=nagios path=opt/nagios/libexec/check_ifstatus file opt/nagios/libexec/check_zpool_fs group=nagios mode=0755 owner=nagios path=opt/nagios/libexec/check_zpool_fs file opt/nagios/libexec/check_rpc group=nagios mode=0755 owner=nagios path=opt/nagios/libexec/check_rpc file opt/nagios/libexec/check_ipfilters group=nagios mode=0755 owner=nagios path=opt/nagios/libexec/check_ipfilters file opt/nagios/libexec/check_nt group=nagios mode=0755 owner=nagios path=opt/nagios/libexec/check_nt file opt/nagios/libexec/check_disk_smb group=nagios mode=0755 owner=nagios path=opt/nagios/libexec/check_disk_smb file opt/nagios/libexec/check_nagios_proc group=nagios mode=0755 owner=nagios path=opt/nagios/libexec/check_nagios_proc file opt/nagios/libexec/check_nntps group=nagios mode=0755 owner=nagios path=opt/nagios/libexec/check_nntps file opt/nagios/libexec/check_vsz group=nagios mode=0755 owner=nagios path=opt/nagios/libexec/check_vsz file opt/nagios/libexec/check_asterisk.pl group=nagios mode=0775 owner=nagios path=opt/nagios/libexec/check_asterisk.pl file opt/nagios/libexec/negate1 group=nagios mode=0755 owner=nagios path=opt/nagios/libexec/negate1 file opt/nagios/libexec/pst3 group=nagios mode=0755 owner=nagios path=opt/nagios/libexec/pst3 file opt/nagios/libexec/check_cluster group=nagios mode=0755 owner=nagios path=opt/nagios/libexec/check_cluster file opt/nagios/libexec/check_pgsql group=nagios mode=0755 owner=nagios path=opt/nagios/libexec/check_pgsql file opt/nagios/libexec/check_oracle group=nagios mode=0755 owner=nagios path=opt/nagios/libexec/check_oracle file opt/nagios/libexec/check_wave group=nagios mode=0755 owner=nagios path=opt/nagios/libexec/check_wave file opt/nagios/libexec/check_overcr group=nagios mode=0755 owner=nagios path=opt/nagios/libexec/check_overcr file opt/nagios/libexec/check_swap.pl group=nagios mode=0775 owner=nagios path=opt/nagios/libexec/check_swap.pl file opt/nagios/libexec/orderhistory/orderHistoryNagios.cfg group=nagios mode=0644 owner=nagios path=opt/nagios/libexec/orderhistory/orderHistoryNagios.cfg file opt/nagios/libexec/orderhistory/orderhistory.jar group=nagios mode=0644 owner=nagios path=opt/nagios/libexec/orderhistory/orderhistory.jar file opt/nagios/libexec/orderhistory/orderHistoryNagios.sh group=nagios mode=0755 owner=nagios path=opt/nagios/libexec/orderhistory/orderHistoryNagios.sh file opt/nagios/libexec/orderhistory/weblogic.jar group=nagios mode=0755 owner=nagios path=opt/nagios/libexec/orderhistory/weblogic.jar file opt/nagios/libexec/orderhistory/orderHistoryNagios.jar group=nagios mode=0755 owner=nagios path=opt/nagios/libexec/orderhistory/orderHistoryNagios.jar dir group=nagios mode=0755 owner=nagios path=etc/nagios file etc/nagios/nrpe.cfg group=nagios mode=0644 owner=nagios path=etc/nagios/nrpe.cfg file lib/svc/manifest/site/nagios-monitor.xml \ path=lib/svc/manifest/site/nagios-monitor.xml owner=root group=sys \ mode=0444 restart_fmri=svc:/system/manifest-import:default link path=/lib/libssl.so.0.9.7 target=/lib/libssl.so.1.0.0 overlay=true link path=/lib/libcrypto.so.0.9.7 target=/lib/libcrypto.so.1.0.0 overlay=true legacy pkg=NGOSnrpe arch=i386 category=utility \ name="Nagios Remote Plugin Executor 2.14" vendor=www.nagios.org \ version=2.14 |
Leave a Reply